opticam.utils.helpers

Functions

camel_to_snake(string)

Convert a camelCase string to snake_case.

sort_filters(d)

Sort a dictionary whose keys are filter names in the order of the camera filters (e.g., u/g, r, i/z).

create_file_paths([data_directory, c1_directory, ...])

Given some directories, get the paths to all available FITS files.

Module Contents

opticam.utils.helpers.camel_to_snake(string)

Convert a camelCase string to snake_case.

Parameters

stringstr

The camelCase string to convert.

Returns

str

The converted snake_case string.

Parameters:

string (str)

Return type:

str

opticam.utils.helpers.sort_filters(d)

Sort a dictionary whose keys are filter names in the order of the camera filters (e.g., u/g, r, i/z).

Parameters

dDict[str, Any]

A dictionary with filter names as keys.

Returns

Dict[str, Any]

The sorted dictionary.

Parameters:

d (Dict[str, Any])

Return type:

Dict[str, Any]

opticam.utils.helpers.create_file_paths(data_directory=None, c1_directory=None, c2_directory=None, c3_directory=None)

Given some directories, get the paths to all available FITS files.

Parameters

data_directoryNone | str, optional

The directory containing the FITS files of all three cameras, by default None.

c1_directoryNone | str, optional

The directory containing the FITS files of Camera 1, by default None.

c2_directoryNone | str, optional

The directory containing the FITS files of Camera 2, by default None.

c3_directoryNone | str, optional

The directory containing the FITS files of Camera 3, by default None.

Returns

List[str]

The file paths.

Parameters:
  • data_directory (None | str)

  • c1_directory (None | str)

  • c2_directory (None | str)

  • c3_directory (None | str)

Return type:

List[str]