[yt-users] more gadget visualization
Desika Narayanan
dnarayan at haverford.edu
Wed Nov 27 08:56:04 PST 2013
Hey Team YT,
I have a couple of (I think super-easy) questions:
a. How do you paste a script to the yt pastebin? I've done it successfully
once before, but can't for the life of me figure out how I did it.
b. Relatedly, there's a (like 10 line) script appended below where I
projection plot gas densities from a Gadget simulation. I'd like to be
able to do the following:
b.i - I'd like to be able to project other fields. For example, if I
look at pf.h.field_list, I get that for particle type 0, the fields:
('PartType0', 'Masses'), ('PartType0', 'Metallicity') exist. However, if
I try to project:
>p = ProjectionPlot(pf,'z',(("deposit", "PartType0_metallicity")))
(instead of the successful density line below), I get the error :
>YTFieldNotFound: Could not find field '('deposit',
'PartType0_metallicity')' in snapshot_006.
b.ii. Assuming the parts from b.i are possible, is it then possible to
multiply two fields together in the projection (say, I wanted metal mass
and wanted to multiply the particle masses by the particle metallicities).
Similarly, is it possible to multiply a field by a constant for the
particle deposition into a projection plot?
Thanks,
Desika
-------------------------
from yt.mods import *
snap = "/Users/desika/powderday/grid_data/snapshot_006.hdf5"
bbox = [[-220.0, 220.0],
[-220.0, 220.0],
[-220.0, 220.0]]
unit_base = {'UnitLength_in_cm' : 3.08568e+21,
'UnitMass_in_g' : 1.989e+43,
'UnitVelocity_in_cm_per_s' : 100000}
pf = load(snap,unit_base = unit_base,bounding_box=bbox)
pf.h
p = ProjectionPlot(pf,'z',(("deposit", "PartType0_density")))
p.set_width(200,'kpc')
p.save()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20131127/df43776b/attachment.htm>
More information about the yt-users
mailing list