cana.composition.constants

Handle Optical Constants.

Functions

read_constant(filename[, label]) Read optical constant file.
read_constant_batch(filelist[, labels]) Read optical constant file.

Classes

OpticalConstant(w, n, k, label) Optical Constant Class.
class cana.composition.constants.OpticalConstant(w: numpy.ndarray, n: numpy.ndarray, k: numpy.ndarray, label: str = 'asteroid')[source]

Optical Constant Class.

Attributes:
shape

Return the shape of the Spectral Data.

Methods

copy([deep]) Return a copy of the object.
make_repr([maxlines, nlines]) Make representation of the Spectral Data.
plot() Visualization of Sample coeficients.
rebase(baseaxis) Interpolate spectra to a new axis.
save(fname[, fmt, delimiter, header, …]) Save the spectrum data into file.
sort([order]) Sort the Spectral data.
trim([w_low, w_up]) Trim to the desired wavelength range.
plot()[source]

Visualization of Sample coeficients.

cana.composition.constants.read_constant(filename, label=None, **kwargs)[source]

Read optical constant file.

The data should have 3 columns in the format: wavelength, n, k

Parameters:
filename: string

The path for the optical constant file

label: string (optional)

A label to used to identify the optical constant. If None will use the file basename as label. Default is None

grainsize: float (optional)
Returns:
Sample
cana.composition.constants.read_constant_batch(filelist, labels=None, **kwargs)[source]

Read optical constant file.

The data should have 3 columns in the format: wavelength, n, k

Parameters:
filename: string

The path for the optical constant file

label: string (optional)

A label to used to identify the optical constant. If None will use the file basename as label. Default is None

grainsize: float (optional)
Returns:
Sample