From c5acfbd7930e4c285eb297d53dd81f6d7cc95e01 Mon Sep 17 00:00:00 2001 From: Chun Ly Date: Tue, 11 Feb 2020 17:02:49 -0700 Subject: [PATCH] analysis.composite_indv_detect.main: Pass in inputs for individual galaxy tables (iss #21) --- .../analysis/composite_indv_detect.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Metallicity_Stack_Commons/analysis/composite_indv_detect.py b/Metallicity_Stack_Commons/analysis/composite_indv_detect.py index 378eb28..d9b78f7 100644 --- a/Metallicity_Stack_Commons/analysis/composite_indv_detect.py +++ b/Metallicity_Stack_Commons/analysis/composite_indv_detect.py @@ -7,7 +7,7 @@ from ..temp_metallicity_calc import metallicity_calculation -def main(fitspath, dataset, composite_file, outfile, det3=True): +def main(fitspath, dataset, composite_file, indv_em_line_file, indv_bin_file, outfile, det3=True): """ Purpose: Reads in composite table(s) containing bin information to @@ -17,6 +17,14 @@ def main(fitspath, dataset, composite_file, outfile, det3=True): :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 + :param indv_em_line_file: str containing filename that contains + emission-line information for each galaxy + For Zcalbase_gal, file is: 'get_det3_table2.tbl' + For Evolution-of-Galaxies, file is: TBD + :param indv_bin_file: str containing filename tha contains bin information + for each galaxy + For Zcalbase_gal, file is: dataset+'_2d_binning_datadet3.tbl' + For Evolution-of-Galaxies, file is: TBD :param outfile: str containing filename of output file :param det3: Bool indies whether individual galaxy files is limited to those satisfying emission-line det3 requirement @@ -30,8 +38,8 @@ def main(fitspath, dataset, composite_file, outfile, det3=True): bin_temp = composite_table['Temperature'].data # Read in tables containing line ratios, bins, etc. - det3_table = asc.read(join(fitspath, 'get_det3_table2.tbl')) - bin_table = asc.read(join(fitspath, dataset+'_2d_binning_datadet3.tbl')) + det3_table = asc.read(join(fitspath, indv_em_line_file)) + bin_table = asc.read(join(fitspath, dataset+indv_bin_file)) # Not used for now # average_table = asc.read(join(fitspath, dataset+'_Average_R23_O32_Values.tbl'))