Galaxy Utilities
Utilities related to FRB galaxies
- frb.galaxies.utils.deredden_spec(spectrum, ebv: float)[source]
Deredden the input spectrum using the input EBV value
- Args:
spectrum (xspectrum1d.XSpectrum1D) – Spectrum
ebv (float) – Galactic reddening
- Returns:
De-reddened spectrum
- Return type:
xspectrum1d.XSpectrum1D
- frb.galaxies.utils.load_specdb(specdb_file=None)[source]
Automatically load the specDB file from $SPECDB/FRB_specDB.hdf5
- Args:
specdb_file (str, optional) – Over-ride the default file
- Return type:
specdb.specdb.SpecDB
- frb.galaxies.utils.list_of_hosts(skip_bad_hosts=True, verbose: bool = False)[source]
Scan through the Repo and generate a list of FRB Host galaxies
Also returns a list of the FRBs
- frb.galaxies.utils.build_table_of_hosts(attrs: list = None)[source]
Generate a Pandas table of FRB Host galaxy data. These are slurped from the ‘derived’, ‘photom’, and ‘neb_lines’ dicts of each host object
- Warning: As standard, missing values are given NaN in the Pandas table
Be careful!
Note
RA, DEC are given as RA_host, DEC_host to avoid conflict with the FRB table
Args:
- Returns:
Table of data on FRB host galaxies, dict of their units
- Return type:
pd.DataFrame, dict
- frb.galaxies.utils.load_f_mL()[source]
Generate an interpolater from mag to Luminosity as a function of redshift (up to z=4)
Warning: this is rather approximate
- Return type:
scipy.interpolate.interp1d
- frb.galaxies.utils.load_PATH(PATH_root_file: str = 'adopted.csv')[source]
Load up the PATH table
- Args:
PATH_root_file (str, optional) – [description]. Defaults to ‘adopted.csv’.
- Returns:
Table of galaxy coordinates and PATH results
- Return type:
pandas.DataFrame
Note
The load_specdb() function requires the optional
specdb package. Install with: pip install specdb