[yt-users] Absorption Spectrum from Gadget snapshot problem

Jared Coughlin Jared.W.Coughlin.29 at nd.edu
Thu Aug 20 08:43:40 PDT 2015


I do not write the hydrogen number density to the snapshot. I was planning
on adding it post-processing. I read about the setup functions, but I don't
really understand how they work. I already have a routine in place that
gets n_HI from the density and temperature in the snapshot. Are set up
functions the tool I should be using?
-Jared
Hi Jared,


>
> I have two questions. First: When calling make_light_ray and passing it
> fields, do I need to pass it H_number_density? Second: Does yt read in
> those fields from the gadget snapshot, or does it calculate them from the
> data in the snapshot (for example, a standard gadget snapshot does not
> write the temperature, but rather the internal energy)?  Thanks!
>


When you run sp.add_line(), you're trying to add a line associated with a
field, in this case, you're associating it with the "H_number_density"
field.  AbsorptionSpectrum expects that field to be present in the light
ray (in this case lr.h5) when you run make_spectrum().  The
"H_number_density" field is a grid-celled neutral hydrogen number density,
which is present in some simulation outputs, however, I do not know if it
is automatically populated for the custom gadget dataset on which you're
running.  Do you trace the neutral hydrogen in your gadget simulation?  If
so, does it spit out to a particle field that you can then deposit into a
grid-based field?  Or were you looking to approximate the HI number density
in yt  by making some assumptions based on the density, temperature,
radiation field, etc.?

Cameron
-- 
Cameron Hummels
NSF Postdoctoral Fellow
Department of Astronomy
California Institute of Technology
http://chummels.org

_______________________________________________
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/20150820/2b685233/attachment.htm>


More information about the yt-users mailing list