[yt-dev] what units should be used when setting self.current_time for sph frontends?

Gabriel Altay gabriel.altay at gmail.com
Mon Sep 15 14:45:52 PDT 2014


Hi all,

I'm working on adding an EagleDataset to complement Hillary's recent
addition of the EagleNetworkDataset.  I've been testing what I have using
the recently uploaded OWLS and Eagle snapshots on the yt data site and am
having trouble with the time units.

As is, the code won't read non-zoom Eagle runs.  However, the problem with
the time units exists in the OWLS frontend too.  The following example
reads the OWLS snapshot on the yt data website and prints the current time
in cgs units.

import yt
yt_test_data = "/home/galtay/yt_test_data"
fname_owls = yt_test_data + "/owls_snapshots/snapshot_033/snap_033.0.hdf5"
ds_owls = yt.load( fname_owls )
ds_owls.current_time.in_cgs()

1.83625813382e+37 s


This is about 20 orders of magnitude off.

In the source code for the OWLS readin (around line 316 in
frontsends/sph/data_structures.py) we have

self.current_time = hvals[self._time_readin] * sec_conversion["Gyr"]

the first term ( hvals[self._time_readin] ) is the age of the U. in Gyr and
sec_conversion['Gyr'], I assume, is the number of seconds in a Gyr.  So my
question finally is, what is the proper setting for self.current_time?

thanks,
-Gabriel


-- 
-- 
Gabriel Altay, PhD
Center for Relativistic Astrophysics
Georgia Institute of Technology, Physics Department
837 State Street, Atlanta, GA, 30332
phone: +01 404 205 9795
url: http://cosmo.gatech.edu/?page_id=1075
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140915/54e5e597/attachment.htm>


More information about the yt-dev mailing list