<div dir="ltr">Hi Ricarda,<div><br></div><div>Please let us know if you need a hand fixing your installation. Will be eagerly awaiting your pull request.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 4:25 AM, Ricarda Beckmann <span dir="ltr"><<a href="mailto:ricarda.beckmann@astro.ox.ac.uk" target="_blank">ricarda.beckmann@astro.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I appear to have broken my version of yt in the attempt to push the changes to my repo, which might take a while to fix. I promise to to a pull request ASAP for this..<div><br></div><div><br></div><div>In the meantime, if you want to be working on this, these are the changes you want: </div><div><br></div><div>The units are set in frontends/ramses/data_structures.py<br><div><br></div><div><div><br></div><div><img height="108" width="320" src="cid:766163AA-D74F-4E51-8217-2A09C635C41F@nat.physics.ox.ac.uk"></div><div><br></div><div>In general, the units output in the info file all still need a factor of boxlen folded in, the length unit as well as the density unit. Once this is included, they convert directly to cgs. If done correctly, these factors cancel back out for the mass unit.</div><div><br></div><div>If you have any more questions, feel free to contact me.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Ricarda</div></font></span><div><div class="h5"><div><br></div><div><br><div><br></div><div><br><div><blockquote type="cite"><div>On 5 Jun 2015, at 09:26, Ricarda Beckmann <<a href="mailto:Ricarda.Beckmann@astro.ox.ac.uk" target="_blank">Ricarda.Beckmann@astro.ox.ac.uk</a>> wrote:</div><br><div>
<div style="word-wrap:break-word">This is definitely a bug and I have run into it before as well.<div><br></div><div>I’ll have a look for you, as I happen to have a ramses non-cosmological run at hand to test on.</div><div><br></div><div>Ricarda</div><div><br><div><blockquote type="cite"><div>On 5 Jun 2015, at 00:28, Desika Narayanan <<a href="mailto:dnarayan@haverford.edu" target="_blank">dnarayan@haverford.edu</a>> wrote:</div><br><div><div dir="ltr">Hey All - thanks for this - the PR was useful to look at to get a sense of the history of the issue. <div><br></div><div>The data set is an idealized disk.  Though because this is an Agora snapshot, I'm surprised this hasn't been noticed by someone else before.    (It's not mine - I got a set of them from Mike Butler and Oscar Agertz for testing my radiative transfer code).</div><div><br></div><div>Ben - I just shot an email to see if it's okay for me to share the snapshot (I assume it probably is) which might help comparison with pymses.   </div><div>thanks!</div><div>-d</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 6:18 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This was last touched back in December:<div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-request/1335/ramses-unit-conversions/diff" target="_blank">https://bitbucket.org/yt_analysis/yt/pull-request/1335/ramses-unit-conversions/diff</a><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issue/939/units-error-in-ramses-frontend" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/939/units-error-in-ramses-frontend</a><br></div><div><br></div><div>when I updated this, I attempted to set the units in exactly the same way as pymses. Unfortunately since I'm not a ramses user and don't have access to a diversity of test datasets, it's hard to get this exactly right in all cases.</div><div><br></div><div>Is your dataset cosmological? I wouldn't be surprised if there are subtle differences in the way units are set up for comoving and non-comoving simulations.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Jun 4, 2015 at 2:59 PM, Desika Narayanan <span dir="ltr"><<a href="mailto:dnarayan@haverford.edu" target="_blank">dnarayan@haverford.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hey YT-dev,<div><br></div><div>I've discovered something that I think could maybe be a bug (though maybe not) in the Ramses front end but am unsure about the motivation behind the code so thought I'd check in and try to learn a bit.</div><div><br></div><div>In frontends/ramses/data_structures.py, I think the length_unit is set to be the length_unit that comes from the info_xxx.txt file multiplied by the box length.   For the example yt data sets, this doesn't impact anything because the box lengths are unity.</div><div><br></div><div>In examining some Agora snapshots, however the box lengths are not unity - one that I'm looking at for example has a boxlen of 600.  This results in length units that aren't similar to what the info_xxx.txt file says, and more dramatically, mass units that are very different.  For example, in one such snapshot, I read from the info file:</div><div><br></div><div><p>boxlen      =  0.600000000000000E+03<br>time        =  0.500035810875167E+00<br>aexp        =  0.100000000000000E+01<br>H0          =  0.100000000000000E+01<br>omega_m     =  0.100000000000000E+01<br>omega_l     =  0.000000000000000E+00<br>omega_k     =  0.000000000000000E+00<br>omega_b     =  0.000000000000000E+00<br>unit_l      =  0.308656802500000E+22<br>unit_d      =  0.157339152800000E-25<br>unit_t      =  0.308687241173998E+17</p><p>but if I load this snapshot in yt, I get:</p><p><span>>In [2]: </span>print ds.mass_unit<br>9.9935115109e+46 g</p><p><span>>In [3]: </span>print ds.mass_unit.in_units("Msun")<br>5.02586592269e+13 Msun</p><p>><span>In [4]: </span>print ds.length_unit<br>1.851940815e+24 cm</p><p>which consequently results in derived quantities from the simulation (like stellar mass) that are totally off (by a factor boxlen**3).</p><p>So, I'm writing (as a total Ramses novice) to try to understand the motivation behind multiplying the length unit by the boxlen in the frontend, and if I should be accounting for this factor of boxlen**3 in my analysis, or if this is a bona fide bug.</p><p>Thanks, <br>-desika</p><p>ps I updated this morning:</p><p>thundersnow:yt desika$ hg id<br>8d3663ac217d+ (yt) tip</p></div></div>
<br></div></div>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>yt-dev mailing list<br><a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br><a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>yt-dev mailing list<br><a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br><a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br></div></blockquote></div><br></div></div></div></div></div></div></div><br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>