Skip to content

Commit

Permalink
plotting.balmer.extract_fit: Fix memory caching for single entries fr…
Browse files Browse the repository at this point in the history
…om astropy tables (iss #10)
  • Loading branch information
astrochun committed Jun 5, 2020
1 parent 0cf7167 commit d9238d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Metallicity_Stack_Commons/plotting/balmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ def extract_fit(astropy_table, line_name, balmer=False):
"""

try:
astropy_table[line_name + '_Center'].data
astropy_table[line_name + '_Center']
except KeyError:
print("Line not present in table")
print("Exiting!!!")
return

xbar = astropy_table[line_name + '_Center'].data
sp = astropy_table[line_name + '_Sigma'].data
ap = astropy_table[line_name + '_Norm'].data
con = astropy_table[line_name + '_Median'].data
xbar = astropy_table[line_name + '_Center']
sp = astropy_table[line_name + '_Sigma']
ap = astropy_table[line_name + '_Norm']
con = astropy_table[line_name + '_Median']

param_list = [xbar, sp, ap, con]

if balmer:
sn = astropy_table[line_name + '_Abs_Sigma'].data
an = astropy_table[line_name + '_Abs_Norm'].data
sn = astropy_table[line_name + '_Abs_Sigma']
an = astropy_table[line_name + '_Abs_Norm']

param_list += [sn, an]

Expand Down

0 comments on commit d9238d5

Please sign in to comment.