Fusion Result#

class core.FuseResult[source]#

Class containing the result of Client.fuse()

ok#

Status output of the fusion, True indicates a valid return of the fused result

reason#

Description of the ‘ok’ status

file_path#

Directory path to the saved result

fuse_id#

Unique ID generated by the fusion process, can be used in file naming

dataset#

The fusion result returned as a 3 dimensional (x, y, and time) Xarray Dataset containing all fused data layers and attributes properties (described below)

Type

Xarray Dataset

The Xarray Dataset created is a multi-dimensional array allowing for detailed encoding of the included information. Information such as time, geolocation, and the additional information and metadata needed to fully know what the information is that you are handelling. Finally, Xarray provides a powerful selection and processing interface allowing you to take the result of your data fusion, and transform it to your specific needs.

Example

>>> result = client.fuse(catalogs_list = [s1_search_result, s2_search_result, weather_search_result],
                         to_fuse = [custom_raster, custom_vector],
                         )
>>> result.dataset
to_geotiff(file_path=None)[source]#

Save the result to a geotiff file

Parameters

file_path (optional) – Path to target save directory

Default: None

to_netcdf(file_path=None)[source]#

Save the result to a netcdf file

Parameters

file_path (optional) – Path to target save directory

Default: None

plot_rgb(all_dates=True, brightness_factor=1, date=None, figsize=[8, 6], aspect='auto', save=False, save_dir='./figures')[source]#

Creates an RGB image of the dataset. The red, green, and blue bands are automatically detected, normalized, stacked, and displayed for each date (by default) that there is a Sentinel-2 image.

Parameters
  • all_dates (bool, optional) – Boolean to plot all dates. If False, only the first date with an S2 image will be plotted

    Default: True

  • brightness_factor (float, optional) – Float to scale the brightness of the image. Values above 1 may be useful for viewing normally dark images

    Default: 1

  • date (str, optional) – String in “YYYY-MM-DD” format to select and plot only a specific date in the fused dataset

    Default: None

  • figsize (list, optional) – X and Y size parameters for figure size. Only applicable if all_dates = False or a date is specified

    Default: [8, 6]

  • aspect (str, optional) – Matplotlib aspect ratio parameter <https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.set_aspect.html>_. Sets the aspect ratio of the axes (y/x) scaling. “auto” fills the position rectangle with data. “equal” creates the same scaling from data to plot units for x and y.

    Default: 'auto'

  • save (bool, optional) – Option to save figure.

    Default: False

  • save_dir (str, optional) – Directory path of where to save the figure if save is set to True.

    Default: './figures'

plot_timeseries(variables=None, save=False, save_dir='./figures')[source]#

Creates a normalized time series of the provided list of variables in the dataset. By default, all variables in the fused dataset are plotted. The time series is created by taking the spatial average at each time for each variable. Then, those values are converted into normalied values and plotted.

Parameters
  • variables (list, optional) – List of data variable names in the fuseResult dataset to graph in a time series plot

    Default: None

  • save (bool, optional) – Option to save figure.

    Default: False

  • save_dir (str, optional) – Directory path of where to save the figure if save is set to True.

    Default: './figures'

plot_availability(tick_spacing=1, advanced=False, save=False, save_dir='./figures')[source]#

Creates a block time series of each variable type (Sentinel-1, Sentinel-2, or Weather) in the dataset for each date. Times with white color indicate no data was available for that variable on that date. In normal mode, blocks with dark blue color indicate data availability. In advanced mode, blocks with any color other than white indicate data availability.

Parameters
  • tick_spacing (int, optional) – Integer value to indicate the x axis (time) tick interval when plotting the dataset. A 2 indicates that every 2 dates show up as a tick

    Default: 1

  • labeled. (and is) –

  • advanced (bool, optional) – Boolean to enable advanced plot mode. The advanced plot expands all sensors (S1, S2, and Weather) into individual bands, as well as plotting a normalized

    Default: False

  • color (magnitude value as the) –

  • present". (instead of a simple binary "present" or "not) –

  • save (bool, optional) – Option to save figure.

    Default: False

  • save_dir (str, optional) – Directory path of where to save the figure if save is set to True.

    Default: './figures'