Skip to content

Sentinel-1

Reader Interface

Sentinel-1 SAFE product format reader.

Classes

Functions:

read_external_orbit

Python
read_external_orbit(xml_path: str | Path, time_boundaries: tuple[PreciseDateTime, PreciseDateTime] | None = None) -> StateVectors

Reading SAFE product external orbit file. External orbits can be very large and span over several hours so time boundaries can be provided to limit the orbit extent just around the acquisition time interval.

Parameters:

Name Type Description Default
xml_path str | Path

path to the external orbit file

required
time_boundaries tuple[PreciseDateTime, PreciseDateTime] | None

time boundaries as start time [0] and stop time [1], by default None

None

Returns:

Type Description
StateVectors

StateVectors dataclass from orbit

read_channel_metadata

Python
read_channel_metadata(xml_path: str | Path, external_orbit_path: str | Path | None = None) -> support.S1ChannelMetadata

Reading SAFE product channel metadata.

Parameters:

Name Type Description Default
xml_path str | Path

path to the channel metadata xml file

required
external_orbit_path str | Path | None

path to the external orbit xml file, by default None

None

Returns:

Type Description
S1ChannelMetadata

channel metadata dataclass

read_channel_calibration

Python
read_channel_calibration(xml_path: str | Path, radiometric_quantity: SARRadiometricQuantity = SARRadiometricQuantity.BETA_NOUGHT) -> float

Reading SAFE product channel calibration metadata.

Parameters:

Name Type Description Default
xml_path str | Path

path to the channel calibration xml file

required
radiometric_quantity SARRadiometricQuantity

radiometric quantity selected, by default SARRadiometricQuantity.BETA_NOUGHT

BETA_NOUGHT

Returns:

Type Description
float

radiometric data scaling factor

read_channel_noise_vectors

Python
read_channel_noise_vectors(noise_file: str | Path) -> tuple[list[support.S1AzimuthNoiseVector] | None, list[support.S1RangeNoiseVector]]

Reading SAFE product channel noise vectors file in annotations folder.

Parameters:

Name Type Description Default
noise_file str | Path

path to the channel noise vectors xml file

required

Returns:

Type Description
list[S1AzimuthNoiseVector] | None

list of azimuth noise vectors, if any else None

list[S1RangeNoiseVector]

list of range noise vectors

read_channel_data

Python
read_channel_data(raster_file: str | Path, block_to_read: list[int] = None, scaling_conversion: float = 1) -> np.ndarray

Reading SAFE tiff channel data file.

Parameters:

Name Type Description Default
raster_file str | Path

Path to Tiff raster file to be read

required
block_to_read list[int] | None

data block to be read, to be specified as a list of 4 integers, in the form:

Text Only
0. first line to be read
1. first sample to be read
2. total number of lines to be read
3. total number of samples to be read

if None, the whole raster is read, by default None

None
scaling_conversion float

scaling conversion to be applied to the data read

1

Returns:

Type Description
ndarray

numpy array containing the data read from raster file, with shape (lines, samples)

open_product

Python
open_product(pf_path: str | Path) -> support.S1Product

Open a SAFE product.

Parameters:

Name Type Description Default
pf_path str | Path

Path to the SAFE product

required

Returns:

Type Description
S1Product

S1Product object corresponding to the input SAFE product

Utilities

Sentinel-1 SAFE reader support module.

Classes

ChannelDataPairMismatch

Bases: RuntimeError

Mismatch between channel data pair (raster data and corresponding metadata)

InvalidChannelId

Bases: RuntimeError

Invalid channel number

InvalidSAFEProduct

Bases: RuntimeError

Invalid SAFE product

InvalidTimeBoundaries

Bases: RuntimeError

Invalid time boundaries with respect to validity period

S1OrbitType

Bases: Enum

EOrbitType class

Attributes

Python
DOWNLINK = 'DOWNLINK'
PREDICTED class-attribute instance-attribute
Python
PREDICTED = 'PREDICTED'
RESTITUTED class-attribute instance-attribute
Python
RESTITUTED = 'RESTITUTED'
PRECISE class-attribute instance-attribute
Python
PRECISE = 'PRECISE'
UNKNOWN class-attribute instance-attribute
Python
UNKNOWN = 'UNKNOWN'

