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