hypso.calibration.correction module
- hypso.calibration.correction.apply_radiometric_calibration(frame, exp, background_value, radiometric_calibration_coefficients)
Applies radiometric calibration. Assumes input is 12-bit values, and that the radiometric calibration coefficients are the same size as the input image. Note: radiometric calibration coefficients have original size (684,1080), matching the “normal” AOI of the HYPSO-1 data (with no binning).
- Parameters:
frame (ndarray) – 2D frame to apply radiometric calibration
exp (float) – Exposure value
background_value (float) – Background value
radiometric_calibration_coefficients (ndarray) – 2D array of radio calibration coefficients
- Returns:
Calibrated frame 2D array
- hypso.calibration.correction.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 (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:
ndarray
- hypso.calibration.correction.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:
ndarray
- hypso.calibration.correction.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:
ndarray
- hypso.calibration.correction.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.correction.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:
ndarray
- hypso.calibration.correction.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:
ndarray
- hypso.calibration.correction.smile_correction_one_frame(frame, spectral_band_matrix)
Run smile correction on each row in a frame, using the center row as the reference wavelength/band for smile correction.
- Parameters:
frame – 2D frame on which to apply smile correction
spectral_band_matrix – Spectral coefficients (Wavelength)
- Returns:
Corrected frame after smile correction
- Return type:
ndarray
- hypso.calibration.correction.smile_correction_one_row(row, w, w_ref)
Applies smile correction. Use cubic spline interpolation to resample one row onto the correct wavelengths/bands from a reference wavelength/band array to correct for the smile effect.
- Parameters:
row – Data row to apply smile correction
w –
w_ref –
- Returns:
Row corrected for smile effect
- Return type:
ndarray