S1DCEstimateMethod

Bases: Enum

Doppler Centroid estimate method: data or geometry

Attributes

DATA class-attribute instance-attribute
Python
DATA = 'DATA'
GEOMETRY class-attribute instance-attribute
Python
GEOMETRY = 'GEOMETRY'

S1AcquisitionMode

Bases: Enum

Sentinel-1 acquisition modes

Attributes

IW class-attribute instance-attribute
Python
IW = 'IW'
EW class-attribute instance-attribute
Python
EW = 'EW'
WV class-attribute instance-attribute
Python
WV = 'WV'
SM class-attribute instance-attribute
Python
SM = 'SM'
EN class-attribute instance-attribute
Python
EN = 'EN'
AN class-attribute instance-attribute
Python
AN = 'AN'
S1 class-attribute instance-attribute
Python
S1 = 'S1'
S2 class-attribute instance-attribute
Python
S2 = 'S2'
S3 class-attribute instance-attribute
Python
S3 = 'S3'
S4 class-attribute instance-attribute
Python
S4 = 'S4'
S5 class-attribute instance-attribute
Python
S5 = 'S5'
S6 class-attribute instance-attribute
Python
S6 = 'S6'

S1ResolutionClasses

Bases: Enum

Sentinel-1 resolution classes

Attributes

FR class-attribute instance-attribute
Python
FR = 'FR'
HR class-attribute instance-attribute
Python
HR = 'HR'
MR class-attribute instance-attribute
Python
MR = 'MR'

S1Polarization

Bases: Enum

Sentinel-1 signal polarization

Attributes

HH class-attribute instance-attribute
Python
HH = 'HH'
VV class-attribute instance-attribute
Python
VV = 'VV'
HV class-attribute instance-attribute
Python
HV = 'HV'
VH class-attribute instance-attribute
Python
VH = 'VH'

S1ReferenceFrameType

Bases: Enum

Sentinel-1 available reference frames

Attributes

UNDEFINED class-attribute instance-attribute
Python
UNDEFINED = 'Undefined'
GALACTIC class-attribute instance-attribute
Python
GALACTIC = 'Galactic'
BM1950 class-attribute instance-attribute
Python
BM1950 = 'BM1950'
BM2000 class-attribute instance-attribute
Python
BM2000 = 'BM2000'
HM2000 class-attribute instance-attribute
Python
HM2000 = 'HM2000'
GM2000 class-attribute instance-attribute
Python
GM2000 = 'GM2000'
MEAN_OF_DATE class-attribute instance-attribute
Python
MEAN_OF_DATE = 'Mean Of Date'
TRUE_OF_DATE class-attribute instance-attribute
Python
TRUE_OF_DATE = 'True Of Date'
PSEUDO_EARTH_FIXED class-attribute instance-attribute
Python
PSEUDO_EARTH_FIXED = 'Pseudo Earth Fixed'
EARTH_FIXED class-attribute instance-attribute
Python
EARTH_FIXED = 'Earth Fixed'
TOPOCENTRIC class-attribute instance-attribute
Python
TOPOCENTRIC = 'Topocentric'
SATELLITE_ORBITAL class-attribute instance-attribute
Python
SATELLITE_ORBITAL = 'Satellite Orbital'
SATELLITE_NORMAL class-attribute instance-attribute
Python
SATELLITE_NORMAL = 'Satellite Nominal'
SATELLITE_ATTITUDE class-attribute instance-attribute
Python
SATELLITE_ATTITUDE = 'Satellite Attitude'
INSTRUMENT_ATTITUDE class-attribute instance-attribute
Python
INSTRUMENT_ATTITUDE = 'Instrument Attitude'

S1L1ProductType

Bases: Enum

Sentinel-1 L1 product types

Attributes

SLC class-attribute instance-attribute
Python
SLC = 'SLC'
GRD class-attribute instance-attribute
Python
GRD = 'GRD'

S1ChirpReplica dataclass

