[yt-users] ramses dataset structure

Ben Thompson bthompson2090 at gmail.com
Tue Jun 2 06:58:23 PDT 2015


Hi Desika.


> 1. How should I interpret the particle data outputs from a Ramses data set?
>

What you were doing is fine, i.e

ad[ ('io', 'particle_mass')]).in_units('Msun')
>

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.

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?)
>

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:

def star_filter(pfilter,data):	filter =
np.logical_and(data.particles.source["particle_age"] != 0,
data.particles.source["particle_age"] != None)	return filter

Then followed by:

add_particle_filter("stars", function=star_filter,
filtered_type="all", requires=["particle_age"])
ad.ds.add_particle_filter("stars")

Which will allow you to filter your dataset for star particles.
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.

You can read more about filters here
http://yt-project.org/doc/analyzing/filtering.html

>
>
> 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).
>

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.

Hope this helps.

Ben.

On Tue, Jun 2, 2015 at 10:41 AM, Desika Narayanan <dnarayan at haverford.edu>
wrote:

> Hi All,
>
> 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).
>
> 1. How should I interpret the particle data outputs from a Ramses data set?
>
> http://paste.yt-project.org/show/5579
>
> on a yt example data set, I get a total particle mass of  total particle
> mass =  1.13468176647e+16 Msun
>
> What particles does this encompass?  It seems large even for dark matter
> and stars.
>
> 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?)
>
> 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).
>
> Thanks!
> -desika
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150602/16e6a034/attachment.html>


More information about the yt-users mailing list