Process Reflectance

Some introductory text here ?

process_reflectance.py

process_reflectance.calculate_ndvi(ref, cfg, lmbd=None, domains=None)[source]

Compute the NDVI over land surfaces from the MODIS normalised reflectances at 858nm (PIR) and 645nm (R)

process_reflectance.get_instrument(instrument_wavebands, ref_in, ref_err_in, lmbd_full)[source]

Get the spectral reflectance in the selected instrument wavebands

Inputs: - instrument_waveband: list: [wl1, wl2, ..., wln] for narrow bands | [[wl1_min, wl1_max], ..., [wln_min, wln_max]] - ref_in: array [nlon, nlat, nlmd=3761] or [nlon, nlat, nlmbd=3761, nvza, nphi] - ref_err_in: array [nlon, nlat, nlmd=3761] or [nlon, nlat, nlmbd=3761, nvza, nphi] - lmbd_full: [nlmbd=3761]

Outputs: - ref: array [nlon, nlat, nwl] or [nlon, nlat, nwl, nvza, nphi] - ref_err: array [nlon, nlat, nwl] or [nlon, nlat, nwl, nvza, nphi]

process_reflectance.main(job, do_compute_error=False)[source]

Calculate the reflectance spectrum over the whole spectral domain (240-4000 nm) for each pixel depending on the type of surface (land / snow / ocean): - Land: spectral extrapolation based on the normalised reflectances in the 7 MODIS bands (+ associated uncertainty) - Snow: fitting of a snow model to the normalised reflectances in the 7 MODIS bands - Ocean: reflectance model depending on the chlorophyll content

Inputs: job class containing in particular the job.data dictionnary * containing the variables contained in the tile file for the month considered

  • ref_land: array [ nlon, nlat, nlmbd_MODIS = 7]
  • ref_land_covar: array [ nlon, nlat, 28]
  • chloro_conc: array [ nlon, nlat]
  • containing the indices of each land, snow, ocean, pixel, previously determined using job.calculate_surface_masks()

    • idx_land
    • idx_snow
    • idx_ocean

Outputs: * List of 2 elements:

  • reflectance: array [ nlon, nlat, nlmbd = 3761]
  • err_reflectance_land: array [ nlon, nlat, nlmbd = 3761]
process_reflectance.reflectance_spectrum_land(data_in, cfg, error=None)[source]

Compute reflectance over Land on a pixel basis from the normalised reflectances in the 7 MODIS wavebands OR Compute reflectance uncertainty over Land on a pixel basis from the variance covariance matrix among the MODIS spectral bands

Inputs:
  • Reflectance computation: data_in : array [nlmbd = 7]
  • Error reflectance computation: data_in : array [nlmbd = 7, nlmbd = 7]
  • cfg class containing all information on the EOF used for the spectral extrapolation
Outputs:
  • reflectance spectrum from 240 to 4000 nm: array [nlmbd = 3761]
process_reflectance.reflectance_spectrum_ocean(chl, lmbd, cfg, job)[source]

Compute reflectance over Ocean on a pixel basis

Inputs
  • chlorophyll content: array [nlon*nlat]
  • spectral bands: array [nlmbd]
Outputs
  • reflectance: array [nlon*nlat, nlmbd]
process_reflectance.spectral_selection(ref, lmbd_full, domains=None)[source]

Reflectance subsampling in narrow bands OR averaging by spectral domains

Inputs: - reflectance: array [nlon, nlat, nlmbd=3761] - lmbd_full: array [nlmbd=3761] - domains: either:

  • a list of list of spectral domains defined by [lmbd_min, lmbd_max] => averaging over spectral domain
  • or a list of wavebands => get the reflectance for these wavebands

Outputs: - reflectance: array [nlon, nlat, ndomains]

Table Of Contents

This Page