Sentinel-1 PG chirp replica parameters derived from the calibration pulses at 100 MHz bandwidth dataclass

Attributes

swath instance-attribute
Python
swath: str
time_axis instance-attribute
Python
time_axis: ndarray
cross_correlation_bandwidth instance-attribute
Python
cross_correlation_bandwidth: ndarray
cross_correlation_pslr instance-attribute
Python
cross_correlation_pslr: ndarray
cross_correlation_islr instance-attribute
Python
cross_correlation_islr: ndarray
cross_correlation_peak_location instance-attribute
Python
cross_correlation_peak_location: ndarray
pg_product_amplitude instance-attribute
Python
pg_product_amplitude: ndarray
pg_product_phase instance-attribute
Python
pg_product_phase: ndarray
model_pg_product_amplitude instance-attribute
Python
model_pg_product_amplitude: ndarray
model_pg_product_phase instance-attribute
Python
model_pg_product_phase: ndarray
internal_time_delay instance-attribute
Python
internal_time_delay: ndarray
reconstructed_replica_validity instance-attribute
Python
reconstructed_replica_validity: list[bool]
relative_validity instance-attribute
Python
relative_validity: list[bool]
absolute_validity instance-attribute
Python
absolute_validity: list[bool]

Methods:

__init__
Python
__init__(swath: str, time_axis: ndarray, cross_correlation_bandwidth: ndarray, cross_correlation_pslr: ndarray, cross_correlation_islr: ndarray, cross_correlation_peak_location: ndarray, pg_product_amplitude: ndarray, pg_product_phase: ndarray, model_pg_product_amplitude: ndarray, model_pg_product_phase: ndarray, internal_time_delay: ndarray, reconstructed_replica_validity: list[bool], relative_validity: list[bool], absolute_validity: list[bool]) -> None
from_metadata_node staticmethod
Python
from_metadata_node(replica_info_node: _Element) -> S1ChirpReplica

Generating S1ChirpReplica object directly from metadata xml nodes.

Parameters:

Name Type Description Default
replica_info_node _Element

replicaInformation metadata xml node

required

Returns:

Type Description
S1ChirpReplica

chirp replica dataclass

S1Noise dataclass

Sentinel-1 thermal noise parameters derived from noise packets dataclass

Attributes

swath instance-attribute
Python
swath: str
time_axis instance-attribute
Python
time_axis: ndarray
noise_power_correction_factor instance-attribute
Python
noise_power_correction_factor: ndarray
noise_lines_num instance-attribute
Python
noise_lines_num: ndarray

Methods:

__init__
Python
__init__(swath: str, time_axis: ndarray, noise_power_correction_factor: ndarray, noise_lines_num: ndarray) -> None
from_metadata_node staticmethod
Python
from_metadata_node(noise_list_node: _Element, swath: str) -> S1Noise

Generating S1Noise object directly from metadata xml nodes.

Parameters:

Name Type Description Default
noise_list_node _Element

noiseList metadata xml node

required
swath str

swath of interest

required

Returns:

Type Description
S1Noise

noise correction factor dataclass

S1RangeNoiseVector dataclass

Sentinel-1 noise vector dataclass

Attributes

azimuth_time instance-attribute
Python
azimuth_time: PreciseDateTime
line instance-attribute
Python
line: int
pixels instance-attribute
Python
pixels: ndarray
lut instance-attribute
Python
lut: ndarray

Methods:

__init__
Python
__init__(azimuth_time: PreciseDateTime, line: int, pixels: ndarray, lut: ndarray) -> None
from_node classmethod
Python
from_node(node: _Element) -> S1RangeNoiseVector

Generating S1RangeNoiseVector object directly from metadata xml node.

Parameters:

Name Type Description Default
node _Element

noiseRangeVectorList/noiseRangeVector xml node

required

Returns:

Type Description
S1RangeNoiseVector

object corresponding to the input xml node

S1AzimuthNoiseVector dataclass

Sentinel-1 noise vector dataclass

Attributes

