fruitbat.Frb¶
-
class
fruitbat.
Frb
(dm, *, name=None, raj=None, decj=None, gl=None, gb=None, dm_galaxy=0.0, dm_excess=None, z_host=None, dm_host_est=0.0, dm_host_loc=0.0, dm_index=None, scatt_index=None, snr=None, w_obs=None, s_peak_obs=None, f_obs=None, utc=None, dm_uncert=0.0, z_uncert=0.0)[source]¶ Create a
Frb
object using the observered properties of a FRB to properties includingTo define a
Frb
object all it requires is an observed dispersion measure.Parameters: dm (float) – The observed dispersion measure of the FRB. This is without Milky Way or host galaxy subtraction. Units: \(\rm{pc\ cm^{-3}}\)
Keyword Arguments: - name (str or None, optional) – The name of the frb object. Default: None
- raj (str or None, optional) – The right ascension in J2000 coordinates of the best estimate of the FRB position. Default: None
- decj (str or None, optional) – The declination in J2000 coordinates of the best estimate of the FRB position. Default: None
- gl (str or None, optional) – The Galactic longitude in degrees of the best estimate of the FRB position. Default: None
- gb (str or None, optional) – The Galactic latitude in degrees of the best estimate of the FRB position. Default: None
Other Parameters: - dm_galaxy (float, optional) – The modelled contribution to the FRB DM by electrons in the Milky Way. Units: \(\rm{pc\ cm^{-3}}\) Default: 0.0
- dm_excess (float or None, optional) – The DM excess of the FRB over the estimated Galactic DM. If
dm_excess
is None, thendm_excess
is calculated automatically withcalc_dm_excess()
. Units: \(\rm{pc\ cm^{-3}}\) Default: None - z_host (float or None, optional) – The observed redshift of the localised FRB host galaxy. Default: None
- dm_host_est (float, optional) – The estimated contribution to the measured FRB DM from originating from the FRB’s host galaxy. This value is the amount of DM the host galaxy contributes to the observed DM, not the DM of the host galaxy. Units: \(\rm{pc\ cm^{-3}}\) Default: 0.0
- dm_host_loc (float, optional) – The dispersion measure of a localised FRB host galaxy. This value is
not the contribution to the observed DM, but the DM at the host
galaxy. The observed DM is
dm_host_loc
but attenuated by a factor of (1 + z). Units: \(\rm{pc\ cm^{-3}}\) Default: 0.0 - dm_index (float or None, optional) – The dispersion measure index of the burst \(\alpha\) such that \(\rm{DM} \propto \nu^{-\alpha}\) Default: None
- scatt_index (float or None, optional) – The scattering index (\(\beta\)) of the FRB pulse. The scattering index describes how the width (\(\rm{W}\)) of the FRB pulse evolves with frequency \(\nu\) such that \(\rm{W} \propto \nu^{-\beta}\). Default: None
- snr (float or None, optional) – The signal-to-noise of the burst. Default: None
- w_obs (float or None, optional) – The observed width of the pulse obtained by a pulse fitting algorithm. Units: \(\rm{ms}\) Default: None
- s_peak_obs (float or None, optional) – The observed peak flux density of the burst. Units: \(\rm{Jy}\) Default: None
- f_obs (float or None, optional) – The observed fluence of the FRB. If
f_obs
is None and bothw_obs
ands_peak_obs
are not None thenf_obs
is automatically calculated byw_obs
xs_peak_obs
Units: \(\rm{Jy\ ms}\) Default: None - utc (str or None, optional) – The UTC time of the FRB Burst. Default: None
- dm_uncert (float, optional) – The uncertainty in the dispersion measure. Units: \(\rm{pc\ cm^{-3}}\) Default: 0.0
- z_uncert (float, optional) – The uncertainty in the redshift of the FRB. Default: 0.0
Example
>>> import fruitbat >>> FRB = fruitbat.Frb(879, gl="12:31:40.5", gb="3:41:10.0") >>> FRB.calc_dm_galaxy() >>> FRB.calc_redshift()
-
calc_dm_excess
()[source]¶ Calculates the dispersion measure excess of the FRB by subtracting the DM contribution from the Milky Way.
Returns: dm_excess – The dispersion measure excess. Return type: float Notes
\(\rm{DM_{excess}}\) is calculated as follows:
\[DM_{excess} = DM - DM_{galaxy}\]
-
calc_dm_galaxy
(model='ymw16')[source]¶ Calculates the dispersion measure contribution of the Milky Way from either (
raj
,decj
) or (gl
,gb
).Parameters: model (str, optional) – The Milky Way dispersion measure model. Default: ymw16
-
calc_dm_igm
()[source]¶ Calculates the dispersion measure of the intergalactic medium along the line-of-sight of the FRB. This can only be done if the redshift and dispersion measure contribution of the FRB host galaxy is known.
Returns: dm_igm – The dispersion measure contribution of the IGM. Return type: float Notes
\(DM_{IGM}\) is calculated as follows:
\[DM_{IGM} = DM_{excess} - \frac{DM_{host,loc}}{1 + z}\]
-
calc_f_obs
()[source]¶ Calculates the observed fluence of the FRB. This requires
w_obs
ands_peak_obs
to not be None.Returns: The fluence of the FRB. Return type: float Notes
\(\rm{F_{obs}}\) is calculated as follows:
\[\rm{F_{obs} = W_{obs} \times S_{peak, obs}}\]
-
calc_redshift
(method='inoue2004', cosmology='Planck18', subtract_host=False)[source]¶ Calculate the redshift of the FRB from its
dm
,dm_excess
ordm_excess
-dm_host_est
.Parameters: - method (str, optional) – The approximation to use when calculating the redshift. Avaliable methods: ioka2003, inoue2004, zhang2018
- cosmology (str, optional) – The method inoue2004 has the option to choose which cosmology to assume when performing the redshift estimation. Avaliable cosmologies: WMAP5, WMAP7, WMAP9, Planck13, Planck15, Planck18
- subtract_host (bool, optional) – Subtract
dm_host_est
from thedm_excess
before calculating the redshift. This is is used to account for the dispersion measure that arises from the FRB host galaxy.
Returns: The redshift of the FRB.
Return type: float
-
calc_skycoords
()[source]¶ Calculates the skycoord position on the sky of the FRB from (
raj
,decj
) or (gl
,gb
).Returns: The sky coordinates of the FRB. Return type: astropy.coordinates.sky_coordinate.SkyCoord
-
decj
¶ astropy.coordinates.angles.Latitude or None – The declination in J2000 coordinates of the best estimate of the FRB position.
-
dm
¶ float – The observed dispersion measure of the FRB.
-
dm_excess
¶ float – The dispersion measure with the Milky Way component subtracted.
-
dm_galaxy
¶ float – The Milky Way component of the dispersion measure.
-
dm_host_est
¶ float – The dispersion measure from the FRB host galaxy
-
dm_host_loc
¶ float – The dispersion measure from a localised FRB host galaxy
-
dm_igm
¶
-
f_obs
¶ The Milky Way component of the dispersion measure.
-
gb
¶ astropy.coordinates.angles.Latitude or None – The latitude in galactic coordinates of the best estimate of the FRB position.
-
gl
¶ astropy.coordinates.angles.Longitude or None – The longitude in galactic coordinates of the best estimate of the FRB position.
-
name
¶ str – The name of the FRB object.
-
raj
¶ astropy.coordinates.angles.Longitude or None – The right accension in J2000 coordinates of the best estimate of the FRB position.
-
skycoords
¶ astropy.coordinates.sky_coordinate.SkyCoord or None – The skycoords of the FRB. This is calculated from either (
raj
,decj
) or (gl
,gb
).
-
w_obs
¶ float or None – The observed width of the pulse obtained by a pulse fitting algorithm. Units: \(\rm{ms}\)
-
z
¶ float or None – The estimated redshift of the burst. By default this assumes that the entire
dm_excess
arrives from the IGM and the host galaxy of the FRB and any surrounding material contribute nothing to the total DM. This should be taken as an upper limit to the bursts true redshift. To provide an estimate of the DM contribution due to he host galaxy, setdm_host_est
to a non-zero value and usesubract_host=True
when usingcalc_redshift()
.
-
z_host
¶ float or None – The redshift of the localised FRB host galaxy. Note that this an observed quantity, not the estimated redshift
z
calculated withcalc_redshift()