Interstellar medium
mlpoppyns.simulator.interstellar_medium.e_density_model
Model for the free electron density to compute the DM values and the scattering timescales.
We use the library pygedm available from astropy (see also Price et al. 2021) See https://pygedm.readthedocs.io/en/latest/pygedm.html for the related documentation.
Authors:
Michele Ronchi (ronchi@ice.csic.es)
compute_DM(l_gal, b_gal, d, ed_model)
Given a specified electron density model (either 'ymw16' or 'ne2001') compute the dispersion measures DMs related to the given heliocentric distances.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
l_gal
|
ndarray
|
Galactic longitude in [deg] defined between [-180, 180] deg. |
required |
b_gal
|
ndarray
|
Galactic latitude in [deg] defined between [-90, 90] deg. |
required |
d
|
ndarray
|
Heliocentric distance in [kpc]. |
required |
ed_model
|
str
|
Free electron density model, either 'ymw16' or 'ne2001'. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Values of the DM in [pc cm^-3]. |
Source code in mlpoppyns/simulator/interstellar_medium/e_density_model.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
compute_tau_sc_327(DM)
Given a value of DM compute the scattering timescale. We use the empirical fit performed by Krishnakumar et al. (2015), who fitted the scattering times obtained at a frequency of 327 MHz (see Section 3, p. 5, right column).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
DM
|
ndarray
|
Dispersion measure in [pc cm^-3]. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Values of the scattering timescale in [s]. |
Source code in mlpoppyns/simulator/interstellar_medium/e_density_model.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
compute_tau_sc_f(tau_sc, f)
Rescaling the scattering timescale at the given specified observation frequency. To rescale to any frequency we assume a Kolmogorov spectrum tau(f) ~ f^-4.4.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tau_sc
|
ndarray
|
Scattering timescale at 327 MHz in [s]. |
required |
f
|
ndarray
|
Frequency at which the scattering timescale is computed [Hz]. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Values of the scattering timescale at the frequency nu in [s]. |
Source code in mlpoppyns/simulator/interstellar_medium/e_density_model.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |