Spectral Correction

phyto_photo_utils._spectral_correction.calculate_chl_specific_absorption(aptot, blank, ap_lambda, depig=None, chl=None, vol=None, betac1=None, betac2=None, diam=None, bricaud_slope=False, phycobilin=False, norm_750=False)

Process the raw absorbance data to produce chlorophyll specific phytoplankton absorption.

  • aptot (np.array, dtype=float, shape=[n,]) – The raw absorbance data.
  • blank (np.array, dtype=float, shape=[n,]) – The blank absorbance data.
  • ap_lambda (np.array, dtype=float, shape=[n,]) – The wavelengths corresponding to the measurements.
  • depig (np.array, dtype=float, shape=[n,]) – The raw depigmented absorbance data.
  • chl (float) – The chlorophyll concentration associated with the measurement.
  • vol (int) – The volume of water filtered in mL.
  • betac1 (int) – The pathlength amplification coefficient 1 (see Stramski et al. 2015). For transmittance mode, 0.679, for transmittance-reflectance mode, 0.719, and for integrating sphere mode, 0.323.
  • betac2 (int) – The pathlength amplification coefficient 2 (see Stramski et al. 2015). For transmittance mode, 1.2804, for transmittance-reflectance mode, 1.2287, and for integrating sphere mode, 1.0867.
  • diam (float) – The diameter of filtrate in mm.
  • bricaud_slope (bool, default=True) – If True, will theoretically calculate detrital slope (see Bricaud & Stramski 1990). If False, will subtract depigmented absorption from total absorption.
  • phycobilin (bool, default=False) – If True, will account for high absorption in the green wavelengths (580 - 600 nm) by phycobilin proteins when performing the bricaud_slope detrital correction.
  • norm_750 (bool, default=False) – If True, will normalise the data to the value at 750 nm.

aphy – The chlorophyll specific phytoplankton absorption data.

Return type:

np.array, dtype=float, shape=[n,]


>>> aphy = ppu.calculate_chl_specific_absorption(pa_data, blank, wavelength, chl=0.19, vol=2000, betac1=0.323, betac2=1.0867, diam=15, bricaud_slope=True, phycobilin=True, norm750=False)
phyto_photo_utils._spectral_correction.calculate_instrument_led_correction(aphy, ap_lambda, method=None, chl=None, e_background=None, e_insitu=None, e_actinic=None, depth=None, e_led=None, wl=None, constants=None)

Calculate the spectral correction factor TO DO: Create method to convert all arrays to same length and resolution TO DO: Add in functionality to calculate mixed excitation wavelength spectra for FastOcean when using more than wavelength

  • aphy (np.array, dtype=float, shape=[n,]) – The wavelength specific phytoplankton absorption coefficients.
  • ap_lambda (np.array, dtype=int, shape=[n,]) – The wavelengths associated with the aphy and aphy_star.
  • method ('sigma', 'actinic') – Choose spectral correction method to either correct SigmaPSII or correct the background actinic light.
  • e_background ('insitu', 'actinic') – For sigma spectral correction factor, select either insitu light (e.g. for underway or insitu measurements) or actinic light (e.g. for fluorescence light curves) as the background light source
  • e_insitu (np.array, dtype=int, shape=[n,]) – The in situ irradiance field, if None is passed then will theoretically calculate in situ light field.
  • chl (dtype=float) – Chlorophyll concentration for estimation of Kbio for theoretical in situ light field. If None is passed then chl is set to 1 mg/m3.
  • e_actinic ('fastact') – Actinic light spectrum e.g. Spectra of the Actinic lights within the FastAct illuminating during Fluorescence Light Curves etc. Must be defined for ‘actinic’ method.
  • depth (float, default=None) – The depth of the measurement. Must be set if theoretically calculating e_insitu.
  • e_led ('fire','fasttracka_ii', 'fastocean') – The excitation spectra of the instrument.
  • wl ('450nm', '530nm', 624nm', None) – For FastOcean only. Select the excitation wavelength. Future PPU versions will provide option to mix LEDs.
  • constants (file, default=None) – The spectra of the light source used for the measurement. If None is provided, will read in default values stored within PPU.

scf – The spectral correction factor to correct SigmaPSII or actinic background light depending on method.

Return type:



>>> ppu.calculate_instrument_led_correction(aphy, wavelength, e_led='fire')