<div dir="ltr"><div><div><div><div><div><div><div><div><div>Dear yt-users,<br><br></div>I am running<br><br>Version = 3.2-dev<br>Changeset = dc2467c4eae7 (yt) tip<br><br></div>I have been fiddling around with cut_region in a disk region and have gotten really confused.  I was initially trying to see whether defining a disk region such that the cylinder height was on the x-axis changed how I need to make a cut in the cylinder height.  Anyway, as I was fiddling with these cuts I found that if I made a "spatial" cut (rather than a different variable cut) I was getting different volumes.  Let me show you:<br><br>small bit of background:  the whole box is 130 kpc across, so 0.5 0.5 0.5 is 65 65 65 kpc.  Also, I am cutting and pasting bits here so the indentation is off.  <br><br>ds = yt.load("/data/stonnes/dwarf_nowind_lowmassgal_bigtracer/DD"+loop[i]+"/DD44sMBhn25now"+loop[i])<br><br>r2 = ds.disk([0.5,0.5,0.5],[-1,0,0],(4,"kpc"),(2,"kpc"))<br>    r2c = r2.cut_region(["obj['Metal_Density']/obj['density'] > 0.33"])<br><br>    r3 = ds.disk([0.5,0.5,0.5],[-1,0,0],(4,"kpc"),(2,"kpc"))<br>    r3r = r3.cut_region(["(obj['x'].in_units('kpc') > 63.0)"])<br>    r3r = r3r.cut_region(["(obj['x'].in_units('kpc') < 67.0)"])<br>    r3c = r3r.cut_region(["obj['Metal_Density']/obj['density'] > 0.33"])<br>    <br>    r4 = ds.disk([0.5,0.5,0.5],[-1,0,0],(4,"kpc"),(2,"kpc"))<br>    r4r = r4.cut_region(["(obj['x'].in_units('kpc') > 61.)"])<br>    r4c = r4r.cut_region(["obj['Metal_Density']/obj['density'] > 0.33"])<br><br> P2 = np.append(P2,r2c.quantities.total_quantity([("index","cell_volume")]))<br> P3 = np.append(P3,r3c.quantities.total_quantity([("index","cell_volume")]))<br> P4 = np.append(P4,r4c.quantities.total_quantity([("index","cell_volume")]))<br><br></div>P2 volume is 9.346e-5 : within 2% of my calculation for the volume I should be getting<br></div>P3 volume is 7.4768e-4<br></div>P4 volume is 7.4768e-4<br><br></div>When I print out the x- y- and z- maxes and mins, they are the same for each of the selected regions.  <br>(By doing this:<br>m2 = np.append(m2,r2c.quantities.extrema([("index","z")])[0])<br>rho2 = np.append(rho2,r2c.quantities.extrema([("index","z")])[1])<br><br>)<br><br></div>Can anyone help me figure out/tell me what is going on here?<br><br></div>Thanks!<br></div>Stephanie<br><br clear="all"><div><div><div><div><div><div><div><div><div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div>