2. yt is a Python-based platform for analysis and
visualization of astrophysical simulation data
Turk et al. 2011, ApJS, 192, 9
Turk & Smith 2011, arXiv:1112.4482
3. !
yt is designed to address physical,
not computational,
questions
4. “What is the average mass weighted temperature of the gas within a sphere of
radius 100 kpc, centered at the maximum gas density? Oh, and I want it in keV.”
from yt.mods import *
from yt.utilities.physical_constants import kboltz
!
ds = load("IsolatedGalaxy/galaxy0030/galaxy0030")
!
sp = ds.h.sphere("max", (100, “kpc”))
!
T = sp.quantities[“WeightedAverageQuantity”](“temperature”, “cell_mass”)
!
print (kboltz*T).in_units(“keV”)
8. Method: PHOX
• Method developed by Veronica Biffi, Klaus
Dolag (http://www.mpa-garching.mpg.de/
~kdolag/Phox/)
• Biffi,V., Dolag, K., Bohringer, H., & Lemson, G.
2012, MNRAS, 420, 3545
• Biffi,V., Dolag, K., Bohringer, H. 2013, MNRAS,
428, 1395
9. Three Steps:
1. Generate a very large number of photons
from an appropriate spectral model for each
cell
2. Project photons along a chosen line of sight,
Doppler and cosmologically shift their
energies. Apply galactic absorption.
3. Convolve photons with instrument models.
10. Step 1
• First, we define a spectral model.
• There are interfaces within the code to use:
• PyXspec (https://heasarc.gsfc.nasa.gov/
xanadu/xspec/python/html/)
• AtomDB (http://www.atomdb.org)
• There is flexibility to include other model
sources
11. Step 1
• In the first step we generate a lot of photons, many
more than would be in a typical observation (at least
~10x more)
• To make this precise, we specify a very large collecting
area and a very long exposure time, along with a source
distance
• These photons become a Monte-Carlo sample which
will be used to make the actual observation
• Typically, we will store them to disk, also saving the
positions and velocities of the gas they originated from
12. Three Steps:
1. Generate a very large number of photons
from an appropriate spectral model for each
cell
2. Project photons along a chosen line of sight,
Doppler and cosmologically shift their
energies. Apply galactic absorption. Correct
for exposure time and effective area.
3. Convolve photons with instrument models.
13. Step 2
• Using the saved positions, energies, and velocities,
we can project them along a line of sight, and use
the gas velocities to Doppler-shift them.
• We also apply cosmological redshift for distant
sources, and galactic foreground absorption
(tbabs, wabs, etc.)
• Here is where we use the actual effective area
(constant or from an ARF) and exposure time of
the desired observation
14. Three Steps:
1. Generate a very large number of photons
from an appropriate spectral model for each
cell
2. Project photons along a chosen line of sight,
Doppler and cosmologically shift their
energies. Apply galactic absorption. Correct
for exposure time and effective area.
3. Convolve photons with instrument models.
15. Step 3
• The photon simulator module provides a
way to simply convolve with a ARF/RMF
pair, to get a quick-and-dirty observation
• If you want to accurately simulate a
particular detector, you can export the
generated events to files that can be read in
by instrument simulators
16. Step 3
• SIMX: http://hea-www.harvard.edu/simx/
• Not a full raytrace, but a predefined set of
PSFs, vignetting information, and instrumental
responses and outputs to make the simulation.
• yt exports SIMPUT files of (x,y,E) that can be
read in by SIMX
• http://hea-www.harvard.edu/heasarc/formats/
simput-1.1.0.pdf
17. Advantages
• Most expensive step (generating the
photons) happens in 3D, and only needs to
be done (in most cases) ONCE.
• Different projections, different exposure
times, different instruments simulated from
the same set of photons (computationally
cheaper)
• It runs in parallel using MPI
24. To Get yt
• http://yt-project.org/#getyt
• I recommend using the install script:
1. wget http://hg.yt-project.org/yt/raw/yt/
doc/install_script.sh
2. bash install_script.sh
3. source YT_DEST/bin/activate
25. To Get Help
Email Me:
jzuhone@milkyway.gsfc.nasa.gov
!
Photon Simulator Documentation:
http://yt-project.org/doc/analyzing/analysis_modules/
photon_simulator.html
!
Website:
http://yt-project.org
!
Mailing List (yt-users):
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org