satpy.composites.lightning module

Composite classes for the LI instrument.

class satpy.composites.lightning.LightningTimeCompositor(name, prerequisites=None, optional_prerequisites=None, **kwargs)[source]

Bases: CompositeBase

Compositor class for lightning visualisation based on time.

The compositor normalises the lightning event times between 0 and 1. The value 1 corresponds to the latest lightning event and the value 0 corresponds to the latest lightning event - time_range. The time_range is defined in the composite recipe and is in minutes.

Initialisation of the class.

__init__(name, prerequisites=None, optional_prerequisites=None, **kwargs)[source]

Initialisation of the class.

_normalize_time(data, attrs)[source]

Normalize the time in the range between [end_time, end_time - time_range].

The range of the normalised data is between 0 and 1 where 0 corresponds to the date end_time - time_range and 1 to the end_time. Where end_times represent the latest lightning event and time_range is the range of time in minutes visualised in the composite. The dates that are earlier to end_time - time_range are set to NaN.

Parameters:
  • data (DataArray) – datas containing dates to be normalised

  • attrs (dict) – Attributes suited to the flash_age composite

Return type:

DataArray

Returns:

Normalised time

_redefine_metadata(attrs)[source]

Modify the standard_name and name metadatas.

Parameters:

attrs (dict) – data’s attributes

Return type:

dict

Returns:

updated attributes

static _update_missing_metadata(existing_attrs, new_attrs)[source]