Hi,
Does anyone have any tips for using yt on dimensionless data? I am not using enzo, so some of the units stuff I'll have to hack into Chombo/Orion, but does anyone have any example scripts of how to get yt to work in dimensionless units in enzo? They would be most helpful.
thanks,
jeff
Hi--
So also use yt in a non-cosmological-enzo manner, and override the units in all sorts of ways, including "just take it from the file". I think that this is what you're looking for. What I do is subclass the EnzoStaticOutput object, and have the derived class send conversion_override and parameter_override keywords to to the EnzoStaticOutput constructor. You'll probably need to subclass the OrionStaticOutput or sompin.
At the bottom of this email is an OutputType subclass that takes the fields directly out of the file and (effectively) does no unit conversion. I just do
pf = FileStaticOutput(path)
as normal (not sure how/if this works with 'load'). I also use this to do analysis with units that aren't automatically gotten (non-cosmological sims in my version of Enzo have no units info output, so I do it by hand.) by setting 'Density':(whatever I need to multiply the data in the code by to get it into cgs), etc, in the arguments.
I haven't bothered with getting the labels on plots to be correct-- I think you do this through through lagos.fieldInfo[field]._projected_units and lagos.fieldInfo[field]._units.
Let me know if anything doesn't work properly.
d.
import yt.lagos.OutputTypes as OT
class FileStaticOutput(OT.EnzoStaticOutput): def __init__(self,args,**kwargs): OT.EnzoStaticOutput.__init__(self,args,conversion_override={'Density': 1,
'x-velocity': 1,
'z-velocity': 1,
'y-velocity': 1,
'Total_Energy': 1},
parameter_override={'LengthUnits': 1,'LengthUnit': 1, 'Time': 1}, **kwargs)
On Tue, Oct 27, 2009 at 11:12 AM, j s oishi jsoishi@gmail.com wrote:
Hi,
Does anyone have any tips for using yt on dimensionless data? I am not using enzo, so some of the units stuff I'll have to hack into Chombo/Orion, but does anyone have any example scripts of how to get yt to work in dimensionless units in enzo? They would be most helpful.
thanks,
jeff
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Sent from my Stone Tablet and carried by my Pterodactyl.