[yt-users] units_override not working for Flash or Enzo datasets

John ZuHone jzuhone at gmail.com
Thu Jul 16 11:45:37 PDT 2015


Hi Alex,

Sorry about this.I think that this is a bug. I'll look into it.

Best,

John

John ZuHone
Kavli Center for Astrophysics and Space Research
Massachusetts Institute of Technology
77 Massachusetts Ave., 37-582G
Cambridge, MA 02139
(w) 617-253-2354
(m) 781-708-5004
jzuhone at space.mit.edu
jzuhone at gmail.com
http://www.jzuhone.com

> On Jul 16, 2015, at 2:35 PM, Alex Hill <ashill at haverford.edu> wrote:
> 
> Hi,
> 
> I’m trying to use the units_override option in loaddata (because I have a data set with metadata labeling itself as cgs but is actually in kpc-Myr-Msun units), following the example in the documentation here: <http://yt-project.org/doc/analyzing/units/comoving_units_and_code_units.html>
> 
> I find that, for data sets created with FLASH 2.5 and FLASH 4.2, units_override does nothing. units_override also does nothing for the sample enzo data sets enzo_tiny_cosmology and IsolatedGalaxy. It *does* work for the sample Athena data set.
> 
> Any suggestions? Is units_override supported for Athena but not for Flash or Enzo?
> 
> Examples here and copied below with the output: <http://paste.yt-project.org/show/5713/>
> 
> units_override={"length_unit":(1.0,"cm"),"time_unit":(1.0,"s"),"mass_unit":(1.0,"g")}
> ds=yt.load('/Users/hil32p/src/yt/doc/source/quickstart/IsolatedGalaxy/galaxy0030/galaxy0030')
> print ds.length_unit
> print ds.mass_unit
> print ds.time_unit
> 
> output:
> 
> 3.086e+24 cm
> 8.11471080586e+43 g
> 2.32946e+18 s
> 
> ds=yt.load('/Users/hil32p/src/yt/doc/source/quickstart/IsolatedGalaxy/galaxy0030/galaxy0030',units_override=units_override)
> print ds.length_unit
> print ds.mass_unit
> print ds.time_unit
> 
> output:
> 
> 3.086e+24 cm
> 8.11471080586e+43 g
> 2.32946e+18 s
> 
> However, it does work for the Athena dataset used in the example:
> 
> ds = yt.load('/Users/hil32p/Downloads/MHDSloshing/virgo_low_res.0054.vtk')
> 1.0 cm
> 1.0 g
> 1.0 s
> 
> units_override={"length_unit":(1.0,"kpc"),"time_unit":(1.0,"Myr"),"mass_unit":(1.0,"Msun")}
> ds = yt.load('/Users/hil32p/Downloads/MHDSloshing/virgo_low_res.0054.vtk', units_override=units_override)
> 1.0 kpc
> 1.0 Msun
> 1.0 Myr
> 
> I am running yt 3.1 with python 2.7, both installed via conda.
> 
> Cheers,
> Alex
> 
> ---------
> Alex Hill
> Senior Postdoctoral Research Associate
> Strawbridge Observatory
> Department of Astronomy, Haverford College
> 370 Lancaster Ave, Haverford, PA 19041 USA
> phone: +1 484 297 2136
> email/iMessage: ashill at haverford.edu
> 
> _______________________________________________
> 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/20150716/a989ea35/attachment.html>


More information about the yt-users mailing list