Hello,
I have a use case for yt that I do not know if anyone else has encountered
(though somehow I think they might have done!). I need to build background
conditions for my code, this for me entails complex stratified density and
magnetic field geometry see this:
http://labs.adsabs.harvard.edu/adsabs/abs/2013MNRAS.435..689G/ to get an
idea of the problem.
The yt derived field and other abstractions would make doing this much
easier, however I don't know if there is a framework for creating base
fields in yt in memory and then computing derived fields based on those and
then saving a mix of input fields and derived fields to disk?
To make this more complex I have some weird save out requirements, so being
able to change array order and do mpi decomposition at save time would be
very useful.
Any suggestions or people telling me that this is obvious are welcome :)
Thanks
Stuart

Hi All,
I'm playing around with filtering out particles from an SPH data set using
the bounding box. I have a (somewhat lengthy but not complicated) notebook
that highlights some of the capabilities (and an issue that I've found)
here:
http://nbviewer.ipython.org/gist/dnarayanan/517b736c9bb0cd72a6fa
The notebook does 3 things:
1. It first loads a snapshot from a cosmological simulation, and does a
projection plot.
2. It then sets a smaller bounding box, and attempts to zoom in on that
region (centered on the max density). This works great.
3. Perplexingly, though, when I try basically the exact same code (the
section after the second image) but with a different snapshot in the same
simulation, I get a particle out of bounds error.
One relevant clue is that this error only comes when trying to access
smoothed quantities (i.e. the snippets where I try to access [as an
example] the SFR gives no problems). Probably obvious, but this is the
bleeding edge yt (most recent update).
Any thoughts would definitely be welcome.
thanks,
desika

Hi All,
I'm having some issues with really basic halo finding on gadget snapshots
in the bleeding edge version. What I want to do is ID halos in a volume,
save a list of the halos, and plot a projection plot with circles over the
halos (all of which I think should be possible).
The principle script is: http://paste.yt-project.org/show/4824/
The error I get when trying to save the halos is:
http://paste.yt-project.org/show/4822/
and in trying to annotate the halos on the projection plot is:
http://paste.yt-project.org/show/4823/
Am I either doing something wrong in my commands? (hopefully as simple as
that...) or are these not supported yet in the bleeding edge yt?
thanks
desika
ps. On another (related) note, is it possible to manually draw circles on a
projection plot? Or arrows, or tick marks, or anything that I could use to
visually show off individual halos?

Dear all,
I'm trying to make a volume rendering of one of my binary Gadget dataset. I'm following this tutorial: http://yt-project.org/docs/dev-3.0/cookbook/simple_volume_rendering.py, which has been working great for my Enzo outputs. But the same script is not working with the Gadget ones. The error I'm getting is "Failed to split grids" when I try to do "cam = pf.h.cam()". I checked if yt is reading the Gadget file in the right way by plotting the particles, and it looks good. Any ideas of what can be causing that problem?
Best,
Fernando.

Dear yt user,
I try to use Generic UnicGrid Data (256^3 gas density cube + position
of particle that is subset of a huge simulation).
It is preliminary work, but I still have some questions.
1. In order to set density unit as cgs, I made following script:
......
data = dict(density = (map, "g/cm**3")) #map is 256^3 density data array
bbox = np.array([[0., boxsize], [0., boxsize], [0.,boxsize]])
ds = load_uniform_grid(data, data['density'][0].shape, 3.086e24,
bbox=bbox, nprocs=4)
.....
Then, I got the following error message:
Traceback (most recent call last):
File "cutout2.py", line 62, in <module>
ds = load_uniform_grid(data, data['density'][0].shape, 3.086e24,
bbox=bbox, nprocs=4)
File "/Users/jhchoi/common/lib/python2.7/site-packages/yt-3.0dev-py2.7-macosx-10.4-x86_64.egg/yt/frontends/stream/data_structures.py",
line 461, in load_uniform_grid
psize = get_psize(np.array(data[key].shape), nprocs)
AttributeError: 'tuple' object has no attribute 'shape'
Hence, I modify "data = dict(density = (map, "g/cm**3"))" --> "data =
dict(density = map)" and it work.
If this is the case, how can I define the density unit and show it
when I make Slice/Projection?
In addition, I would like to know how I can set the unit in Generic
UnicGrid Data in general?
The length unit can be provide to script in load_uniform_grid(...
3.086e24 ....) but I do not know how to set other units.
2. When I add particle information as follow:
.....
npart = 100000 # number of particles
data = dict(density = map,
number_of_particles = npart,
particle_position_x = posx,
particle_position_y = posy,
particle_position_z = posz)
bbox = np.array([[0., boxsize], [0., boxsize], [0.,boxsize]])
ds = load_uniform_grid(data, data['density'][0].shape, 3.086e24,
bbox=bbox, nprocs=4)
...
I got the following error message:
Traceback (most recent call last):
File "cutout.py", line 107, in <module>
ds = load_uniform_grid(data, data['density'][0].shape, 3.086e24,
bbox=bbox, nprocs=4)
File "/Users/jhchoi/common/lib/python2.7/site-packages/yt-3.0dev-py2.7-macosx-10.4-x86_64.egg/yt/frontends/stream/data_structures.py",
line 519, in load_uniform_grid
assign_particle_data(spf, pdata)
File "/Users/jhchoi/common/lib/python2.7/site-packages/yt-3.0dev-py2.7-macosx-10.4-x86_64.egg/yt/frontends/stream/data_structures.py",
line 371, in assign_particle_data
pdata.pop("number_of_particles")
KeyError: 'number_of_particles'
So, I change "number_of_particles = npart," --> "number_of_particles =
100000," and it works.
How could it happen?
3. Can I do halo finder (hop/fof) using the above particle data?
Or, what information do I need to provide to do grouping?
In this case, how can I set the units and linking length?
4. Can I make particle distribution to particle data like
data['Dark_Matter_position_x']?
This process will allow me additional analysis such as profile and
obtaining total value.
I may ask too many for new tool, but it will help a lot to use yt for
general data set.
Thank you,
Junhwan

Greetings,
I am having an installation problem with yt in Fedora 20. I used
pip install yt
Downloading/unpacking yt
Downloading yt-2.6.2.tar.gz (2.4MB): 2.4MB downloaded
Running setup.py egg_info for package yt
/bin/sh: svnversion: command not found
non-existing path in 'yt/utilities/spatial': 'tests'
It seems that include prefix is different from lib prefix
Please use either env variable or cfg to set proper path
Reading PNG location from png.cfg failed.
Please place the base directory of your
PNG install in png.cfg and restart.
(ex: "echo '/usr/local/' > png.cfg" )
You can locate the path by looking for png.h
Complete output from command python setup.py egg_info:
/bin/sh: svnversion: command not found
non-existing path in 'yt/utilities/spatial': 'tests'
It seems that include prefix is different from lib prefix
Please use either env variable or cfg to set proper path
Reading PNG location from png.cfg failed.
Please place the base directory of your
PNG install in png.cfg and restart.
(ex: "echo '/usr/local/' > png.cfg" )
You can locate the path by looking for png.h
I tried doing echo /usr/local/ > png.cfg and even tried with /usr/ >
png.cfg, but it did not help. Did any other Fedora 20 user face the same
issue ?
Regards,
Varadarajan