[AstroPy] Converting ndarrays of year, month, days to JD?

Aldcroft, Thomas aldcroft at head.cfa.harvard.edu
Fri Feb 20 06:44:51 EST 2015


Hi Mario,

Your best bet (right now) is probably to use the ERFA library directly.
This is bundled in astropy.time.  You can get an example of this here:

  https://github.com/astropy/astropy/blob/v1.0/astropy/time/core.py#L1427

Note that this example uses the name erfa_time.dtf_jd as an alias to the
actual routine name dtf2d.  See [1] for some words about the aliasing, but
the short version is you should probably use dtf2d to be safe.

An even better option would be to implement this as a new astropy Time
format.  I've opened an issue to provide some detail:

  https://github.com/astropy/astropy/issues/3527

Cheers,
Tom

On Thu, Feb 19, 2015 at 5:56 PM, Mario Juric <mjuric at lsst.org> wrote:

> Hi everyone,
>         Is there an efficient way to go from three ndarrays of year,
> month, day
> values to julian date? I.e., an equivalent of:
>
>         jd  = ymd_to_jd(yy, mm, dd)
>
> , where all variables are (potentially large) ndarrays?
>
> Cheers,
> --
> Mario Juric,
> UW Astronomy Faculty | UW eScience | LSST DM Project Scientist
> Web : http://research.majuric.org      Phone : +1 609 933 1033
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20150220/573e6af7/attachment.html>


More information about the AstroPy mailing list