mcrat_movie.py¶
This routine allows the user to make movies of the photons propagating through the hydro simulation. This routine can also plot the average temperature of the photons vs the average temperature of the matter near the photons
currently this code only works with FLASH hydrodynamic simulations
1st: read FLASH File and MCRaT file
2nd: plot flash temperature and mcrat positions of a bunch of photons
3rd: plot temp vs radius for photons and matter
-
mcrat_movie.
calc_spectrum
(p0, weight)¶ produces spectrum in keV
- Parameters
p0 –
weight –
- Returns
-
mcrat_movie.
follow_lc_data
(hydro_sim_dir, hydro_sim_name, last_frame, mcrat_sim_data_dir, maxx, miny, maxy, theta, time, dt, fps, num_photon_plot=10000000.0, read_type=False, energy_range=None)¶ - Parameters
hydro_sim_dir –
hydro_sim_name –
last_frame –
mcrat_sim_data_dir –
maxx – in real units, not code units
miny –
maxy –
theta – in degrees
time –
dt –
fps –
num_photon_plot –
read_type –
- Returns
-
mcrat_movie.
get_flash_data
(file_num, f, max_x, min_y, max_y, flash_l_scale)¶ This function collects all the data from a given FLASH file and prepares it to be plotted with imshow.
- Parameters
file_num – The frame number
f – The path to the file as well as the FLASH file name preceeding the file number
max_x – The maximum x that should be plotted (the input should be in physical units, not in code units)
min_y – The minimum y of the portion of the hydro frame that will be plotted (the input should be in code units)
max_y – The maximum y of the portion of the hydro frame that will be plotted (the input should be in code units)
- Returns
returns a 2D array of the density for plotting with imshow
-
mcrat_movie.
get_indexes_data
(mcrat_f, num, ph_num, angle, t, dt, fps, read_comv=False, read_stokes=False, read_type=False, dtheta_deg=1, energy_range=None)¶ This function gets the set of indexes of the photons that will be plotted in the imshow window as well as the indexes of all the photons in order to calculate the spectrum
- Parameters
mcrat_f –
num –
ph_num –
angle –
t –
dt –
fps –
read_comv –
read_stokes –
dtheta_deg –
- Returns
-
mcrat_movie.
get_plot_data
(frame_number, flash_file, mcrat_file, t_ph=None, t_f=None, plot_temp_curves=False, read_comv=False, read_stokes=False, read_type=False, dtheta_deg=1)¶ - Parameters
frame_number –
flash_file –
mcrat_file –
t_ph –
t_f –
plot_temp_curves –
read_comv –
read_stokes –
read_type –
dtheta_deg –
- Returns