swath instance-attribute
Python
swath: str
first_azimuth_line instance-attribute
Python
first_azimuth_line: int
last_azimuth_line instance-attribute
Python
last_azimuth_line: int
first_range_sample instance-attribute
Python
first_range_sample: int
last_range_sample instance-attribute
Python
last_range_sample: int
lines instance-attribute
Python
lines: ndarray
lut instance-attribute
Python
lut: ndarray

Methods:

__init__
Python
__init__(swath: str, first_azimuth_line: int, last_azimuth_line: int, first_range_sample: int, last_range_sample: int, lines: ndarray, lut: ndarray) -> None
from_node classmethod
Python
from_node(node: _Element) -> S1AzimuthNoiseVector

Generating S1AzimuthNoiseVector object directly from metadata xml node.

Parameters:

Name Type Description Default
node _Element

noiseAzimuthVectorList/noiseAzimuthVector xml node

required

Returns:

Type Description
S1AzimuthNoiseVector

object corresponding to the input xml node

S1AntennaPattern dataclass

Sentinel-1 antenna pattern dataclass

Attributes

swath instance-attribute
Python
swath: str
time_axis instance-attribute
Python
time_axis: ndarray
slant_range_time_array instance-attribute
Python
slant_range_time_array: ndarray
elevation_angle_array instance-attribute
Python
elevation_angle_array: ndarray
elevation_pattern_array instance-attribute
Python
elevation_pattern_array: ndarray
incidence_angle instance-attribute
Python
incidence_angle: ndarray
terrain_height instance-attribute
Python
terrain_height: ndarray
roll instance-attribute
Python
roll: ndarray

Methods:

__init__
Python
__init__(swath: str, time_axis: ndarray, slant_range_time_array: ndarray, elevation_angle_array: ndarray, elevation_pattern_array: ndarray, incidence_angle: ndarray, terrain_height: ndarray, roll: ndarray) -> None
from_metadata_node staticmethod
Python
from_metadata_node(antenna_pattern_list_node: _Element, swath: str) -> S1AntennaPattern

Generating S1AntennaPattern object directly from metadata xml nodes.

Parameters:

Name Type Description Default
antenna_pattern_list_node _Element

antennaPatternList metadata xml node

required
swath str

swath of interest

required

Returns:

Type Description
S1Noise

antenna pattern dataclass

S1GeneralChannelInfo dataclass

Sentinel-1 general channel info representation dataclass

Attributes

mission_id instance-attribute
Python
mission_id: str
channel_id instance-attribute
Python
channel_id: int
swath instance-attribute
Python
swath: str
product_type instance-attribute
Python
product_type: S1L1ProductType
polarization instance-attribute
Python
polarization: SARPolarization
projection instance-attribute
Python
projection: SARProjection
mode instance-attribute
Python
mode: S1AcquisitionMode
acquisition_mode_std instance-attribute
Python
acquisition_mode_std: StandardSARAcquisitionMode
orbit_direction instance-attribute
Python
orbit_direction: OrbitDirection
range_sampling_rate instance-attribute
Python
range_sampling_rate: float
signal_frequency instance-attribute
Python
signal_frequency: float
start_time instance-attribute
Python
start_time: PreciseDateTime
stop_time instance-attribute
Python
stop_time: PreciseDateTime

Methods:

__init__
Python
__init__(mission_id: str, channel_id: int, swath: str, product_type: S1L1ProductType, polarization: SARPolarization, projection: SARProjection, mode: S1AcquisitionMode, acquisition_mode_std: StandardSARAcquisitionMode, orbit_direction: OrbitDirection, range_sampling_rate: float, signal_frequency: float, start_time: PreciseDateTime, stop_time: PreciseDateTime) -> None
from_metadata_node staticmethod
Python
from_metadata_node(header_node: _Element, product_info_node: _Element) -> S1GeneralChannelInfo

Generating S1GeneralChannelInfo object directly from metadata xml nodes.

Parameters:

Name Type Description Default
header_node _Element

adsHeader metadata xml node

required
product_info_node _Element

generalAnnotation/productInformation metadata xml node

required

Returns:

Type Description
S1GeneralChannelInfo

general channel info dataclass

