From 4aa1c0830c6af46610804bb1fefc2452f6329940 Mon Sep 17 00:00:00 2001 From: Chun Ly Date: Wed, 18 Mar 2020 20:41:51 -0700 Subject: [PATCH] analysis.composite_indv_detect.main: Include logR23, logO32, two_beta, three_beta (iss #21) --- .../analysis/composite_indv_detect.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Metallicity_Stack_Commons/analysis/composite_indv_detect.py b/Metallicity_Stack_Commons/analysis/composite_indv_detect.py index a3c51f3..f8c3967 100644 --- a/Metallicity_Stack_Commons/analysis/composite_indv_detect.py +++ b/Metallicity_Stack_Commons/analysis/composite_indv_detect.py @@ -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): """ @@ -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 = \ @@ -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())