Skip to content

STRIX

Reader Interface

Synspective StriX L1 product format reader.

Attributes

Classes

Functions:

read_channel_metadata

Python
read_channel_metadata(file_path: Path | str, channel_id: str) -> support.StriXChannelMetadata

Reading channel metadata info and storing them in a StriXChannelMetadata dataclass.

The assumption here is that .xml files are associated ONLY to GRD (GeoTiFF raster file), as reported in the official documentation, while NITF file is SLC only.

Parameters:

Name Type Description Default
file_path Path | str

Path to the metadata file, could be an .xml (GRD) or a .nitf file (SLC)

required
channel_id str

channel id

required

Returns:

Type Description
StriXChannelMetadata

StriXChannelMetadata metadata dataclass

read_channel_data

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

Reading StriX data file. It can be a GeoTiff .tif file (for GRD products) or an NITF .nitf file (for SLC).

Parameters:

Name Type Description Default
raster_file str | Path

Path to .tif or .nitf file

required
raster_info RasterInfo

channel raster info

required
orbit_direction OrbitDirection

orbit direction

required
looking_side LookingDirection

looking side

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.StriXProduct

Open a StriX product.

Parameters:

Name Type Description Default
pf_path str | Path

Path to the StriX product

required

Returns:

Type Description
StriXProduct

StriXProduct object corresponding to the input StriX product

Utilities

Synspective StriX reader support module.

Attributes

regex_collection module-attribute

Python
regex_collection = {'acquisition_mode': re.compile('(?<=<eop:operationalMode>).*(?=</eop:operationalMode>)'), 'polarization': re.compile('(?<=<sar:polarisationChannels>).*(?=</sar:polarisationChannels>)'), 'footprint': re.compile('(?<=<gml:posList>).*(?=</gml:posList>)'), 'lines': re.compile('(?<=<eop:numberOfLine>).*(?=</eop:numberOfLine>)'), 'samples': re.compile('(?<=<eop:numberOfPixel>).*(?=</eop:numberOfPixel>)'), 'samples_step': re.compile('(?<=<sar:rangePixelSpacing>).*(?=</sar:rangePixelSpacing>)'), 'azimuth_step': re.compile('(?<=<sar:azimuthPixelSpacing>).*(?=</sar:azimuthPixelSpacing>)'), 'orbit_direction': re.compile('(?<=<eop:orbitDirection>).*(?=</eop:orbitDirection>)'), 'signal_frequency': re.compile('(?<=<sar:carrierFrequency>).*(?=</sar:carrierFrequency>)'), 'range_sampling_frequency': re.compile('(?<=<sar:rangeSamplingFrequency>).*(?=</sar:rangeSamplingFrequency>)'), 'range_bandwidth': re.compile('(?<=<sar:chirpBandWidth>).*(?=</sar:chirpBandWidth>)'), 'look_side': re.compile('(?<=<sar:antennaLookDirection>).*(?=</sar:antennaLookDirection>)'), 'sensor': re.compile('(?<=<eop:shortName>).*(?=</eop:shortName>)'), 'sensor_id': re.compile('(?<=<eop:serialIdentifier>).*(?=</eop:serialIdentifier>)'), 'sv_num': re.compile('(?<=<numStateVectors>).*(?=</numStateVectors>)'), 'sv_time_utc': re.compile('(?<=<timeUTC>).*(?=</timeUTC>)'), 'sv_pos_x': re.compile('(?<=<posX>).*(?=</posX>)'), 'sv_pos_y': re.compile('(?<=<posY>).*(?=</posY>)'), 'sv_pos_z': re.compile('(?<=<posZ>).*(?=</posZ>)'), 'sv_vel_x': re.compile('(?<=<velX>).*(?=</velX>)'), 'sv_vel_y': re.compile('(?<=<velY>).*(?=</velY>)'), 'sv_vel_z': re.compile('(?<=<velZ>).*(?=</velZ>)'), 'local_value': re.compile('(?<=<eop:localValue>).*(?=</eop:localValue>)'), 'calibration_factor': re.compile('<eop:localAttribute>calibrationFactor</eop:localAttribute>'), 'acquisition_mid_center_time': re.compile('<eop:localAttribute>sceneCenterDateTime</eop:localAttribute>')}

Classes

InvalidStriXProduct

Bases: RuntimeError

Invalid StriX product

