<div dir="ltr">Hi Brendan,<div><br></div><div>Not sure exactly what's happening.  In general it's difficult to remotely debug something like this without a simple test case that one of us can run locally.  Can you perhaps make a test that illustrates the issue using one of the datasets on <a href="http://yt-project.org/data">yt-project.org/data</a>?<br>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 3:05 PM, Brendan Griffen <span dir="ltr"><<a href="mailto:brendan.f.griffen@gmail.com" target="_blank">brendan.f.griffen@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">I have made a mesh using covering_grid:<div><br></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div></div><div>pf = load(basepath+ext+'.0.hdf5', unit_base = unit_base, bounding_box = bbox)<br></div><div><br></div><div><div>unit_base = {'UnitLength_in_cm'         : 3.08568e+21,</div>
<div>             'UnitMass_in_g'            :   1.989e+43,</div><div>             'UnitVelocity_in_cm_per_s' :      100000}</div></div><div><br></div></div></blockquote><div><br></div><div>FWIW, you shouldn't need to set the units or the bbox by hand, yt can read this data from the hdf5 file.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>







<p>In [3]: <span>bbox</span></p>
<p>Out[3]: </p>
<p>array([[   0.,  100.],</p>
<p>       [   0.,  100.],</p>
<p>       [   0.,  100.]])</p><p>ndim = 512</p><p>level = int(math.log(ndim,2))<br></p><p>cg = pf.covering_grid(level=level, left_edge=[0,0,0],dims=[ndim,ndim,ndim])<br></p><p>
arr = cg['deposit', 'all_cic']<br></p><p>When I do arr.mean() etc. I get the output:</p></div><div>







<p> --> Doing dimension: 512</p>
<p>        == Mass density ==</p>
<p>   --- Max:  2.367e-13 [g/cm^-3]</p>
<p>   --- Min:  0.000e+00 [g/cm^-3]</p>
<p>   --- Mean: 1.764e-21 [g/cm^-3]</p>
<p>        == Number density ==</p>
<p>   --- Max:  1.158e+11 [cm^-3]</p>
<p>   --- Min:  0.000e+00 [cm^-3]</p>
<p>   --- Mean: 8.630e+02 [cm^-3]</p>
<p>Written out mesh: /bigbang/data/bgriffen/c2ray/cicfiles/parent/512/density/z0.000.dat</p><p>I thought it returns the mesh in g/cm^3. Compared to just using the particles number, box width and particle mass I get (mass & number density):</p>


<p>orig_mass = (head.massarr[1]*10**10*head.nall[1]/head.hubble)/(head.boxwidth/head.hubble)**3<br></p><p># just total_mass/total_volume where "head" => header info of HDF5 gadget snapshot</p>
<p>In [29]: orig_mass*MsolMpc3_to_gcm3</p><p>Out[29]: 2.701e-30</p><p>In [30]: orig_mass*MsolMpc3_to_gcm3*coeff</p><p>Out[30]: 1.321e-06</p><p>These seem reasonable but the values back from yt don't. Can anyone confirm the yt units of the mesh returned? Does it take care of hubble parameter as read from block? Though this would only account for some minor discrepancy - it is orders of magnitude off at this stage.</p>


<p>Thanks.</p><span class="HOEnZb"><font color="#888888"><p>Brendan</p></font></span></div></div>
<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>
<br></blockquote></div><br></div></div></div>