Hi Matt and Greg,<br><br>In reading that old thread, it's still not clear to me exactly what the units are for the potential field. If it turns out that the field is always in energy units, then we should be able to just convert that by default in yt. This is worth checking before anything else happens. I will post a question on the enzo list.<br>
<br>Britton<br><br><div class="gmail_quote">On Thu, Mar 1, 2012 at 5:23 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Greg,<br>
<br>
This thread can provide some insight:<br>
<br>
<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2011-July/001742.html" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2011-July/001742.html</a><br>
<br>
In short, yt does not provide a conversion because a conversion is<br>
unknown to it. We have taken the route of notifying the user of this.<br>
<br>
If you want to provide a conversion factor for PotentialField, which<br>
you know to be correct, I would encourage you not to go the yt route<br>
and instead submit a patch to Enzo that writes out a<br>
#CGSConversionFactor entry in the parameter file for PotentialField.<br>
You can do this by going to the enzo source page:<br>
<br>
<a href="http://bitbucket.org/enzo/enzo-dev" target="_blank">http://bitbucket.org/enzo/enzo-dev</a><br>
<br>
forking the repository, and adding the appropriate units in<br>
WriteParameterFile, similar to how it is done for Density, and then<br>
issuing a pull request with this change. I'm sure it will be useful<br>
for others!<br>
<br>
-Matt<br>
<div><div class="h5"><br>
On Thu, Mar 1, 2012 at 5:17 PM, <<a href="mailto:meecegre@msu.edu">meecegre@msu.edu</a>> wrote:<br>
> Hi Everyone,<br>
><br>
> I'm trying to use yt to calculate the spin parameter of a halo generated by<br>
> Enzo. I have enzo writing out the potential using the -g flag, but when yt<br>
> reads in the field, it isn't able to figure out the units or recognize it as<br>
> a known field. Also, yt is keeping the potential data in code units, rather<br>
> than converting to CGS. When I make a plot of the potential, the plot says<br>
> that the units are unknown.<br>
><br>
> When I load the dataset into yt, the relavant output is<br>
> yt : [INFO ] 2012-03-01 17:10:20,349 Adding unknown field PotentialField<br>
> to list of fields<br>
><br>
> I discussed this probelm with Brian O'Shea and Britton Smith. Not sure if<br>
> anyone else has run into this issue.<br>
><br>
> -- Greg Meece<br>
><br>
</div></div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br>