Skip to content

Commit

Permalink
Merge branch 'release/0.7.0' (PR #43)
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Apr 8, 2020
2 parents f7bcd49 + 64c0eba commit 466e62b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 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 @@ -97,6 +102,11 @@ def main(fitspath, dataset, revised=False, det3=True):
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:
metal_dict = metallicity_calculation(adopted_temp, O2/Hb, O3/Hb)
else:
Expand All @@ -106,8 +116,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]
names0 = [ID_name, bin_ID_name, temp_metal_names0[0]]
arr0 = [indv_em_line_table[ID_name], bin_id_indv, logR23, logO32,
two_beta, three_beta, adopted_temp]
names0 = [ID_name, bin_ID_name, logR23_name, logO32_name, two_beta_name,
three_beta_name, temp_metal_names0[0]]

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

0 comments on commit 466e62b

Please sign in to comment.