opticam.utils.logging

Functions

log_binnings(file_paths, out_directory)

Log the binning of each file to out_directory/diag/binnings.json.

log_filters(file_paths, out_directory)

Logs the filters used in each file to out_directory/diag/filters.json.

recursive_log(param[, depth, max_depth])

Recursively log parameters.

log_psf_params(out_directory, psf_params, ...)

Log the PSF parameters.

Module Contents

opticam.utils.logging.log_binnings(file_paths, out_directory)

Log the binning of each file to out_directory/diag/binnings.json.

Parameters

file_pathsList[str]

The paths to the files.

out_directorystr

The directory to save the log.

Parameters:
  • file_paths (List[str])

  • out_directory (str)

Return type:

None

opticam.utils.logging.log_filters(file_paths, out_directory)

Logs the filters used in each file to out_directory/diag/filters.json.

Parameters

file_pathsList[str]

The paths to the files.

out_directorystr

The directory to save the log.

Parameters:
  • file_paths (List[str])

  • out_directory (str)

Return type:

None

opticam.utils.logging.recursive_log(param, depth=0, max_depth=5)

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 5. 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)

Log the PSF parameters.

Parameters

out_directorystr

The path to the output directory.

psf_paramsDict[str, Dict[str, float]]

The PSF parameters.

binning_scaleint

The observation binning scale.

rebin_factorint

The software rebinning factor.

Parameters:
  • out_directory (str)

  • psf_params (Dict[str, Dict[str, float]])

  • binning_scale (int)

  • rebin_factor (int)

Return type:

None