Metallicity_Stack_Commons.column_names module¶
-
Metallicity_Stack_Commons.column_names.
indv_M_LHb
()¶ Use remove_from_list() to provide simplified list that contains ID, logM and logLHb
- Return type
list
- Returns
List containing just ID, logM, logLHb
-
Metallicity_Stack_Commons.column_names.
indv_R23_O32
()¶ Use remove_from_list() to provide simplified list that contains ID, logR23 and logO32
- Return type
list
- Returns
List containing just ID, logR23, logO32
-
Metallicity_Stack_Commons.column_names.
line_fit_suffix_add
(line_name0, line_type0)¶ Simple list comprehension combining emission line fit suffixes with the emission line. This works for individual lines
- Parameters
line_name0 (
str
) – Line nameline_type0 (
str
) – Emission-line type (e.g., ‘Balmer’)
- Return type
list
- Returns
List of strings formatted as [LINE]_[SUFFIX]
-
Metallicity_Stack_Commons.column_names.
merge_column_names
(*args)¶ Merges multiple lists containing column names.
- Usage:
column_names = merge_column_names(bin_names0, indv_names0)
- Parameters
args (
list
) – An undefined number of lists- Return type
list
- Returns
Merged list
-
Metallicity_Stack_Commons.column_names.
remove_from_list
(list0, remove_entries)¶ - Purpose:
Remove entries from list of column names
- Parameters
list0 (
list
) – List of column namesremove_entries (
list
) – List of column names to remove
- Return type
list
- Returns
List of column names after removal
Metallicity_Stack_Commons.logging module¶
-
class
Metallicity_Stack_Commons.logging.
LogClass
(log_dir, logfile)¶ Bases:
object
Main class to log information to stdout and ASCII logfile
- Note: This code is identical to the one used in ReQUIAM:
- To use:
log = LogClass(log_dir, logfile).get_logger()
- Parameters
log_dir (
str
) – Relative path for exported logfile directorylogfile (
str
) – Filename for exported log file
-
get_logger
()¶ - Return type
Logger
-
Metallicity_Stack_Commons.logging.
get_user_hostname
()¶ Retrieve user, hostname, IP, and OS configuration
- Return type
dict
- Returns
Dictionary with ‘user’ ‘hostname’ and ‘ip’ keys
-
Metallicity_Stack_Commons.logging.
log_stdout
()¶ Returns stdout logging object
- Return type
Logger
-
Metallicity_Stack_Commons.logging.
log_verbose
(log, message, verbose=False)¶ Log message depending on verbosity
- Parameters
log (
Logger
) – logging.Logger objectmessage (
str
) – Messageverbose (
bool
) – Write verbose message to stdout. Default: file only
Metallicity_Stack_Commons.update_det4363_info module¶
-
Metallicity_Stack_Commons.update_det4363_info.
get_index
(det4363_table, input_table, column_name, verbose=False, log=<Logger stdout_logger (INFO)>)¶ Uses either OBJNO or AP/SLIT info to get index for an existing table
- Parameters
det4363_table (
Table
) – Astropy table containing DEEP2 [OIII]4363-detected sampleinput_table (
Table
) – Astropy table containing the entire sample to be updatedcolumn_name (
str
) – Column name for cross-matchingverbose (
bool
) – Write verbose message to stdout. Default: file onlylog (
Logger
) – logging.Logger object
- Return type
Tuple
[ndarray
,ndarray
]- Returns
Index arrays for
det4363_table
,input_table
Metallicity_Stack_Commons.valid_table module¶
-
Metallicity_Stack_Commons.valid_table.
compare_to_by_eye
(fitspath, dataset)¶ This function takes the automated validation table and checks it against inputted measurement that are determined by eye. These inputted measurements are in the np.where statements. It outputs a revised validation table based on the inputted measurements.
- Usage:
valid_table.make_validation_table(fitspath, dataset)
- Parameters
fitspath (
str
) – Full file path where the input file is and where the output file will be placed.dataset (
str
) – Determine which eye measurements to use
- Outputs:
- fitspath + ‘bin_validation_revised.tbl’ and ‘.csv’
Validation table containing bin IDs; number of galaxies in each bin; and column indicating OIII4363 detection/non-detection, OIII4363_Flux_Observed, OIII4363_S/N, Notes
-
Metallicity_Stack_Commons.valid_table.
make_validation_table
(fitspath)¶ This function creates a validation table for a given binning set. The validation table contains a OIII4363 detection column where 1.0 means detection, 0.5 means non-detection with reliable OIII5007, and 0.0 means unreliable non-detection. This function will be run every time the analysis is completed and will create a validation table for every analysis.
- Usage:
valid_table.make_validation_table(fitspath, bin_type_str)
- Parameters
fitspath (
str
) – Full file path where the input file is and where the output file will be placed.
- Outputs:
- fitspath + ‘bin_validation.tbl’
Validation table containing bin IDs; number of galaxies in each bin; and column indicating OIII4363 detection/non-detection, OIII4363_Flux_Observed, OIII4363_S/N