Skip to content

Commit

Permalink
column_names: Add line_fit_suffix_add function (iss #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Feb 25, 2020
1 parent b21b912 commit 96d73b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Metallicity_Stack_Commons/column_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,21 @@ def remove_from_list(list0, remove_entries):
dup_list0.remove(entry)

return dup_list0


def line_fit_suffix_add(line_name0, line_type0):
"""
Purpose:
Simple list comprehension combining emission line fit suffixes with
the emission line. This works for individual lines
:param line_name0: str containing the line name
:param line_type0: str containing the emisison-line type (e.g., 'Balmer')
:return: gauss_lines_names: list with str formatted as [LINE]_[SUFFIX]
"""

gauss_lines_names = ['{}_{}'.format(line_name0, suffix) for suffix in gauss_names0]
if line_type0 == 'Balmer':
gauss_lines_names += ['{}_{}'.format(line_name0, suffix) for suffix in balmer_names0]

return gauss_lines_names

0 comments on commit 96d73b4

Please sign in to comment.