s1etad module API

Tools for easy access to Sentinel-1 Extended Timing Annotation Datasets.

This module provides a set of classes to open and access all elements, data and meta-data, of the Sentinel-1 Extended Timing Annotation Datasets (S1-ETAD).

Basic elements are:

Sentinel1Etad class

class s1etad.Sentinel1Etad(product)[source]

Bases: object

Sentinel-1 ETAD product.

Class to decode and access the elements of the Sentinel ETAD product which specification is governed by ETAD-DLR-PS-0014

The index operator [] (implemented with the __getitem__ method) returns a Sentinel1EtadSwath instance.

product

path of the S1-ETAD product (it is a directory)

Type

pathlib.Path

burst_catalogue

dataframe containing main information of all bursts present in the product

Type

pandas.DataFrame

get_footprint(swath_list=None)[source]

Return the footprints of all the bursts as MultiPolygon.

It calls in the back the get_footprint of the Sentinel1EtadBurst class.

property grid_sampling

Return the grid spacing in s.

property grid_spacing

Return the grid spacing in meters.

iter_swaths(selection=None)[source]

Iterate over swaths according to the specified selection.

Parameters

selection (list(str) or pd.Dataframe, optional) – the list of selected swath IDs or the result of a Sentinel1Etad.query_burst query. If the selection is None (default) the iteration is performed on all the swaths of the product.

merge_correction(name: Union[s1etad.ECorrectionType, str] = <ECorrectionType.SUM: 'sum'>, selection=None, set_auto_mask=True, transpose=True, meter=False)[source]
property number_of_swath
processing_setting()[source]

Return the corrections performed.

Read the xml file to identify the corrections performed. If a correction is not performed the matrix is filled with zeros.

query_burst(first_time=None, product_name=None, last_time=None, swath=None)[source]

Query the burst catalogue to retrieve the burst matching by time.

Parameters
  • first_time (datetime) – is set to None then set to the first time

  • last_time (datetime) – if set to None the last_time = first_time

  • product_name (str) – Name of a real S1 product e.g. S1B_IW_SLC__1SDV_20190805T162509_20190805T162…SAFE

  • swath (str or list) – list of swathID e.g. ‘IW1’ or [‘IW1’] or [‘IW1’, ‘IW2’]

Returns

Filtered panda dataframe

Return type

pandas.DataFrame

s1_product_list()[source]

Return the list of S-1 products used to compose the ETAD one.

property swath_list
to_kml(kml_file)[source]
xpath_to_list(xpath, dtype=None, namespace=None, parse_time_func=None)[source]

Sentinel1EtadSwath class

class s1etad.Sentinel1EtadSwath(nc_group, daz_m)[source]

Bases: object

property burst_list
get_footprint(burst_index_list=None)[source]

Return the footprints of all the bursts as MultiPolygon.

It calls in the back the get_footprint of the Sentinel1EtadBurst class.

iter_bursts(selection=None)[source]

Iterate over bursts according to the specified selection.

Parameters

selection (list(int) or pd.Dataframe, optional) – the list of selected bursts or result of a Sentinel1Etad.query_burst query. If the selection is None (default) the iteration is performed on all the burst of the swath.

merge_correction(name: Union[s1etad.ECorrectionType, str] = <ECorrectionType.SUM: 'sum'>, selection=None, set_auto_mask=True, transpose=True, meter=False)[source]
property number_of_burst
property sampling
property sampling_start

Relative sampling start times.

property swath_id

Sentinel1EtadBurst class

class s1etad.Sentinel1EtadBurst(nc_group, daz_m)[source]

Bases: object

property burst_index
get_burst_grid()[source]

Return the t, tau grid of the burst.

get_correction(name: Union[s1etad.ECorrectionType, str] = <ECorrectionType.SUM: 'sum'>, set_auto_mask=False, transpose=True, meter=False)[source]

Retrieve the correction for the specified correction “name”.

Puts the results in a dict.

Parameters
  • name (ECorrectionType or str) – the desired correction

  • set_auto_mask (bool) – requested for netCDF4 to avoid retrieving a masked array

  • transpose (bool) – requested to retrieve the correction in array following the numpy convention for dimensions

  • meter (bool) – transform the result in meters

Returns

a dictionary containing the following items for the requested correction:

x

correction in range (if applicable)

y

correction in azimuth (if applicable)

unit

’m’ or ‘s’

name

name of the correction

Return type

dict

get_footprint()[source]

Return the footprint of ghe bursts as shapely.Polygon.

It gets the lat / lon / height grid and extract the 4 corners.

get_lat_lon_height(transpose=True)[source]
property lines
property samples
property sampling
property sampling_start

Relative sampling start times.

property swath_id

ECorrectionType enum

class s1etad.ECorrectionType(value)[source]

Bases: enum.Enum

An enumeration.

BISTATIC = 'bistatic'
DOPPLER = 'doppler'
FMRATE = 'fmrate'
GEODETIC = 'geodetic'
IONOSPHERIC = 'ionospheric'
SUM = 'sum'
TROPOSPHERIC = 'tropospheric'