S1Attitude dataclass

Sentinel-1 sensor's attitude

Attributes

num instance-attribute
Python
num: int
frame instance-attribute
Python
frame: S1ReferenceFrameType
quaternions instance-attribute
Python
quaternions: ndarray
angular_velocities instance-attribute
Python
angular_velocities: ndarray
roll instance-attribute
Python
roll: ndarray
pitch instance-attribute
Python
pitch: ndarray
yaw instance-attribute
Python
yaw: ndarray
time_axis instance-attribute
Python
time_axis: ndarray

Methods:

__init__
Python
__init__(num: int, frame: S1ReferenceFrameType, quaternions: ndarray, angular_velocities: ndarray, roll: ndarray, pitch: ndarray, yaw: ndarray, time_axis: ndarray) -> None
from_metadata_node staticmethod
Python
from_metadata_node(attitude_node: _Element) -> S1Attitude

Generating S1Attitude object directly from metadata xml node.

Parameters:

Name Type Description Default
attitude_node _Element

attitudeList xml node

required

Returns:

Type Description
S1Attitude

sensor's attitude dataclass

S1Pulse dataclass

Sentinel-1 pulse info

Attributes

length instance-attribute
Python
length: float
bandwidth instance-attribute
Python
bandwidth: float
energy instance-attribute
Python
energy: float
start_frequency instance-attribute
Python
start_frequency: float
start_phase instance-attribute
Python
start_phase: float
direction instance-attribute
Python
direction: str
tx_pulse_latch_time class-attribute instance-attribute
Python
tx_pulse_latch_time: float = _S1_TX_PULSE_LATCH_TIME

Methods:

__init__
Python
__init__(length: float, bandwidth: float, energy: float, start_frequency: float, start_phase: float, direction: str, tx_pulse_latch_time: float = _S1_TX_PULSE_LATCH_TIME) -> None
from_metadata_nodes staticmethod
Python
from_metadata_nodes(swath_processing_node: _Element, downlink_info_node: _Element) -> S1Pulse

Generating S1Pulse object directly from metadata xml nodes.

Parameters:

Name Type Description Default
swath_processing_node _Element

swathProcParams xml node

required
downlink_info_node _Element

downlinkInformation xml node

required

Returns:

Type Description
S1Pulse

pulse info dataclass

S1ChannelMetadata dataclass

Sentinel-1 channel metadata xml file wrapper

Attributes

general_info instance-attribute
Python
general_info: S1GeneralChannelInfo
orbit instance-attribute
Python
orbit: Trajectory
attitude instance-attribute
Python
attitude: S1Attitude
burst_info instance-attribute
Python
burst_info: BurstInfo
raster_info instance-attribute
Python
raster_info: RasterInfo
dataset_info instance-attribute
Python
dataset_info: DatasetInfo
swath_info instance-attribute
Python
swath_info: SwathInfo
sampling_constants instance-attribute
Python
sampling_constants: SARSamplingFrequencies
acquisition_timeline instance-attribute
Python
acquisition_timeline: AcquisitionTimeline
doppler_centroid_poly instance-attribute
Python
doppler_centroid_poly: DopplerEvaluator
doppler_rate_poly instance-attribute
Python
doppler_rate_poly: DopplerEvaluator
pulse instance-attribute
Python
pulse: S1Pulse
coordinate_conversions instance-attribute
Python
coordinate_conversions: CoordinatesConversions
state_vectors instance-attribute
Python
state_vectors: StateVectors
chirp_replica instance-attribute
Python
chirp_replica: dict[str, S1ChirpReplica]
noise instance-attribute
Python
noise: dict[str, S1Noise]
antenna_pattern instance-attribute
Python
antenna_pattern: dict[str, S1AntennaPattern]
burst_sensing_times instance-attribute
Python
burst_sensing_times: ndarray | None

Methods:

