Skip to content

Commit

Permalink
fixing DM_cosmic
Browse files Browse the repository at this point in the history
  • Loading branch information
profxj committed Aug 26, 2024
1 parent 70631c2 commit ad6f37f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frb/galaxies/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def load_specdb(specdb_file=None):
specdb_file = specdb_files[0]
print("Loading spectra from {:s}".format(specdb_file))
else:
raise IOError("There are no FRB_specdb.hdf5 files in your SPECDB folder")
raise IOError("There are no FRB_specDB_*.hdf5 files in your SPECDB folder")
# Load it up
specDB = SpecDB(db_file=specdb_file)
# Return
Expand Down
8 changes: 5 additions & 3 deletions frb/scripts/pz_dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ def main(pargs):
print("-----------------------------------------------------")
print(f"NE2001 = {DM_ISM:.2f}")

# DM extragalactic
DM_extragalactic = pargs.DM_FRB - DM_ISM.value - pargs.dm_host - pargs.dm_mwhalo
# DM cosmic and EG
DM_cosmic = pargs.DM_FRB - DM_ISM.value - pargs.dm_mwhalo
DM_extragalactic = DM_cosmic + pargs.dm_host

# Redshift estimates

Expand All @@ -74,7 +75,8 @@ def main(pargs):
PDM_z = sdict['PDM_z']
z = sdict['z']
DM = sdict['DM']
DM_cosmic = DM_extragalactic + pargs.dm_host #DM_cosmic = DM_extragalactic + DM_host

# Grab the right entry
iDM = np.argmin(np.abs(DM - DM_cosmic))
PzDM = PDM_z[iDM, :] / np.sum(PDM_z[iDM, :])

Expand Down

0 comments on commit ad6f37f

Please sign in to comment.