Comments (3)
And, here are some code examples that I am trying to design to:
Examples
--------
Object specifications:
>>> from astroquery.jplhorizons import Horizons2
>>> Horizons2.query_observer("Jupiter")
>>>
>>> Horizons2.query_observer("1", center="568")
>>>
>>> Horizons2.query_observer("europa", center="I41", id_type="name")
>>>
>>> Horizons2.query_observer("2P", id_type="designation")
>>> Horizons2.query_observer("2P",
... id_type="designation",
... closest_apparition=True)
>>>
>>> Horizons2.query_observer("73P",
... id_type="designation",
... closest_apparition=True,
... fragments=False)
>>>
>>> tab = Horizons2.query_observer(
... "comet",
... id_type="orbit",
... epoch=Time(2450200.5, scale="tdb", format="jd"),
... ec=0.8241907231263196,
... qr=0.532013766859137 * u.au,
... tp=Time(2450077.480966184235, scale="tdb", format="jd"),
... om=89.14262290335057 * u.deg,
... w=326.0591239257098 * u.deg,
... in=4.247821264821585 * u.deg,
... a1=-5.113711376907895D-10 * u.au / u.d**2,
... a2=-6.288085687976327D-10 * u.au / u.d**2)
The observer (ephemeris center) can also be an
`~astropy.coordinates.EarthLocation`:
>>> from astropy.coordinates import EarthLocation
>>> college_park = EarthLocation.from_geodetic(-76.9378 * u.deg,
... 38.9897 * u.deg,
... 21 * u.m)
>>> tab = Horizons2.query_observer("Jupiter", center=college_park)
Specifying time:
>>> from astropy.time import Time
>>> import astropy.units as u
>>> tab = Horizons2.query_observer("Jupiter",
... start_time=Time("2023-12-11"),
... stop_time=Time("2023-12-12"),
... step_size=1 * u.hr)
>>>
>>> times = Time(["2023-12-11", "2023-12-20", "2024-01-08"])
>>> tab = Horizons2.query_observer("Jupiter", tlist=times)
from astroquery.
Thank you @mkelley for taking care of the jplephem module. I honestly think it's one of the most used modules (if not no1) and therefore people are running into more issues than with other ones.
Some big-picture thoughts, without going into your implementation details:
- The refactoring plans do sound to be totally reasonable, and I agree that things have changed and we also experienced a lot with how people using it since the first implementation.
- I think it will need to be called horizon with having the old one either removed straight away or moved to a deprecated location (horizon_legacy? or something similar). We did this type of API breakage before (mostly due to upstream API having changed beyond help, or the refactor was significantly large, typically switching away from a reversed engineered webform scraping towards using an official API or even VO).
points 6 and 7: What do you think about using a QTable right away?
The rest of the points sound totally reasonable!
from astroquery.
Thanks, @bsipocz . I agree with all your points! I'll try QTable
first.
from astroquery.
Related Issues (20)
- Add support for upload tables for queries in ALMA
- BUG: CI -- no space left on device HOT 2
- ESA Herschel download_data connection error HOT 2
- MAINT: retire/rename exceptions.TimeoutError in favour of requests
- TST: esasky tests take too long time and donwload too much data HOT 8
- BUG: alma test downloads 850+Mb of data HOT 8
- How to download Level 1 ancillary (*cbcd.fits and *cbunc.fits) from IRSA?
- Vizier.query_region() returns incorrect index for some catalog HOT 3
- CI: rerun failing tests at the end
- Bug in rows limitation in module vizier HOT 2
- Unexpected behavior when passing `obj_names` to `SDSS.query_region()`
- Handling No astronomical object found response HOT 5
- IRSA: adding SSA method HOT 1
- Astroquery.gaia API Error: RA cannot be converted to hour or hourangle. HOT 2
- MAST cloud dataset doesn't show level 3 data products
- SimbadClass got an unexpected keyword argument HOT 5
- API cleanup to make it more self consistent
- API discussion for `list_collections` HOT 4
- Astrometry.net: can query for job id once, rather than each time HOT 2
- BUG: vo_conesearch server SSL cert needs fixing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroquery.