ocssw
V2022
|
Functions | |
def | gamma_stretch (data, gamma=2) |
def | extract_data (image, avail_bands, req_bands, allow_neg=False, key='Rrs') |
def | plot_product (ax, title, product, rgb, vmin, vmax) |
Variables | |
string | sensor = 'HICO' |
dictionary | kwargs |
req_bands = get_sensor_bands(sensor, get_args(**kwargs)) | |
list | rgb_bands = [660, 550, 440] |
time_start = time.time() | |
image = Dataset(location.joinpath('l2gen.nc'))['geophysical_data'] | |
bands = sorted([int(k.replace('Rrs_', '')) for k in image.variables.keys() if 'Rrs_' in k]) | |
def | Rrs = extract_data(image, bands, req_bands) |
def | rgb = extract_data(image, bands, rgb_bands, key='rhos') |
products | |
slices | |
f | |
axes | |
figsize | |
dictionary | bounds |
Detailed Description
Mixture Density Network (MDN) ocean color water quality product retrieval MDN is a machine learning algorithm, trained to use remote sensing reflectance (Rrs) to estimate various water quality products. This package includes the model which retrieves Chlorophyll-a (chl), Total Suspended Solids (tss), Colored Dissolved Organic Matter at 440nm (cdom), and Phycocyanin Concentration (pc) from HICO imagery. To utilize this package, activate the provided virtual environment and call the script: $ source venv/Scripts/activate $ python create_images.py Code base can additionally be found at: https://github.com/BrandonSmithJ/MDN https://github.com/STREAM-RS/STREAM-RS Brandon Smith, NASA Goddard Space Flight Center, October 2021
Function Documentation
◆ extract_data()
Extract the requested bands from a given NetCDF object
Definition at line 39 of file create_images.py.
◆ gamma_stretch()
def create_images.gamma_stretch | ( | data, | |
gamma = 2 |
|||
) |
Apply gamma stretching to brighten imagery
Definition at line 33 of file create_images.py.
◆ plot_product()
def create_images.plot_product | ( | ax, | |
title, | |||
product, | |||
rgb, | |||
vmin, | |||
vmax | |||
) |
Plot a given product on the axis using vmin/vmax as the colorbar min/max, and rgb as the visible background
Definition at line 58 of file create_images.py.
Variable Documentation
◆ axes
axes |
Definition at line 99 of file create_images.py.
◆ bands
Definition at line 91 of file create_images.py.
◆ bounds
dictionary bounds |
Definition at line 100 of file create_images.py.
◆ f
f |
Definition at line 99 of file create_images.py.
◆ figsize
figsize |
Definition at line 99 of file create_images.py.
◆ image
image = Dataset(location.joinpath('l2gen.nc'))['geophysical_data'] |
Definition at line 90 of file create_images.py.
◆ kwargs
dictionary kwargs |
Definition at line 74 of file create_images.py.
◆ products
products |
Definition at line 96 of file create_images.py.
◆ req_bands
Definition at line 83 of file create_images.py.
◆ rgb
def rgb = extract_data(image, bands, rgb_bands, key='rhos') |
Definition at line 93 of file create_images.py.
◆ rgb_bands
list rgb_bands = [660, 550, 440] |
Definition at line 84 of file create_images.py.
◆ Rrs
def Rrs = extract_data(image, bands, req_bands) |
Definition at line 92 of file create_images.py.
◆ sensor
Definition at line 73 of file create_images.py.
◆ slices
slices |
Definition at line 96 of file create_images.py.
◆ time_start
time_start = time.time() |
Definition at line 87 of file create_images.py.