Skip to content

Commit

Permalink
No longer have redshift_flag info
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergagliano committed Oct 25, 2023
1 parent fe45bcb commit b6df368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions astro_ghost/DLR.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,17 @@ def chooseByGladeDLR(path, fn, snDF, verbose=False, todo='r', GWGC=None):
foundHostDF = pd.concat(foundHostDF, ignore_index=True)
# adding some relevant redshift information
foundHostDF['GLADE_redshift'] = np.nan
foundHostDF['GLADE_redshift_flag'] = ''
#foundHostDF['GLADE_redshift_flag'] = ''

for idx, row in foundHostDF.iterrows():
if row['Dist'] == row['Dist']:
dist = Distance(value=row['Dist'], unit=u.Mpc)
calc_z = z_at_value(cosmo.luminosity_distance, dist, zmin=1.e-5, zmax=1, method='Bounded').value
foundHostDF['GLADE_redshift'] = calc_z
if row['Flag'] <= 3:
foundHostDF['GLADE_redshift_flag'] = 'SPEC'
else:
foundHostDF['GLADE_redshift_flag'] = 'PHOT'
#if row['Flag'] <= 3:
# foundHostDF['GLADE_redshift_flag'] = 'SPEC'
#else:
# foundHostDF['GLADE_redshift_flag'] = 'PHOT'
#print some relevant information to terminal
print("Found %i hosts in GLADE! See %s for details."%(len(foundHostDF), fn))
if todo == "s":
Expand Down
2 changes: 1 addition & 1 deletion astro_ghost/NEDQueryFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def getNEDInfo(df):
df.loc[index, 'NED_type'] = result_df['Type'].values[0]
df.loc[index, 'NED_vel'] = result_df['Velocity'].values[0]
df.loc[index, 'NED_redshift'] = result_df['Redshift'].values[0]
df.loc[index, 'NED_mag'] = result_df['Redshift Flag'].values[0]
df.loc[index, 'NED_redshift_flag'] = result_df['Redshift Flag'].values[0]

# if the method fails for many in a row, it's likely that too many queries have been made.
if missingCounter > 5000:
Expand Down

0 comments on commit b6df368

Please sign in to comment.