Getting started¶
Installation¶
You can install the latest release of fruitbat
from PyPi by running
the following:
pip install fruitbat
You can install the latest deveopment version of fruitbat
by cloning
the repository:
git clone https://github.com/abatten/fruitbat
cd fruitbat
pip install .
Using Fruitbat¶
A detailed explanation of this example can be viewed at Using Fruitbat.
Example Calculation¶
import fruitbat
# Create a Frb Object with DM and Galactic Coordinates
FRB180110 = fruitbat.Frb("FRB180110", dm=715.7, gl="7.8", gb="-51.9")
# Calculate the DM contribution from the Milky Way
FRB180110.calc_dm_galaxy(model="ymw16")
# Calculate the Redshift of the FRB using the relation from Zhang (2018)
FRB180110.calc_redshift(method="zhang2018", cosmology="planck2018")