Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions frb/builds/build_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ def run(host_input:pandas.core.series.Series,
continue
# Load table
sub_tbl = read_lit_table(lit_entry, coord=Host.coord)
#embed(header='Check the table 298')
if sub_tbl is not None:
# Add References, unless the value is masked
for key in sub_tbl.keys():
Expand Down Expand Up @@ -446,6 +447,7 @@ def run(host_input:pandas.core.series.Series,
project_list, ref_list, '_galight.json',
prefix=file_root+'_'+host_input.Galfit_filter)
if not found_galfit:
embed(header='Check 450')
raise IOError(f"Galfit file with filter {host_input.Galfit_filter} not found!")
print(f"Galfit analysis slurped in via: {galfit_file}")
Host.parse_galfit(galfit_file)
Expand Down Expand Up @@ -486,6 +488,18 @@ def run(host_input:pandas.core.series.Series,
hikey = key.replace('lo', 'up')
Host.derived[hikey] = float(lit_tbl[hikey].data[0])

# Add PATH
hosts_file = importlib_resources.files('frb.data.Galaxies')/'public_hosts.csv'
hosts_df = pandas.read_csv(hosts_file, index_col=False)

indx = file_root == 'HG'+hosts_df.FRB.values
if np.any(indx):
# Get the row
host_row = hosts_df.loc[indx].iloc[0]
# Set P_Ox
Host.path['P_Ox'] = host_row.P_Ox
# Reference would go here

# Vet all
assert Host.vet_all()

Expand Down
19 changes: 9 additions & 10 deletions frb/builds/build_path.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Top-level module to build or re-build the JSON files for
""" Top-level module to run PATH analysis on a list of
FRB host galaxies"""

from importlib.resources import files
Expand All @@ -8,14 +8,16 @@

from astropy.coordinates import SkyCoord

from astropath.priors import load_std_priors
try:
from astropath.priors import load_std_priors
except ModuleNotFoundError:
print("astropath not installed; install it to builld PATH")
else:
from frb.associate import frbassociate
from frb.associate import frbs

from frb.frb import FRB

from frb.associate import frbassociate
from frb.associate import frbs
from frb.galaxies import hosts

from frb import utils

from IPython import embed
Expand Down Expand Up @@ -143,6 +145,7 @@ def main(options:str=None, frb:str=None):
Args:
options (str, optional): [description]. Defaults to None.
frb (str, optional): FRB name
If None, will read the public host table and run on those
"""
# Read public host table
if frb is None:
Expand All @@ -154,10 +157,6 @@ def main(options:str=None, frb:str=None):
else:
# Generate the list
frb_list = frb.split(',')
#ifrb = [FRB.by_name(ifrb) for ifrb in frbs]
#host = ifrb.grab_host()
#frb_list = [ifrb.frb_name]
#host_coords = [host.coord]

# Load prior
priors = load_std_priors()
Expand Down
10 changes: 7 additions & 3 deletions frb/builds/build_specdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
from astropy import units
from astropy.table import Table, vstack

from specdb import defs
from specdb.build import privatedb as pbuild
from specdb.build import utils as spbu
try:
from specdb import defs
except (ImportError, ModuleNotFoundError):
print("No specdb module found, please install specdb if you wish to build specdb")
else:
from specdb.build import privatedb as pbuild
from specdb.build import utils as spbu

from frb.surveys import sdss

Expand Down
30 changes: 30 additions & 0 deletions frb/data/FRBs/FRB20171020A.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"DM": {
"unit": "pc / cm3",
"value": 114.1
},
"DMISM": {
"unit": "pc / cm3",
"value": 37.46616994198802
},
"DM_err": {
"unit": "pc / cm3",
"value": 0.2
},
"FRB": "FRB20171020A",
"cosmo": "Planck18",
"dec": -19.66978611,
"eellipse": {
"a": 600.0,
"b": 600.0,
"cl": 68.0,
"theta": 0.0
},
"ra": 333.8272917,
"refs": [
"Shannon2018",
"Mahony2018"
],
"repeater": false,
"z": 0.00867
}
24 changes: 24 additions & 0 deletions frb/data/FRBs/FRB20240117A.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"DM": {
"unit": "pc / cm3",
"value": 880.0
},
"DMISM": {
"unit": "pc / cm3",
"value": 30.84008909618122
},
"FRB": "FRB20240117A",
"cosmo": "Planck18",
"dec": -15.85249361,
"eellipse": {
"a": 0.697,
"b": 0.472,
"cl": 68.0,
"theta": 0.0
},
"ra": 3.59186806,
"refs": [
"Muller25"
],
"repeater": false
}
357 changes: 179 additions & 178 deletions frb/data/FRBs/FRBs_base.csv

Large diffs are not rendered by default.

77 changes: 40 additions & 37 deletions frb/data/Galaxies/20121102A/FRB20121102A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dec": 33.14789805555556,
"dec_FRB": 33.14793156,
"derived": {
"AV_nebular": -0.14987551477721286,
"AV_nebular": -0.16167399704951668,
"AV_old": 0.11,
"AV_old_loerr": 0.06,
"AV_old_ref": "Gordon2023",
Expand Down Expand Up @@ -43,7 +43,7 @@
"SFR_SED_loerr": 0.01,
"SFR_SED_ref": "Gordon2023",
"SFR_SED_uperr": 0.02,
"SFR_nebular": 0.13176802257889894,
"SFR_nebular": 0.13030556188049094,
"SFR_photom": 0.002035787096368971,
"SFR_photom_err": 0.005813702135185201,
"SMStar": 13035903.263379255,
Expand Down Expand Up @@ -128,64 +128,67 @@
"[OIII] 5007_ref": "Tendulkar2017"
},
"offsets": {
"ang_avg": 0.22739060490950594,
"ang_avg_err": 0.015495695605799073,
"ang_best": 0.22687098663780167,
"ang_best_err": 0.015504405356409817,
"physical": 0.7510479525383023,
"physical_err": 0.05132675654488136
"ang_avg": 0.22739060492236665,
"ang_avg_err": 0.015495695605786343,
"ang_best": 0.2268709866506913,
"ang_best_err": 0.015504405356396151,
"physical": 0.7510479525809729,
"physical_err": 0.05132675654483613
},
"path": {
"P_Ox": 1.0
},
"photom": {
"EBV": 0.6798,
"GMOS_N_g": 23.329214463965435,
"GMOS_N_g": 23.37173941487555,
"GMOS_N_g_err": 0.12,
"GMOS_N_g_flux": 0.0016916643951493313,
"GMOS_N_g_flux_err": 0.00019769339537188934,
"GMOS_N_g_flux": 0.0016266878705262977,
"GMOS_N_g_flux_err": 0.0001797881875981479,
"GMOS_N_g_ref": "Bassa2017",
"GMOS_N_i": 23.538006459003054,
"GMOS_N_i": 23.470412432617216,
"GMOS_N_i_err": 0.09,
"GMOS_N_i_flux": 0.0013957171362773684,
"GMOS_N_i_flux_err": 0.00012062572389579638,
"GMOS_N_i_flux": 0.0014853712757988892,
"GMOS_N_i_flux_err": 0.0001231269752597785,
"GMOS_N_i_ref": "Bassa2017",
"GMOS_N_r": 23.730606922036774,
"GMOS_N_r": 23.709083581668537,
"GMOS_N_r_err": 0.14,
"GMOS_N_r_flux": 0.0011688458130394571,
"GMOS_N_r_flux_err": 0.0001608650767947018,
"GMOS_N_r_flux": 0.0011922478875840414,
"GMOS_N_r_flux_err": 0.00015373412393386067,
"GMOS_N_r_ref": "Bassa2017",
"GMOS_N_z": 23.4892120964504,
"GMOS_N_z": 23.4253450166459,
"GMOS_N_z_err": 0.13,
"GMOS_N_z_flux": 0.0014598732663756548,
"GMOS_N_z_flux_err": 0.0001856921658216167,
"GMOS_N_z_flux": 0.0015483245060917746,
"GMOS_N_z_flux_err": 0.00018538774419590303,
"GMOS_N_z_ref": "Bassa2017",
"MMIRS_J": 23.508388643967457,
"MMIRS_J": 23.457063524590936,
"MMIRS_J_err": 0.5085084168,
"MMIRS_J_flux": 0.0014343149882309072,
"MMIRS_J_flux_err": 0.000856805365110051,
"MMIRS_J_flux": 0.001503746343972243,
"MMIRS_J_flux_err": 0.0007042849536480726,
"MMIRS_J_ref": "Gordon2023",
"MMIRS_K": 23.733094608431887,
"MMIRS_K": 23.696543121968844,
"MMIRS_K_err": 0.5892336803,
"MMIRS_K_flux": 0.0011661707680265037,
"MMIRS_K_flux_err": 0.0008404052761181673,
"MMIRS_K_flux": 0.0012060984115958677,
"MMIRS_K_flux_err": 0.000654554764549769,
"MMIRS_K_ref": "Gordon2023",
"Spitzer_3.6": 23.79419590236575,
"Spitzer_3.6": 23.775211690225486,
"Spitzer_3.6_err": 0.20028143582916946,
"Spitzer_3.6_flux": 0.0011023553986591553,
"Spitzer_3.6_flux_err": 0.00022331087550180273,
"Spitzer_3.6_flux": 0.0011217996965718052,
"Spitzer_3.6_flux_err": 0.00020693392461033295,
"Spitzer_3.6_ref": "Bassa2017",
"Spitzer_4.5": 24.717447113669405,
"Spitzer_4.5": 24.70006282754616,
"Spitzer_4.5_err": 999.0,
"Spitzer_4.5_flux": 0.00047100026212537106,
"Spitzer_4.5_flux": 0.0004786023902795443,
"Spitzer_4.5_flux_err": -99.0,
"Spitzer_4.5_ref": "Bassa2017",
"WFC3_F110W": 23.081347094514243,
"WFC3_F110W": 23.02755754490239,
"WFC3_F110W_err": 0.012,
"WFC3_F110W_flux": 0.002125500230932293,
"WFC3_F110W_flux_err": 2.3622197326669726e-05,
"WFC3_F110W_flux": 0.002233453815479198,
"WFC3_F110W_flux_err": 2.4685043814782763e-05,
"WFC3_F110W_ref": "Bassa2017",
"WFC3_F160W": 22.962270841633313,
"WFC3_F160W": 22.91542642756748,
"WFC3_F160W_err": 0.03,
"WFC3_F160W_flux": 0.0023718742357549238,
"WFC3_F160W_flux_err": 6.645113570741157e-05,
"WFC3_F160W_flux": 0.0024764491979752637,
"WFC3_F160W_flux_err": 6.842682008177884e-05,
"WFC3_F160W_ref": "Bassa2017"
},
"positional_error": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"FRB": "FRB20171020",
"FRB": "FRB20171020A",
"cosmo": "Planck18",
"dec": -19.586,
"dec_FRB": -19.66978611111111,
"dec_FRB": -19.66978611,
"derived": {
"M_r": -17.9,
"M_r_err": 0.1,
Expand All @@ -15,15 +15,18 @@
"SFR_nebular_ref": "Mahony2018"
},
"offsets": {
"ang_avg": 802.3114040934199,
"ang_avg_err": 417.47553833878595,
"ang_best": 313.04950185295974,
"ang_best_err": 643.1664124433216,
"physical": 57.68533434653865,
"physical_err": 118.5156638891039
"ang_avg": 802.3113933098031,
"ang_avg_err": 417.4755334899458,
"ang_best": 313.04946774943465,
"ang_best_err": 643.1664270356115,
"physical": 57.685328062314476,
"physical_err": 118.51566657801129
},
"path": {
"P_Ox": 0.0
},
"ra": 333.8519999999999,
"ra_FRB": 333.8272916666666,
"ra_FRB": 333.8272917,
"redshift": {
"z": 0.00867,
"z_FRB": 0.00867,
Expand Down
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230203A/FRB20230203A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"ra": 151.66383333333332,
"ra_FRB": 151.661594,
"redshift": {
"z": "0.1464",
"z_FRB": "0.1464",
"z_spec": "0.1464"
"z": 0.1464,
"z_FRB": 0.1464,
"z_spec": 0.1464
}
}
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230222A/FRB20230222A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"ra": 106.96049999999997,
"ra_FRB": 106.960358,
"redshift": {
"z": "0.1223",
"z_FRB": "0.1223",
"z_spec": "0.1223"
"z": 0.1223,
"z_FRB": 0.1223,
"z_spec": 0.1223
}
}
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230222B/FRB20230222B_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
"ra": 238.73795833333332,
"ra_FRB": 238.739123,
"redshift": {
"z": "0.11",
"z_FRB": "0.11",
"z_spec": "0.11"
"z": 0.11,
"z_FRB": 0.11,
"z_spec": 0.11
}
}
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230311A/FRB20230311A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"ra": 91.11045833333331,
"ra_FRB": 91.109662,
"redshift": {
"z": "0.1918",
"z_FRB": "0.1918",
"z_spec": "0.1918"
"z": 0.1918,
"z_FRB": 0.1918,
"z_spec": 0.1918
}
}
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230703A/FRB20230703A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"ra": 184.62279166666667,
"ra_FRB": 184.624449,
"redshift": {
"z": "0.1184",
"z_FRB": "0.1184",
"z_spec": "0.1184"
"z": 0.1184,
"z_FRB": 0.1184,
"z_spec": 0.1184
}
}
6 changes: 3 additions & 3 deletions frb/data/Galaxies/20230730A/FRB20230730A_host.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"ra": 54.66491666666666,
"ra_FRB": 54.664564,
"redshift": {
"z": "0.2115",
"z_FRB": "0.2115",
"z_spec": "0.2115"
"z": 0.2115,
"z_FRB": 0.2115,
"z_spec": 0.2115
}
}
Loading