opticam.utils.logging
Functions
|
Configure the reduction logger. |
|
Log file_contents to a JSON file in out_directory/diag/. |
|
Recursively log parameters. |
|
Log the PSF parameters. |
Module Contents
- opticam.utils.logging.configure_logger(out_directory, verbose)
Configure the reduction logger.
Parameters
- out_directoryPath
The path to the directory in which the log file will be written.
- verbosebool
Whether to also output to stdout.
Returns
- Logger
The logger.
- Parameters:
out_directory (pathlib.Path)
verbose (bool)
- Return type:
logging.Logger
- opticam.utils.logging.log_file(out_directory, file_name, file_contents)
Log file_contents to a JSON file in out_directory/diag/.
Parameters
- out_directoryPath
The output directory.
- file_namestr
The name of the diagnostic file. A `.json’ suffix is automatically added.
- file_contentsdict[Any, Any]
The contents that will be saved to the file.
- Parameters:
out_directory (pathlib.Path)
file_name (str)
file_contents (dict[Any, Any])
- Return type:
None
- opticam.utils.logging.recursive_log(param, depth=0, max_depth=6)
Recursively log parameters.
Parameters
- paramAny
The parameter to log.
- depthint, optional
The parameter depth, by default 0.
- max_depthint, optional
The maximum parameter depth, by default 6. This prevents infinite recursion.
Returns
- Any
The logged parameter.
- Parameters:
param (Any)
depth (int)
max_depth (int)
- Return type:
Any
- opticam.utils.logging.log_psf_params(out_directory, psf_params, binning_scale, rebin_factor, pixel_scales)
Log the PSF parameters.
Parameters
- out_directorystr
The path to the output directory.
- psf_paramsdict[str, dict[str, float]]
The PSF parameters {filter: {PSF param: value}}.
- binning_scaleint
The observation binning scale.
- rebin_factorint
The software rebinning factor.
- pixel_scalesdict[str, float]
The pixel scale for each filter in arcsec/pixel {filter: pixel scale}.
- Parameters:
out_directory (pathlib.Path)
psf_params (dict[str, dict[str, float]])
binning_scale (int)
rebin_factor (int)
pixel_scales (dict[str, float])
- Return type:
None