Metallicity_Stack_Commons package¶
Subpackages¶
analysis
subpackage- Submodules
- Metallicity_Stack_Commons.analysis.attenuation module
- Metallicity_Stack_Commons.analysis.composite_indv_detect module
- Metallicity_Stack_Commons.analysis.error_prop module
- Metallicity_Stack_Commons.analysis.fitting module
- Metallicity_Stack_Commons.analysis.ratios module
- Metallicity_Stack_Commons.analysis.temp_metallicity_calc module
- Module contents
others
subpackageplotting
subpackage
Submodules¶
Common functions¶
- Metallicity_Stack_Commons.dir_date(folder_name, path_init='', year=False, verbose=False, log=<Logger stdout_logger (INFO)>)¶
This function finds and returns the path to a directory named after the current date (MMDDYYYY). If the directory doesn’t exist yet, it creates a new directory named after the current date in the provided
folder_name
directory.Originally from https://github.com/rafia37/Evolution-of-Galaxies/blob/master/general.py
- Usage:
fitspath = dir_date(folder_name, year=True)
- Parameters
folder_name (
str
) – Directory for date subdirectory will be inpath_init (
str
) – root path. Default: empty stringyear (
bool
) – Indicate whether to include year in date folder. Default: Falseverbose (
bool
) – Write verbose message to stdout. Default: file onlylog (
Logger
) – logging.Logger object
- Return type
str
- Returns
Full path to the date directory
- Metallicity_Stack_Commons.exclude_outliers(objno, verbose=False, log=<Logger stdout_logger (INFO)>)¶
Exclude spectra that are identified as outliers.
Generally this is because the spectra have very high S/N on the continuum.
- Parameters
objno (
Union
[list
,ndarray
]) – Array of eight-digit identifierverbose (
bool
) – Write verbose message to stdout. Default: file onlylog (
Logger
) – logging.Logger object
- Return type
ndarray
- Returns
Array of zeros (not flagged) and ones (flagged
- Metallicity_Stack_Commons.get_user(username=None, verbose=False, log=<Logger stdout_logger (INFO)>)¶
Get the corresponding path for a given
username
- Parameters
username (
Optional
[str
]) – Optional input for usernameverbose (
bool
) – Write verbose message to stdout. Default: file onlylog (
Logger
) – logging.Logger object
- Return type
str
- Returns
Full path to the date directory