Skip to content

Commit

Permalink
analysis.composite_indv_detect.main: Include logR23, logO32, two_beta…
Browse files Browse the repository at this point in the history
…, three_beta (iss #21)
  • Loading branch information
astrochun committed Mar 19, 2020
1 parent 5188bf8 commit 4aa1c08
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Metallicity_Stack_Commons/analysis/composite_indv_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
ID_name = indv_names0[0]
bin_ID_name = bin_names0[0]

logR23_name = indv_names0[1]
logO32_name = indv_names0[2]
two_beta_name = indv_names0[5]
three_beta_name = indv_names0[6]


def main(fitspath, dataset, revised=False, det3=True):
"""
Expand Down Expand Up @@ -94,11 +99,17 @@ def main(fitspath, dataset, revised=False, det3=True):

O2 = indv_em_line_table['OII_3727_Flux_Gaussian'].data # [OII]3726,3728 fluxes
O3 = indv_em_line_table['OIII_5007_Flux_Gaussian'].data # [OIII]5007 fluxes
O3 = O3 * (1+1/OIII_r) #Scale to include OIII4959; Assume 3.1:1 ratio
O3 = O3 * (1+1/OIII_r) # Scale to include OIII4959; Assume 3.1:1 ratio
Hb = indv_em_line_table['HBETA_Flux_Gaussian'].data # H-beta fluxes

two_beta = O2/Hb
three_beta = O3/Hb
logR23 = np.log10(two_beta + three_beta)
logO32 = np.log10(O3/O2)

if not det3:
com_O_log, metal_dict = metallicity_calculation(adopted_temp, O2/Hb, O3/Hb)
com_O_log, metal_dict = \
metallicity_calculation(adopted_temp, two_beta, three_beta)
else:
det3 = np.where((detect_indv == 1.0) | (detect_indv == 0.5))[0]
temp_com_O_log, temp_metal_dict = \
Expand All @@ -114,8 +125,10 @@ def main(fitspath, dataset, revised=False, det3=True):

# Define [indv_derived_prop_table] to include ID, bin_ID, composite T_e,
# and 12+log(O/H)
arr0 = [indv_em_line_table[ID_name], bin_id_indv, adopted_temp, com_O_log]
names0 = [ID_name, bin_ID_name] + temp_metal_names0[:2]
arr0 = [indv_em_line_table[ID_name], bin_id_indv, logR23, logO32,
two_beta, three_beta, adopted_temp, com_O_log]
names0 = [ID_name, bin_ID_name, logR23_name, logO32_name, two_beta_name,
three_beta_name] + temp_metal_names0[:2]

# Include other metallicities
arr0 += list(metal_dict.values())
Expand Down

0 comments on commit 4aa1c08

Please sign in to comment.