Magnetic field models for the Milky Way
At the moment, two models of the coherent component of Galactic magnetic field are available. Typically, the coherence length of the turbulent component is too small to induce large scale photon-ALP oscillations at gamma-ray energies and hence only the coherent components are considered here.
The two models are the ones described in detail in [Pshirkov2011] and [Jansson2012]. For the Jansson & Farrar model [Jansson2012], also the updates from measurements with the Planck satellite are available [Planck2016].
Reference / API
- class gammaALPs.bfields.gmf.GMF(model='jansson12')[source]
Bases:
object
Class with analytical functions that describe the galactic magnetic field according to the model of Jannson & Farrar (2012)
Only the regular field components are implemented. The striated field component is absent.
- hdisk
disk/halo transition height
- Type:
float hdisk_unc: float,
- bn, bn_unc
field strength northern halo
- Type:
Notes
see http://adsabs.harvard.edu/abs/2012ApJ…757…14J Jansson & Farrar (2012)
- BX(rho, z)[source]
X (out of plane) component of galactic magnetic field in galactocentric cylindrical coordinates (rho,phi,z)
BX is purely poloidal, i.e. phi component = 0
- Parameters:
rho (array-like) – N-dim array with distance from origin in GC cylindrical coordinates, is in kpc
z (array-like) – N-dim array with height in kpc in GC cylindrical coordinates
- Returns:
BX, BX_abs – tuple containing the magnetic field of the X component as a (3,N)-dim array with (rho,phi,z) components of disk field for each coordinate tuple and absolute value of the field as N-dim array
- Return type:
tuple of
ndarray
- Bdisk(rho, phi, z)[source]
Disk component of galactic magnetic field in galactocentric cylindrical coordinates (rho,phi,z)
- Parameters:
rho (array-like) – N-dim array with distance from origin in GC cylindrical coordinates, is in kpc
z (array-like) – N-dim array with height in kpc in GC cylindrical coordinates
phi (array-like) – N-dim array with polar angle in GC cylindircal coordinates, in radian
- Returns:
Bdisk, Bdisk_abs – tuple containing the magnetic field of the disk as a (3,N)-dim array with (rho,phi,z) components of disk field for each coordinate tuple and absolute value of the field as N-dim array
- Return type:
tuple of
ndarray
- Bhalo(rho, z)[source]
Halo component of galactic magnetic field in galactocentric cylindrical coordinates (rho,phi,z)
Bhalo is purely azimuthal (toroidal), i.e. has only a phi component
- Parameters:
rho (array-like) – N-dim array with distance from origin in GC cylindrical coordinates, is in kpc
z (array-like) – N-dim array with height in kpc in GC cylindrical coordinates
- Returns:
Bhalo, Bhalo_abs – tuple containing the magnetic field of the halo as a (3,N)-dim array with (rho,phi,z) components of disk field for each coordinate tuple and absolute value of the field as N-dim array
- Return type:
tuple of
ndarray
- __init__(model='jansson12')[source]
Init the GMF class, all B-field values are in muG
- Parameters:
model (str) – either jansson12, jansson12b, or jansson12c, where jansson12 is the original model and the other two options are the modifications of the model with Planck data, see http://arxiv.org/abs/1601.00546
- class gammaALPs.bfields.gmf.GMFPshirkov(model='ASS')[source]
Bases:
object
Class with analytical functions that describe the galactic magnetic field according to the model of Pshirkov et al. (2011)
Only the regular field components are implemented.
Notes
Paper: http://adsabs.harvard.edu/abs/2011ApJ…738..192P Pshirkov et al. (2011)
- Bdisk(rho, phi, z)[source]
Disk component of galactic magnetic field in galactocentric cylindrical coordinates (rho,phi,z)
- Parameters:
rho (array-like) – N-dim array with distance from origin in GC cylindrical coordinates, is in kpc
phi (array-like) – N-dim array with polar angle in GC cylindircal coordinates, in radian
z (array-like) – N-dim array with height in kpc in GC cylindrical coordinates
- Returns:
Bdisk, Bdisk_abs – tuple containing the magnetic field of the disk as a (3,N)-dim array with (rho,phi,z) components of disk field for each coordinate tuple and absolute value of the field as N-dim array
- Return type:
tuple of
ndarray
Notes
See Pshirkov et al. Eq. (3) - (5)
- Bhalo(rho, z)[source]
Halo component of galactic magnetic field in galactocentric cylindrical coordinates (rho,phi,z)
Bhalo is purely azimuthal (toroidal), i.e. has only a phi component
- Parameters:
rho (array-like) – N-dim array with distance from origin in GC cylindrical coordinates, is in kpc
z (array-like) – N-dim array with height in kpc in GC cylindrical coordinates
- Returns:
Bhalo, Bhalo_abs – tuple containing the magnetic field of the halo as a (3,N)-dim array with (rho,phi,z) components of disk field for each coordinate tuple and absolute value of the field as N-dim array
- Return type:
tuple of
ndarray