__init__
Python
__init__(general_info: S1GeneralChannelInfo, orbit: Trajectory, attitude: S1Attitude, burst_info: BurstInfo, raster_info: RasterInfo, dataset_info: DatasetInfo, swath_info: SwathInfo, sampling_constants: SARSamplingFrequencies, acquisition_timeline: AcquisitionTimeline, doppler_centroid_poly: DopplerEvaluator, doppler_rate_poly: DopplerEvaluator, pulse: S1Pulse, coordinate_conversions: CoordinatesConversions, state_vectors: StateVectors, chirp_replica: dict[str, S1ChirpReplica], noise: dict[str, S1Noise], antenna_pattern: dict[str, S1AntennaPattern], burst_sensing_times: ndarray | None) -> None

S1Manifest

Sentinel-1 SAFE manifest parser

Methods:

__init__
Python
__init__(manifest_path: Path) -> None

Parsing the SAFE product manifest to gather information about data and metadata files.

Parameters:

Name Type Description Default
manifest_path Path

path to the manifest file

required
parse_manifest_document
Python
parse_manifest_document() -> tuple[list[str], list[str], list[str], list[str], PreciseDateTime, tuple[float, float, float, float]]

Parsing SAFE manifest .xml document to gather information to available data, metadata, calibrations and product acquisition time.

Returns:

Type Description
list[str]

list of data relative paths with respect to SAFE product folder

list[str]

list of metadata relative paths with respect to SAFE product folder

list[str]

list of calibration relative paths with respect to SAFE product folder

list[str]

list of noise relative paths with respect to SAFE product folder

PreciseDateTime

acquisition start time

tuple[float, float, float, float]

product footprint [min lat, max lat, min lon, max lon]

SAFEFolderLayout

SAFE file main directory architecture

Attributes

manifest property
Python
manifest: Path

Location of manifest file

annotations property
Python
annotations: Path

Location of annotation folder

measurements property
Python
measurements: Path

Location of measurement folder

preview property
Python
preview: Path

Location of preview folder

calibration property
Python
calibration: Path

Location of calibration folder in annotations

Methods:

__init__
Python
__init__(path: Path) -> None

Definition of internal architecture of a SAFE product folder.

Parameters:

Name Type Description Default
path Path

path to the SAFE base folder

required

S1Product

Sentinel-1 product object

Attributes

acquisition_time property
Python
acquisition_time: PreciseDateTime

Acquisition start time for this product

data_list property
Python
data_list: list[Path]

Returning the list of raster data files in SAFE product

metadata_list property
Python
metadata_list: list[Path]

Returning the list of metadata files in SAFE product

calibration_list property
Python
calibration_list: list[Path]

Returning the list of calibration files in SAFE product

noise_list property
Python
noise_list: list[Path]

Returning the list of noise files in SAFE product

channels_number property
Python
channels_number: int

Returning the number of channels in the SAFE product

channels_list property
Python
channels_list: list[str]

Returning the list of channels in terms of SwathID (swath-polarization)

footprint property
Python
footprint: tuple[float, float, float, float]

Product footprint as tuple of (min lat, max lat, min lon, max lon)

Methods:

__init__
Python
__init__(path: str | Path) -> None
get_files_from_channel_name
Python
get_files_from_channel_name(channel_name: str) -> tuple[Path, Path, Path, Path]

Get metadata, raster and calibration file paths associated to input channel name.

Parameters:

Name Type Description Default
channel_name str

selected channel name

required

Returns:

Type Description
Path

metadata file path

Path

raster file path

Path

calibration file path

Path

noise file path

Functions:

convert_camel2snake

Python
convert_camel2snake(text: str) -> str

CamelCase to snake_case converter.

Parameters:

Name Type Description Default
text str

CamelCase text

required

Returns:

Type Description
str

snake_case text

data_scaling_factor_from_metadata_node

Python
data_scaling_factor_from_metadata_node(calibration_vector_node: _Element, radiometric_quantity: SARRadiometricQuantity = SARRadiometricQuantity.BETA_NOUGHT) -> float

Extract data scaling factor from safe Calibration xml metadata file.

Parameters:

Name Type Description Default
calibration_vector_node _Element

calibrationVectorList xml node

required
radiometric_quantity SARRadiometricQuantity

selected radiometric quantity, by default SARRadiometricQuantity.BETA_NOUGHT

