Skip to the content.

(one page up)

Time-Dependent Modeling

Time-dependent modeling, i.e. modeling the spectral evolution of sources while physical parameters like magnetic fields are changing over time, can be performed with GAMERA in much the same way as time-independent modeling, described in a this tutorial. If you havent done so already, please go through that one first before proceeding!

Energy-independent parameters

If you want to model the time-dependency of energy-independent parameters such as the ambient magnetic field or gas density the only difference to the time-independent procedure is to provide 2D-vectors instead of doubles to the corresponding Setter-functions you have.

These vectors need to constist of two columns, with the first column holding the time steps and the second the value of the environmental parameter at that time. For instance, if you wanted to define a magnetic field declining with time as

bfield_tdep

you would have to implement this like that:

fp = Particles()
t_ref = 100
time_steps = np.logspace(1,4,100) #in years
b = 1e-4 * (time_steps / t_ref) ** -0.5 #in Gauss
b_lookup = list(zip(time_steps,b))
fp.SetBField(b_lookup)

This simple implementation works with

A working script can be found here, which will output the following plots:

Temporal evolution of the particle spectrum assuming the following time dependences (escape time not set in this example):

time_evolution_basic

particle_time_evolution_basic

(one page up)