Skip to content

Commit

Permalink
Merge pull request #169 from grzegorzbor/master
Browse files Browse the repository at this point in the history
small documentation fixes for spectral constraints module
  • Loading branch information
grzegorzbor authored Jan 5, 2025
2 parents 02dc443 + f3668c3 commit 506c038
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions agnpy/constraints/spectral_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ def gamma_max_larmor(self):
.. math::
R_L < R_b \Rightarrow \gamma_{\mathrm{max}} < \frac{R_b e B}{m_e c^2}
R_L \u2264 R_b \Rightarrow \gamma_{\mathrm{max}} \u2264 \frac{R_b e B}{m_e c^2}
"""
return (self.blob.R_b * e * self.blob.B_cgs / mec2).to_value("")

@property
def gamma_max_ballistic(self):
r"""Naive estimation of maximum Lorentz factor of electrons comparing
acceleration time scale with ballistic time scale.
For the latter we assume that the particles crosses the blob radius.
For the latter we assume that the particles cross the blob radius.
.. math::
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} &= \xi c E / R_L \\
T_{\mathrm{acc}} &= E \,/\,(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} = R_L / (\xi c) \\
T_{\mathrm{bal}} &= R_b / c \\
T_{\mathrm{acc}} &< T_{\mathrm{bal}}
\Rightarrow \gamma_{\mathrm{max}} < \frac{\xi R_b e B}{m_e c^2}
T_{\mathrm{acc}} \u2264 T_{\mathrm{bal}}
\Rightarrow \gamma_{\mathrm{max}} \u2264 \frac{\xi R_b e B}{m_e c^2}
"""
return self.blob.xi * self.gamma_max_larmor

Expand All @@ -63,7 +63,7 @@ def gamma_max_synch(self):
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} &= \xi c E / R_L \\
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{synch}} &= 4 / 3 \sigma_T c U_B \gamma^2 \\
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} &= (\mathrm{d}E/\mathrm{d}t)_{\mathrm{synch}}
\Rightarrow \gamma_{\mathrm{max}} < \sqrt{\frac{6 \pi \xi e}{\sigma_T B}}
\Rightarrow \gamma_{\mathrm{max}} = \sqrt{\frac{6 \pi \xi e}{\sigma_T B}}
"""
return np.sqrt(
6 * np.pi * self.blob.xi * e / (sigma_T * self.blob.B_cgs)
Expand All @@ -77,9 +77,9 @@ def gamma_max_SSC(self):
.. math::
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} &= \xi c E / R_L \\
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{SSC}} &= 4 / 3 \sigma_T c U_{\mathrm{synch}} \gamma^2 \\
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{SSC}} &= 4 / 3 \sigma_T c U_{\mathrm{SSC}} \gamma^2 \\
(\mathrm{d}E/\mathrm{d}t)_{\mathrm{acc}} &= (\mathrm{d}E/\mathrm{d}t)_{\mathrm{SSC}}
\Rightarrow \gamma_{\mathrm{max}} < \sqrt{\frac{3 \xi e B }{\sigma_T U_SSC}}
\Rightarrow \gamma_{\mathrm{max}} = \sqrt{\frac{3 \xi e B }{4 \sigma_T U_\mathrm{SSC}}}
"""
return np.sqrt(
3
Expand All @@ -95,7 +95,7 @@ def gamma_max_EC_DT(self, dt, r=0 * u.cm):
WARNING: assumes Thomson regime
.. math::
\gamma_{\mathrm{max}} = \sqrt{\frac{3 \xi e B }{ \sigma_T U'_\mathrm{ext}}}
\gamma_{\mathrm{max}} = \sqrt{\frac{3 \xi e B }{4 \sigma_T U'_\mathrm{ext}}}
"""
return np.sqrt(
3 * self.blob.xi * e * self.blob.B_cgs / (4 * sigma_T * dt.u(r, self.blob))
Expand Down

0 comments on commit 506c038

Please sign in to comment.