BETA_NOUGHT

Returns:

Type Description
float

calibration scaling factor to be applied to raster data

raster_info_from_metadata_node

Python
raster_info_from_metadata_node(image_information_node: _Element, samples_step: float | None = None) -> RasterInfo

Creating a RasterInfo metadata element from safe xml node.

Parameters:

Name Type Description Default
image_information_node _Element

imageInformation metadata xml node

required
samples_step float | None

samples step in seconds, if no None it means that the product is SLC, otherwise it's GRD, by default None

None

Returns:

Type Description
RasterInfo

RasterInfo metadata object

burst_info_from_metadata

Python
burst_info_from_metadata(burst_node: _Element, raster_info: RasterInfo) -> BurstInfo

Generating BurstInfo object directly from metadata.

Parameters:

Name Type Description Default
burst_node _Element

swathTiming xml node

required
raster_info RasterInfo

raster info

required

Returns:

Type Description
BurstInfo

burst info dataclass

dataset_info_from_metadata_nodes

Python
dataset_info_from_metadata_nodes(header_node: _Element, product_info_node: _Element) -> DatasetInfo

Creating a DatasetInfo metadata element from safe xml nodes.

Parameters:

Name Type Description Default
header_node _Element

adsHeader metadata xml node

required
product_info_node _Element

productInformation metadata xml node

required

Returns:

Type Description
DatasetInfo

DatasetInfo metadata object

swath_info_from_metadata

Python
swath_info_from_metadata(product_info: _Element, downlink_info_node: _Element, swath: str) -> SwathInfo

Creating a SwathInfo metadata object from metadata file.

Parameters:

Name Type Description Default
product_info _Element

productInformation xml node

required
downlink_info_node _Element

downlinkInformation xml node

required
swath str

swath name

required

Returns:

Type Description
SwathInfo

SwathInfo metadata object

state_vectors_from_metadata

Python
state_vectors_from_metadata(orbit_node: _Element, orbit_type: S1OrbitType | None = None) -> StateVectors

Generating StateVectors object directly from product metadata.

Parameters:

Name Type Description Default
orbit_node _Element

orbitList xml node

required
orbit_type S1OrbitType

S1OrbitType orbit type, by default None

None

Returns:

Type Description
StateVectors

orbit's state vectors dataclass

sampling_constants_from_metadata_nodes

Python
sampling_constants_from_metadata_nodes(swath_processing_node: _Element, product_info_node: _Element, image_info_node: _Element) -> SARSamplingFrequencies

Creating a SARSamplingFrequencies metadata element from safe xml nodes.

Parameters:

Name Type Description Default
swath_processing_node _Element

swathProcParams metadata xml node

required
product_info_node _Element

productInformation metadata xml node

required
image_info_node _Element

imageInformation metadata xml node

required

Returns:

Type Description
SARSamplingFrequencies

SARSamplingFrequencies metadata object

acquisition_timeline_from_metadata_nodes

Python
acquisition_timeline_from_metadata_nodes(downlink_info_node: _Element) -> AcquisitionTimeline

Creating a AcquisitionTimeline metadata element from safe xml nodes.

Parameters:

Name Type Description Default
downlink_info_node _Element

downlinkInformation metadata xml node

required

Returns:

Type Description
AcquisitionTimeline

AcquisitionTimeline metadata object

doppler_centroid_evaluator_from_metadata_nodes

Python
doppler_centroid_evaluator_from_metadata_nodes(dc_estimate_node: _Element, estimate_method: S1DCEstimateMethod) -> DopplerEvaluator

Creating a DopplerEvaluator doppler centroid polynomial wrapper from metadata.

Parameters:

Name Type Description Default
dc_estimate_node _Element

dcEstimateList metadata xml node

required
estimate_method S1DCEstimateMethod

doppler centroid estimate method

required

Returns:

Type Description
DopplerEvaluator

DopplerEvaluator dataclass for Doppler Centroid polynomial

doppler_rate_evaluator_from_metadata_nodes

Python
doppler_rate_evaluator_from_metadata_nodes(azimuth_fm_rate_node: _Element) -> DopplerEvaluator

