Description¶
msynchro is a simple python package that allows calculation of optically thin synchrotron emission from arbitrary electron distributions. It also include a tridiagonal matrix algorithm for evolving distributions of particles subject to cooling. This page contains a brief description of the main methods.
Tridiagonal matrix algorithm¶
The TDM algorithm is used to solve a continuity equation of the form. This discussion broadly follows that given by Chiaberge & Ghisellini (1999) – see also Chang & Cooper (1970). The algorithm is intended to solve equations of the following form
where \(n(E,t)\) is the differential spectrum at energy \(E\) and time \(t\). \(\tau_{\rm loss}\) is an escape or loss timescale, \(Q(E,t)\) is the source term, and \(\dot{E}\) is the cooling rate. This differential equation can be written in discrete form as
where the indices \(j\) and \(i\) denote the energy bin and time step, respectively. This equation can be written in tridiagonal matrix form
where \(S^i_j = N^i_j + Q^i_j \Delta t\) and
This equation can then be written at each time step as an \((m \times m)\) tridiagonal matrix, with the matrix equation to solve as follows (dropping the \(i\) superscript):
which is solved using the tridiagonal matrix algorithm. The actual algorithm is written as a C extension and an example of it’s use is found under Examples.
Synchrotron Calculation¶
We calculate the synchrotron emissivity \(\epsilon_\nu\) of an electron distribution \(n(E)\) with
Here \(P_s(\nu,\gamma)\) is the single particle synchrotron emissivity averaged over an isotropic distribution of pitch angles, given by (Crusius & Schlickeiser 1986 )
where \(t=\nu/(3\gamma^2\nu_B)\), \(\nu_B = e B/(2\pi m_e c)\) is the gyrofrequency or cyclotron frequency, and the \(K\) quantities are the usual modified Bessel functions.
Todo
write description.