StriXProcessingLevel

Bases: Enum

StriX L1 processing level

Attributes

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

StriXOperationalModes

Bases: Enum

StriX Acquisition Modes

Attributes

STRIPMAP class-attribute instance-attribute
Python
STRIPMAP = 'STRIPMAP'
SLIDING_SPOTLIGHT class-attribute instance-attribute
Python
SLIDING_SPOTLIGHT = 'DYNAMIC STRIPMAP'
STARING_SPOTLIGHT class-attribute instance-attribute
Python
STARING_SPOTLIGHT = 'SPOTLIGHT'

StriXGeneralChannelInfo dataclass

StriX general channel info dataclass

Attributes

product_name instance-attribute
Python
product_name: str
channel_id instance-attribute
Python
channel_id: str
swath instance-attribute
Python
swath: str
processing_level instance-attribute
Python
processing_level: StriXProcessingLevel
polarization instance-attribute
Python
polarization: SARPolarization
projection instance-attribute
Python
projection: SARProjection
acquisition_mode instance-attribute
Python
acquisition_mode: StriXOperationalModes
acquisition_mode_std instance-attribute
Python
acquisition_mode_std: StandardSARAcquisitionMode
signal_frequency instance-attribute
Python
signal_frequency: float
acq_start_time instance-attribute
Python
acq_start_time: PreciseDateTime
acq_stop_time instance-attribute
Python
acq_stop_time: PreciseDateTime
orbit_direction class-attribute instance-attribute
Python
orbit_direction: OrbitDirection | None = None

Methods:

__init__
Python
__init__(product_name: str, channel_id: str, swath: str, processing_level: StriXProcessingLevel, polarization: SARPolarization, projection: SARProjection, acquisition_mode: StriXOperationalModes, acquisition_mode_std: StandardSARAcquisitionMode, signal_frequency: float, acq_start_time: PreciseDateTime, acq_stop_time: PreciseDateTime, orbit_direction: OrbitDirection | None = None) -> None
from_metadata classmethod
Python
from_metadata(root: str | SICDType, product_name: str, channel_id: str) -> StriXGeneralChannelInfo

Generating StriXGeneralChannelInfo object directly from metadata.

Parameters:

Name Type Description Default
root str | SICDType

xml metadata file content as string or SICDType object

required
product_name str

product name

required
channel_id str

channel id

required

Returns:

Type Description
StriXGeneralChannelInfo

general channel info dataclass

StriXChannelMetadata dataclass

StriX channel metadata dataclass

Attributes

general_info instance-attribute
Python
general_info: StriXGeneralChannelInfo
orbit instance-attribute
Python
orbit: Trajectory
image_calibration_factor instance-attribute
Python
image_calibration_factor: float
image_radiometric_quantity instance-attribute
Python
image_radiometric_quantity: SARRadiometricQuantity
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
doppler_centroid_poly instance-attribute
Python
doppler_centroid_poly: DopplerEvaluator | None
doppler_rate_poly instance-attribute
Python
doppler_rate_poly: DopplerEvaluator | None
coordinate_conversions instance-attribute
Python
coordinate_conversions: CoordinatesConversions
state_vectors instance-attribute
Python
state_vectors: StateVectors

Methods:

__init__
Python
__init__(general_info: StriXGeneralChannelInfo, orbit: Trajectory, image_calibration_factor: float, image_radiometric_quantity: SARRadiometricQuantity, burst_info: BurstInfo, raster_info: RasterInfo, dataset_info: DatasetInfo, swath_info: SwathInfo, sampling_constants: SARSamplingFrequencies, doppler_centroid_poly: DopplerEvaluator | None, doppler_rate_poly: DopplerEvaluator | None, coordinate_conversions: CoordinatesConversions, state_vectors: StateVectors) -> None

StriXProduct

StriX product object

Attributes

acquisition_time property
Python
acquisition_time: PreciseDateTime

Acquisition start time for this product

channels_number property
Python
channels_number: int

Returning the number of channels of StriX product

channels_list property
Python
channels_list: list[str]

Returning the list of channels

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

StriX Product init from directory path.

Parameters:

Name Type Description Default
path str | Path

path to StriX product

required
get_files_from_channel_name
Python
get_files_from_channel_name(channel_name: str) -> list[Path] | Path

Get files associated to a given channel name.