Creating a DopplerEvaluator doppler rate vector polynomial wrapper from metadata.

Parameters:

Name Type Description Default
azimuth_fm_rate_node _Element

azimuthFmRateList metadata xml node

required

Returns:

Type Description
DopplerEvaluator

DopplerEvaluator dataclass for Doppler Rate polynomial

coordinates_conversions_from_metadata

Python
coordinates_conversions_from_metadata(coord_conversion_node: _Element) -> CoordinatesConversions

Generating CoordinatesConversions object from metadata.

About coefficients annotated in metadata:

Coefficients of polynomial fit to the "Ground to Slant Range" transform applied. Fixed along all image slices. Defined with respect to (slant range in m)/(pixel no.)^n where first pixel in line is 0.

Values output in order A0, A1, ..., An, in order of increasing degree. Polynomial to be evaluated is: A_0+ A_1 x + ... + A_n x^n where x is pixel number in the line, starting from 0.

Evaluated polynomial gives Slant Range in meters.

Parameters:

Name Type Description Default
coord_conversion_node _Element

coordinateConversion xml node

required

Returns:

Type Description
CoordinatesConversions

polynomial for coordinate conversion dataclass

noise_from_metadata_nodes

Python
noise_from_metadata_nodes(noise_list_node: _Element) -> dict[str, S1Noise]

Creating a dictionary of S1Noise dataclass for each swath from safe xml node.

Parameters:

Name Type Description Default
noise_list_node _Element

noiseList metadata xml node

required

Returns:

Type Description
dict[str, S1Noise]

keys are the swaths, values are S1Noise dataclasses

antenna_pattern_from_metadata_nodes

Python
antenna_pattern_from_metadata_nodes(antenna_pattern_list_node: _Element) -> dict[str, S1AntennaPattern]

Creating a dictionary of S1AntennaPattern dataclass for each swath from safe xml node.

Parameters:

Name Type Description Default
antenna_pattern_list_node _Element

antennaPatternList metadata xml node

required

Returns:

Type Description
dict[str, S1AntennaPattern]

keys are the swaths, values are S1AntennaPattern dataclasses

burst_sensing_times_from_metadata

Python
burst_sensing_times_from_metadata(burst_node: _Element) -> np.ndarray | None

Generating burst sensing times array from metadata xml node.

Parameters:

Name Type Description Default
burst_node _Element

bursts xml node from metadata

required

Returns:

Type Description
ndarray | None

burst sensing times array, if any else None

get_noise_vectors

Python
get_noise_vectors(swath: str, azimuth_indexes: int | tuple[int, int], azimuth_noise_vectors: list[S1AzimuthNoiseVector] | None, range_noise_vectors: list[S1RangeNoiseVector], is_grd: bool) -> np.ndarray

Get the noise vector(s) from Sentinel-1 annotation file for the given azimuth index(es).

Parameters:

Name Type Description Default
swath str

current swath name

required
azimuth_indexes int | tuple[int, int]

azimuth index (int) at which the noise vector is to be computed, or a tuple [start, stop) of azimuth indices to get multiple vectors in the inclusive range (start included, stop excluded).

required
azimuth_noise_vectors list[S1AzimuthNoiseVector] | None

azimuth noise vectors, if any else None

required
range_noise_vectors list[S1RangeNoiseVector]

range noise vectors

required
is_grd bool

flag to indicate if the product is a GRD or not

required

Returns:

Type Description
ndarray

noise vectors along range samples, with shape (N,) when azimuth_index is an int, (M, N) when azimuth_index is a tuple.

Raises:

Type Description
ValueError

if no azimuth noise vectors are found for the given azimuth index

is_s1_safe_product

Python
is_s1_safe_product(product: str | Path) -> bool

Check if input path corresponds to a valid S1 Safe product, basic version.

Conditions to be met for basic validity: - path exists - path is a directory - path ends with SAFE - S1Product can be instantiated

Parameters:

Name Type Description Default
product str | Path

path to the product to be checked

required

Returns:

Type Description
bool

True if it is a valid S1 Safe, else False