Skip to content

Commit

Permalink
analysis.composite_indv_detect.main: Use definition for composite_fil…
Browse files Browse the repository at this point in the history
…e (iss #21)
  • Loading branch information
astrochun committed Mar 15, 2020
1 parent 4b586bd commit bb5f680
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Metallicity_Stack_Commons/analysis/composite_indv_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
from ..temp_metallicity_calc import metallicity_calculation
from .. import OIII_r
from ..column_names import bin_names0, indv_names0, temp_metal_names0
from ..column_names import filename_dict

ID_name = indv_names0[0]
bin_ID_name = bin_names0[0]


def main(fitspath, dataset, composite_file, indv_em_line_file, indv_bin_file, outfile, det3=True):
def main(fitspath, dataset, indv_em_line_file, indv_bin_file, outfile,
revised=False, det3=True):
"""
Purpose:
Reads in composite table(s) containing bin information to
Expand All @@ -22,9 +24,11 @@ def main(fitspath, dataset, composite_file, indv_em_line_file, indv_bin_file, ou
:param fitspath: str containing folder path
:param dataset: str containing sub-folder (specific to stacking approach)
:param composite_file: str containing filename of composite data
e.g., '[dataset]/bin_derived_properties.tbl' or
'[dataset]/bin_derived_properties.revised.tbl'
Files identified by default
composite_file: str containing filename of composite data
e.g., '[dataset]/bin_derived_properties.tbl' or
'[dataset]/bin_derived_properties.revised.tbl'
:param indv_em_line_file: str containing filename that contains
emission-line information for each galaxy
e.g., 'individual_properties.tbl'
Expand All @@ -38,6 +42,13 @@ def main(fitspath, dataset, composite_file, indv_em_line_file, indv_bin_file, ou
Default: True
"""

t_comp = filename_dict['bin_derived_prop'] if not revised else \
filename_dict['bin_derived_prop']
composite_file = os.path.join(fitspath, dataset, t_comp)
if not exists(composite_file):
print("ERROR: File not found"+composite_file)
return

# Read in composite table
composite_table = asc.read(composite_file)

Expand Down

0 comments on commit bb5f680

Please sign in to comment.