[yt-users] time conversion

Britton Smith brittonsmith at gmail.com
Wed Jun 17 19:07:45 PDT 2009


Hi Stephen,

A while ago I implemented a couple things that I think are just what you
need.  The module, yt.lagos.EnzoCosmology, features conversions from
redshift to time after big bang and vice-versa.  To use it, you just need to
instantiate an EnzoCosmology object with keyword args for the cosmological
parameters.  Then you have access to the ComputeRedshiftFromTime and
ComputeTimeFromRedshift methods as well as the TimeUnits attribute, which
gives you the conversion from code units into seconds (I think).  All of
these routines were essentially ripped straight from enzo and ported into
python.

For more general cosmological calculations, there is yt.lagos.Cosmology,
which works the exact same way, but has methods for, comoving radial
distance, luminosity distance, etc.  It uses a series approximation for the
integration, so the results cannot be trusted for extremely high redshifts,
like 1000 or so.

Britton

On Wed, Jun 17, 2009 at 6:32 PM, Stephen Skory <stephenskory at yahoo.com>wrote:

>
>
>
> > Is there a built-in way to convert times in yt? Specifically, convert the
> code
> > 'creation_time' to physical time?
>
> Or even better 'creation_time' -> redshift...
>
> Thanks!
>
>  _______________________________________________________
> sskory at physics.ucsd.edu           o__  Stephen Skory
> http://physics.ucsd.edu/~sskory/ <http://physics.ucsd.edu/%7Esskory/> _.>/
> _Graduate Student
> ________________________________(_)_\(_)_______________
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20090617/bfeb6ea1/attachment.htm>


More information about the yt-users mailing list