hypso.calibration

Submodules

Package Contents

Functions

crop_and_bin_matrix(matrix, x_start, x_stop, y_start, ...)

Crops matrix to AOI. Bins matrix so that the average value in the bin_x

calibrate_cube(info_sat, raw_cube, ...)

Radiometrically Calibrate the Raw Cube (digital counts) to Radiance

get_coefficients_from_dict(coeff_dict, satobj)

Get the coefficients from the csv files contained in a dictionary.

get_coefficients_from_file(coeff_path)

Get correction coefficients from file

smile_correct_cube(cube, correction_coefficients_dict)

Run smile correction on each frame in a cube, using the center row in the frame as the reference wavelength/band

destriping_correct_cube(cube, correction_coefficients_dict)

Apply destriping correction matrix.

hypso.calibration.crop_and_bin_matrix(matrix, x_start, x_stop, y_start, y_stop, bin_x=1, bin_y=1)

Crops matrix to AOI. Bins matrix so that the average value in the bin_x number of pixels is stored.

Return type:

numpy.ndarray

hypso.calibration.calibrate_cube(info_sat, raw_cube, correction_coefficients_dict)

Radiometrically Calibrate the Raw Cube (digital counts) to Radiance

Parameters:
  • info_sat (dict) – Dictionary containing capture information

  • raw_cube (numpy.ndarray) – Numpy array containing digital countes 3-channel cube

  • correction_coefficients_dict (dict) – Dictionary containing the 2D coefficients for correction

Returns:

Corrected 3-channel cube

Return type:

numpy.ndarray

hypso.calibration.get_coefficients_from_dict(coeff_dict, satobj)

Get the coefficients from the csv files contained in a dictionary.

Parameters:
  • coeff_dict (dict) – Dictionary containing the paths of the csv files to read

  • satobj – Hypso satellite object

Returns:

Dictionary containing the 2D coefficients read from the csv files

Return type:

dict

hypso.calibration.get_coefficients_from_file(coeff_path)

Get correction coefficients from file

Parameters:

coeff_path (str) – Coefficient path to read (.csv)

Returns:

2D array of coefficients

Return type:

numpy.ndarray

hypso.calibration.smile_correct_cube(cube, correction_coefficients_dict)

Run smile correction on each frame in a cube, using the center row in the frame as the reference wavelength/band for smile correction.

Parameters:
  • cube – 3-channel spectral cube

  • correction_coefficients_dict (dict) – Dictionary containing the coefficients for smile correction

Returns:

Return type:

numpy.ndarray

hypso.calibration.destriping_correct_cube(cube, correction_coefficients_dict)

Apply destriping correction matrix.

Parameters:
  • cube – 3-channel spectral cube

  • correction_coefficients_dict – Dictionary containing the 2D coefficients for destriping

Returns:

3-channel array for destriping correction

Return type:

numpy.ndarray