sisppeo.products.L3Product¶
- class sisppeo.products.L3Product(dataset)[source]¶
Bases:
abc.ABC
,sisppeo.utils.products.CoordinatesMixin
Abstract class inherited by both L3AlgoProduct and L3MaskProduct.
- dataset¶
A dataset containing processed data.
- Type
xarray.core.dataset.Dataset
- __init__(dataset)¶
Methods
__init__
(dataset)extract_point
(data_var, coordinates[, ...])Returns value(s) at the given coordinates.
extract_points
(data_var, lst_coordinates[, ...])Returns value(s) at each tuple of coordinates of the given list.
from_file
(filename)Loads and returns a L3Product from file.
index
(x, y)Gets (i, j) from (x, y)
plot
(data_var)Plots a given variable.
save
(filename)Saves this product into a netCDF file.
xy
(i, j)Gets (x, y) from (i, j).
Attributes
(xmin, ymin, xmax, ymax).
Returns a list of DataArrays corresponding to variables.
Returns the product_type of the product used to get this dataset.
Returns the spatial resolution of this product.
Returns the title of the underlying dataset.
Returns x-coords.
Returns y-coords.
- property bounds¶
(xmin, ymin, xmax, ymax).
- Type
Returns the boundaries of this product
- property data_vars¶
Returns a list of DataArrays corresponding to variables.
- extract_point(data_var, coordinates, buffer=None, epsg=4326, mode='xy')¶
Returns value(s) at the given coordinates.
- Parameters
data_var – The name of the variable/DataArray of interest (e.g., a band, aCDOM, etc).
coordinates – A tuple of geographic or projected coordinates; see “mode”.
buffer – Optional; The radius (in pixels) of the circle (centered on coordinates) to extract. Defaults to None.
epsg – Optional; The EPSG code. Defaults to 4326.
mode – Optional; Either ‘xy’ or ‘latlon’. Defaults to ‘xy’.
- Returns
An xr.DataArray containing the wanted information.
- extract_points(data_var, lst_coordinates, buffer=None, epsg=4326, mode='xy')¶
Returns value(s) at each tuple of coordinates of the given list.
- Parameters
data_var – The name of the variable/DataArray of interest (e.g., a band, aCDOM, etc).
lst_coordinates – A list of tuples of geographic or projected coordinates; see “mode”.
buffer – Optional; The radius (in pixels) of the circle (centered on coordinates) to extract. Defaults to None.
epsg – Optional; The EPSG code. Defaults to 4326.
mode – Optional; Either ‘xy’ or ‘latlon’. Defaults to ‘xy’.
- Returns
A list of xr.DataArray (one per coordinates tuple) containing the wanted information.
- abstract classmethod from_file(filename)[source]¶
Loads and returns a L3Product from file.
- Parameters
filename – The path to the L3Product (saved as a netCDF file).
- index(x, y)¶
Gets (i, j) from (x, y)
- plot(data_var)[source]¶
Plots a given variable.
- data_var: The name of the variable/DataArray of interest (e.g., a
band, aCDOM, etc).
- property product_type¶
Returns the product_type of the product used to get this dataset.
- property res¶
Returns the spatial resolution of this product.
- abstract save(filename)[source]¶
Saves this product into a netCDF file.
- Parameters
filename – Path of the output file.
- property title¶
Returns the title of the underlying dataset.
- property x¶
Returns x-coords.
- xy(i, j)¶
Gets (x, y) from (i, j).
- property y¶
Returns y-coords.