Coder Social home page Coder Social logo

Comments (3)

mkelley avatar mkelley commented on August 20, 2024

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.

bsipocz avatar bsipocz commented on August 20, 2024

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.

mkelley avatar mkelley commented on August 20, 2024

Thanks, @bsipocz . I agree with all your points! I'll try QTable first.

from astroquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.