API reference#

class safe_s1.Sentinel1Reader(name, backend_kwargs=None)#
property azimuth_fmrate#
Returns:

Frequency Modulation rate annotations such as t0 (azimuth time reference) and polynomial coefficients: Azimuth FM rate = c0 + c1(tSR - t0) + c2(tSR - t0)^2

Return type:

xarray.Dataset

property bursts#

Get bursts information

Returns:

Bursts information dataArrays

Return type:

xarray.Dataset

property datasets_names#

Alias to Sentinel1Reader._datasets_names

Returns:

datasets names

Return type:

list

property datatree#

Return data of the reader as datatree. Can’t open data from a multiple dataset (must select a single one with displayed in Sentinel1Reader.datasets_names). So if multiple dataset, returns None. Alias to Sentinel1Reader.dt.

Returns:

Contains data from the reader

Return type:

datatree.DataTree

property denoised#

dict with pol as key, and bool as values (True is DN is predenoised at L1 level)

Return type:

None | dict

property doppler_estimate#
Returns:

with Doppler Centroid Estimates from annotations such as geo_polynom,data_polynom or frequency

Return type:

xarray.Dataset

dsid#

Dataset identifier (like ‘WV_001’, ‘IW1’, ‘IW’), or empty string for multidataset

property files#

Files for current dataset. (Empty for multi datasets)

property geoloc#

xarray.Dataset with [‘longitude’, ‘latitude’, ‘altitude’, ‘azimuth_time’, ‘slant_range_time’,’incidence’,’elevation’ ] variables and [‘line’, ‘sample’] coordinates, at the geolocation grid

Returns:

Geolocation Grid

Return type:

xarray.Dataset

get_annotation_definitions()#

Get annotation definitions (paths used to retrieve concerned data in the files)

Returns:

annotations definitions

Return type:

dict

property get_calibration_luts#

get original (ie not interpolation) xr.Dataset sigma0 and gamma0 Look Up Tables to apply calibration

Returns:

Original sigma0 and gamma0 calibration Look Up Tables

Return type:

xarray.Dataset

get_noise_azi_initial_parameters(pol)#

Retrieve initial noise lut and lines

Parameters:

pol (str) – polarization selected

Returns:

Tuple that contains the swaths, noise azimuth lines, line_start, line_stop, sample_start, sample_stop and noise azimuth lut for the pol selected.

Return type:

(List, List, List, List, List, List, List)

property get_noise_azi_raw#

Get raw noise azimuth lut

Returns:

raw noise azimuth lut

Return type:

xarray.Dataset

property get_noise_range_raw#

Get raw noise range lut

Returns:

raw noise range lut

Return type:

xarray.Dataset

property image#

Get image information

Returns:

Image information dataArrays

Return type:

xarray.Dataset

load_digital_number(resolution=None, chunks=None, resampling=Resampling.rms)#

load digital_number from self.sar_meta.files[‘measurement’], as an xarray.Dataset.

Parameters:
Returns:

tuple that contains resolution and dataset (possibly dual-pol), with basic coords/dims naming convention

Return type:

(float, xarray.Dataset)

property multidataset#

Alias to Sentinel1Reader._multidataset

Return type:

bool

name#

Gdal dataset name

property orbit#
orbit, as a geopandas.GeoDataFrame, with columns:
  • ‘velocity’ : shapely.geometry.Point with velocity in x, y, z direction

  • ‘geometry’ : shapely.geometry.Point with position in x, y, z direction

crs is set to ‘geocentric’

attrs keys:
  • ‘orbit_pass’: ‘Ascending’ or ‘Descending’

  • ‘platform_heading’: in degrees, relative to north

Notes

orbit is longer than the SAFE, because it belongs to all datatakes, not only this slice

property pixel_line_m#

pixel line spacing, in meters (at sensor level)

Returns:

Sample spacing

Return type:

xarray.Dataset

property pixel_sample_m#

pixel sample spacing, in meters (at sensor level)

Returns:

Sample spacing

Return type:

xarray.Dataset

property safe_files#

Files and polarizations for whole SAFE. The index is the file number, extracted from the filename. To get files in official SAFE order, the resulting dataframe should be sorted by polarization or index.

Returns:

Columns:
  • index : file number, extracted from the filename.

  • dsid : dataset id, compatible with gdal sentinel1 driver (‘SENTINEL1_DS:/path/file.SAFE:WV_012’)

  • polarization : polarization name.

  • annotation : xml annotation file.

  • calibration : xml calibration file.

  • noise : xml noise file.

  • measurement : tiff measurement file.

Return type:

pandas.core.frame.DataFrame

short_name#

Like name, but without path

property time_range#

Get time range