<div dir="ltr">Hey Ben,<div><br></div><div>This is really helpful - thanks a lot!</div><div><br></div><div>-d</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 9:58 AM, Ben Thompson <span dir="ltr"><<a href="mailto:bthompson2090@gmail.com" target="_blank">bthompson2090@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">Hi Desika.<span><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><br></div>1. How should I interpret the particle data outputs from a Ramses data set?<br></blockquote><div><br></div></span><div>What you were doing is fine, i.e <br></div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span></span><span>ad</span><span>[</span> <span>(</span><span>'io'</span><span>,</span> <span>'particle_mass'</span><span>)])</span><span>.</span><span>in_units</span><span>(</span><span>'Msun'</span><span>)</span><br></blockquote><div><br></div><div>i.e that should print a YTArray of the mass of each individual particle. Unless your RAMSES simulation is outputting the particle mass differently into the binary data (which the example snapshots do not since they were made with an unmodified version of RAMSES), then what you are outputting should be fine. Likewise your script is doing exactly that. I.e summing the mass of *all* the particles in the dataset.<span><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">2. Relatedly - is there an obvious way to extract just the information 
about stars from a ramses data set?   (Assuming the particles are made 
up of only dark matter and stars...though maybe I have that wrong?)<br></blockquote><br></span></div><div>You will have to create a particle filter. Since RAMSES uses the particle fields for the dark matter particle and star particle fields, you will need to employ a particle filter. Something along the lines of:<br><br><pre><a name="14db4b5aa164044c_14db490fe566c899_cl-57"></a><span>def</span> <span>star_filter</span><span>(</span><span>pfilter</span><span>,</span><span>data</span><span>):</span>
<a name="14db4b5aa164044c_14db490fe566c899_cl-58"></a>    <span>filter</span> <span>=</span> <span>np</span><span>.</span><span>logical_and</span><span>(</span><span>data</span><span>.</span><span>particles</span><span>.</span><span>source</span><span>[</span><span>"particle_age"</span><span>]</span> <span>!=</span> <span>0</span><span>,</span> <span>data</span><span>.</span><span>particles</span><span>.</span><span>source</span><span>[</span><span>"particle_age"</span><span>]</span> <span>!=</span> <span>None</span><span>)</span>
<a name="14db4b5aa164044c_14db490fe566c899_cl-59"></a>    <span>return</span> <span>filter</span></pre>Then followed by:<br><br><pre><span>add_particle_filter</span><span>(</span><span>"stars"</span><span>,</span> <span>function</span><span>=</span><span>star_filter</span><span>,</span> <span>filtered_type</span><span>=</span><span>"all"</span><span>,</span> <span>requires</span><span>=</span><span>[</span><span>"particle_age"</span><span>])<br></span><span>ad</span><span>.</span><span>ds</span><span>.</span><span>add_particle_filter</span><span>(</span><span>"stars"</span><span>)</span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><br></pre></div><div>Which will allow you to filter your dataset for star particles.<br></div><div>However, this assumes that there are start particles. If there is no star formation in the simulation, then the "particle_age" field does not get created.<br><br></div><div>You can read more about filters here <a href="http://yt-project.org/doc/analyzing/filtering.html" target="_blank">http://yt-project.org/doc/analyzing/filtering.html</a><br></div><div><span> <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><br></div><div>3.  If I run the same script with the Output 00101 
(Cosmology output) from the yt Ramses data sets, I find that a derived 
field list doesn't list anything that's obviously for the gas.  Unless 
this is the 'deposit' fields (which my gadget-centric brain thinks is 
related to an octree deposition somehow).</div></blockquote><div><br></div></span><div>That is because there is no gas data in that simulation. That run is an NBody-only run. If the gas cells are not there, then the YT dataset object has no gas data to read in, and thus no gas fields are created. <br><br></div><div>Hope this helps.<br><br></div><div>Ben.<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jun 2, 2015 at 10:41 AM, 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">Hi All,<div><br></div><div>I have a couple of very super basic questions about how Ramses data sets are organized which I think are all related (and rooted in my total ignorance of Ramses outputs).   </div><div><br></div><div>1. How should I interpret the particle data outputs from a Ramses data set?<br><br></div><div><a href="http://paste.yt-project.org/show/5579" target="_blank">http://paste.yt-project.org/show/5579</a><br></div><div><br></div><div>on a yt example data set, I get a total particle mass of  total particle mass =  1.13468176647e+16 Msun</div><div><br></div><div>What particles does this encompass?  It seems large even for dark matter and stars.</div><div><br></div><div>2. Relatedly - is there an obvious way to extract just the information about stars from a ramses data set?   (Assuming the particles are made up of only dark matter and stars...though maybe I have that wrong?)</div><div><br></div><div>3.  If I run the same script with the Output 00101 (Cosmology output) from the yt Ramses data sets, I find that a derived field list doesn't list anything that's obviously for the gas.  Unless this is the 'deposit' fields (which my gadget-centric brain thinks is related to an octree deposition somehow).</div><div><br></div><div>Thanks!</div><span><font color="#888888"><div>-desika</div><div><br></div><div><br></div>







</font></span></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>