<div dir="ltr">I have made a mesh using covering_grid:<div><br></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>







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







<p class=""> --> Doing dimension: 512</p>
<p class="">        == Mass density ==</p>
<p class="">   --- Max:  2.367e-13 [g/cm^-3]</p>
<p class="">   --- Min:  0.000e+00 [g/cm^-3]</p>
<p class="">   --- Mean: 1.764e-21 [g/cm^-3]</p>
<p class="">        == Number density ==</p>
<p class="">   --- Max:  1.158e+11 [cm^-3]</p>
<p class="">   --- Min:  0.000e+00 [cm^-3]</p>
<p class="">   --- Mean: 8.630e+02 [cm^-3]</p>
<p class="">Written out mesh: /bigbang/data/bgriffen/c2ray/cicfiles/parent/512/density/z0.000.dat</p><p class="">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 class="">orig_mass = (head.massarr[1]*10**10*head.nall[1]/head.hubble)/(head.boxwidth/head.hubble)**3<br></p><p class=""># just total_mass/total_volume where "head" => header info of HDF5 gadget snapshot</p>
<p class="">In [29]: orig_mass*MsolMpc3_to_gcm3</p><p class="">Out[29]: 2.701e-30</p><p class="">In [30]: orig_mass*MsolMpc3_to_gcm3*coeff</p><p class="">Out[30]: 1.321e-06</p><p class="">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 class="">Thanks.</p><p class="">Brendan</p></div></div>