GRD channels will return a list of two paths: .xml metadata file, .tif GeoTiff raster file

SLC channels will return a list of a single path: .nitf NITF file

Parameters:

Name Type Description Default
channel_name str

channel id name

required

Returns:

Type Description
list[Path] | Path

path to grd metadata and raster file, or path to slc file

Functions:

get_basic_info_from_metadata

Python
get_basic_info_from_metadata(root: str | SICDType) -> tuple[StriXOperationalModes, PreciseDateTime, PreciseDateTime, PreciseDateTime, SARPolarization, tuple[float, float, float, float]]

Get the product acquisition mode, acquisition start time, polarization and footprint from metadata file.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required

Returns:

Type Description
StriXOperationalModes

Strix acquisition mode

PreciseDateTime

acquisition start time

PreciseDateTime

acquisition mid center time

PreciseDateTime

acquisition stop time

SARPolarization

product polarization

tuple[float, float, float, float]

product footprint

raster_info_from_metadata

Python
raster_info_from_metadata(root: str | SICDType, orbit: Trajectory) -> RasterInfo

Creating a RasterInfo metadata object from metadata file.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required
orbit Trajectory

sensor orbit

required

Returns:

Type Description
RasterInfo

RasterInfo metadata object

burst_info_from_metadata

Python
burst_info_from_metadata(raster_info: RasterInfo) -> BurstInfo

Generating BurstInfo object directly from metadata.

Parameters:

Name Type Description Default
raster_info RasterInfo

product raster info

required

Returns:

Type Description
BurstInfo

burst info dataclass

dataset_info_from_metadata

Python
dataset_info_from_metadata(root: str | SICDType) -> DatasetInfo

Creating a DatasetInfo metadata object from metadata file.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required

Returns:

Type Description
DatasetInfo

DatasetInfo metadata object

state_vectors_from_metadata

Python
state_vectors_from_metadata(root: str | SICDType) -> StateVectors

Generating StateVectors object directly from product metadata.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required

Returns:

Type Description
StateVectors

orbit's state vectors dataclass

sampling_constants_from_metadata

Python
sampling_constants_from_metadata(root: str | SICDType, lines_step: float) -> SARSamplingFrequencies

Creating a SARSamplingFrequencies metadata object from metadata file.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required
lines_step float

azimuth lines step

required

Returns:

Type Description
SARSamplingFrequencies

SARSamplingFrequencies metadata object

doppler_centroid_poly_from_metadata_node

Python
doppler_centroid_poly_from_metadata_node(root: str | SICDType, raster_info: RasterInfo) -> DopplerEvaluator | None

Creating a DopplerEvaluator doppler centroid polynomial wrapper from metadata.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object

required
raster_info RasterInfo

channel raster info

required

Returns:

Type Description
DopplerEvaluator | None

DopplerEvaluator dataclass for Doppler Centroid polynomial

doppler_rate_poly_from_metadata

Python
doppler_rate_poly_from_metadata(root: str | SICDType, raster_info: RasterInfo, orbit: Trajectory) -> DopplerEvaluator | None

Creating a DopplerEvaluator doppler rate vector polynomial wrapper from metadata.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object

required
raster_info RasterInfo

channel raster info

required
orbit Trajectory

sensor orbit

required

Returns:

Type Description
DopplerEvaluator | None

DopplerEvaluator dataclass for Doppler Rate polynomial, if any else None

get_calibration_factor_and_quantity_from_metadata

Python
get_calibration_factor_and_quantity_from_metadata(root: str | SICDType) -> float

Get the calibration factor and radiometric quantity from metadata file.

Parameters:

Name Type Description Default
root str | SICDType

metadata root object, string file content or SICDType object

required

Returns:

Type Description
float

calibration factor

SARRadiometricQuantity

radiometric quantity

coordinates_conversions_from_metadata

Python
coordinates_conversions_from_metadata(root: str | SICDType, raster_info: RasterInfo, orbit: Trajectory) -> 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
root str | SICDType

metadata root object, string file content or SICDType object

required
raster_info RasterInfo

product raster info

required
orbit Trajectory

sensor orbit

required

Returns:

Type Description
CoordinatesConversions

polynomial for coordinate conversion dataclass

is_strix_product

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

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

Conditions to be met for basic validity: - path exists - path is a file - metadata can be found (GRD) - metadata can be read (GRD, SLC)

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 product, else False