opticam.mef_slice

Classes

MEFSlice

Helper class to represent a slice of a Multi-extension FITS (MEF) file.

Functions

create_file_paths(data_directory)

Given a directory, return all the (multi-extension) FITS file paths and extension numbers.

Module Contents

class opticam.mef_slice.MEFSlice

Helper class to represent a slice of a Multi-extension FITS (MEF) file.

Parameters

pathPath

The file path.

extint

The slice’s extension number.

path: pathlib.Path
ext: int
property key: str

The file path and extension number combined to create a uniquely identifiable string.

Returns

str

The uniquely identifiable string.

Return type:

str

get_header()

Get the slice’s header.

Returns

Header

The slice’s header.

Return type:

astropy.io.fits.Header

get_data()

Get the slice’s data.

Returns

NDArray[np.float64]

The slice’s data.

Return type:

numpy.typing.NDArray[numpy.float64]

get_data_and_header()

Get the slice’s data and header.

Returns

tuple[NDArray[np.float64], Header]

The slice’s data and header.

Return type:

tuple[numpy.typing.NDArray[numpy.float64], astropy.io.fits.Header]

opticam.mef_slice.create_file_paths(data_directory)

Given a directory, return all the (multi-extension) FITS file paths and extension numbers.

Parameters

data_directoryPath

The directory containing one or more (multi-extension) FITS files.

Returns

list[MEFSlice]

The list of (multi-extension) FITS slices.

Parameters:

data_directory (pathlib.Path)

Return type:

list[MEFSlice]