Skip to content

NovaSAR-1

Reader Interface

NOVASAR-1 product format reader.

Classes

Functions:

read_product_metadata

Python
read_product_metadata(xml_path: str | Path) -> dict[str, support.NovaSAR1ChannelMetadata]

Read NovaSAR-1 product metadata.

Parameters:

Name Type Description Default
xml_path str | Path

Path to the .xml metadata file

required

Returns:

Type Description
dict[str, NovaSAR1ChannelMetadata]

dictionary with channel id as keys and NovaSAR1ChannelMetadata dataclass as values

read_channel_data

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

Reading NovaSAR-1 tif channel data file.

Parameters:

Name Type Description Default
raster_file str | Path

Path to .tif 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 multiplied 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.NovaSAR1Product

Open a NovaSAR-1 product.

Parameters:

Name Type Description Default
pf_path str | Path

Path to the NovaSAR-1 product

required

Returns:

Type Description
NovaSAR1Product

NovaSAR1Product object corresponding to the input NovaSAR-1 product

Utilities

NOVASAR-1 reader support module.

Classes

InvalidNovaSAR1Product

Bases: RuntimeError

Invalid NovaSAR-1 product

NovaSAR1ProductType

Bases: Enum

NovaSAR-1 L1 product types

Attributes

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

NovaSAR1AcquisitionModes

Bases: Enum

NovaSAR-1 L1 acquisition modes

Attributes

STRIPMAP class-attribute instance-attribute
Python
STRIPMAP = auto()
SCANSAR class-attribute instance-attribute
Python
SCANSAR = auto()

NovaSAR1ReferenceFrameType

Bases: Enum

NovaSAR-1 available reference frames

Attributes

ZERO_DOPPLER class-attribute instance-attribute
Python
ZERO_DOPPLER = auto()

NovaSAR1TimeOrdering

Bases: Enum

NovaSAR-1 available Time Ordering

Attributes

INCREASING class-attribute instance-attribute
Python
INCREASING = auto()
DECREASING class-attribute instance-attribute
Python
DECREASING = auto()

NovaSAR1Attitude dataclass

NovaSAR-1 sensor's attitude

Attributes

num instance-attribute
Python
num: int
frame instance-attribute
Python
frame: NovaSAR1ReferenceFrameType
yaw instance-attribute
Python
yaw: ndarray
pitch instance-attribute
Python
pitch: ndarray
roll instance-attribute
Python
roll: ndarray
time_axis instance-attribute
Python
time_axis: ndarray
time_step instance-attribute
Python
time_step: float

Methods:

__init__
Python
__init__(num: int, frame: NovaSAR1ReferenceFrameType, yaw: ndarray, pitch: ndarray, roll: ndarray, time_axis: ndarray, time_step: float) -> None
from_metadata_node staticmethod
Python
from_metadata_node(orbit_data_node: _Element, image_gen_params_node: _Element) -> NovaSAR1Attitude

Generating NovaSAR1Attitude object directly from metadata xml node.

Parameters:

Name Type Description Default
orbit_data_node _Element

OrbitData xml node

required
image_gen_params_node _Element

Image_Generation_Parameters metadata xml node

required

Returns:

Type Description
NovaSAR1Attitude

sensor's attitude dataclass

NovaSAR1IncidenceAnglePolynomial dataclass

NovaSAR-1 Incidence Angle Polynomial

Attributes

incidence_angles class-attribute instance-attribute
Python
incidence_angles: list[ConversionFunction] | None = None
azimuth_reference_times class-attribute instance-attribute
Python
azimuth_reference_times: ndarray | None = None

Methods:

__init__
Python
__init__(incidence_angles: list[ConversionFunction] | None = None, azimuth_reference_times: ndarray | None = None) -> None
from_metadata_node staticmethod
Python
from_metadata_node(image_generation_parameters_node: _Element, raster_info: RasterInfo) -> NovaSAR1IncidenceAnglePolynomial

Generating NovaSAR1IncidenceAnglePolynomial object directly from metadata xml node.

About coefficients annotated in metadata:

Polynomial coefficients for incidence angle at pixel position. Fixed along all image slices. Defined with respect to (angles in deg)/(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 Incidence Angle in deg.

Parameters:

Name Type Description Default
image_generation_parameters_node _Element

Image_Generation_Parameters metadata xml node

required
raster_info RasterInfo

product raster info

required

Returns:

Type Description
NovaSAR1IncidenceAnglePolynomial

polynomial for incidence angle computation

evaluate_incidence_angle
Python
evaluate_incidence_angle(azimuth_time: PreciseDateTime, range_pixels: ArrayLike) -> float

Compute incidence angle at given time.

Parameters:

Name Type Description Default
azimuth_time PreciseDateTime

azimuth time to select the proper polynomial to be used for conversion

required
range_pixels ArrayLike

range pixel index

required

Returns:

Type Description
float

incidence angle in degrees

NovaSAR1GeneralChannelInfo dataclass

NovaSAR-1 general channel info representation dataclass

Attributes

product_name instance-attribute
Python
product_name: str
product_id instance-attribute
Python
product_id: int
channel_id instance-attribute
Python
channel_id: str
swath instance-attribute
Python
swath: str
satellite instance-attribute
Python
satellite: str
acq_start_time instance-attribute
Python
acq_start_time: PreciseDateTime
product_type instance-attribute
Python
product_type: NovaSAR1ProductType
acquisition_mode instance-attribute
Python
acquisition_mode: NovaSAR1AcquisitionModes
acquisition_mode_std instance-attribute
Python
acquisition_mode_std: StandardSARAcquisitionMode
polarization instance-attribute
Python
polarization: SARPolarization
projection instance-attribute
Python
projection: SARProjection
orbit_direction instance-attribute
Python
orbit_direction: OrbitDirection

Methods:

__init__
Python
__init__(product_name: str, product_id: int, channel_id: str, swath: str, satellite: str, acq_start_time: PreciseDateTime, product_type: NovaSAR1ProductType, acquisition_mode: NovaSAR1AcquisitionModes, acquisition_mode_std: StandardSARAcquisitionMode, polarization: SARPolarization, projection: SARProjection, orbit_direction: OrbitDirection) -> None
from_metadata_node staticmethod
Python
from_metadata_node(product_node: _Element, source_attributes_node: _Element, orbit_data_node: _Element, prod_type: NovaSAR1ProductType, channel_id: str) -> NovaSAR1GeneralChannelInfo

Generating S1GeneralChannelInfo object directly from metadata xml nodes.

Parameters:

Name Type Description Default
product_node _Element

Product metadata xml node

required
source_attributes_node _Element

Source_Attributes metadata xml node

required
orbit_data_node _Element

OrbitData metadata xml node

required
prod_type NovaSAR1ProductTypes

product type

required
channel_id str

channel id

required

Returns:

Type Description
NovaSAR1GeneralChannelInfo

general channel info dataclass

NovaSAR1ChannelMetadata dataclass

NovaSAR-1 channel metadata xml file wrapper

Attributes

general_info instance-attribute
Python
general_info: NovaSAR1GeneralChannelInfo
orbit instance-attribute
Python
orbit: Trajectory
attitude instance-attribute
Python
attitude: NovaSAR1Attitude
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
incidence_angles_poly instance-attribute
Python
incidence_angles_poly: NovaSAR1IncidenceAnglePolynomial
pulse instance-attribute
Python
pulse: PulseInfo
coordinate_conversions instance-attribute
Python
coordinate_conversions: CoordinatesConversions
state_vectors instance-attribute
Python
state_vectors: StateVectors

Methods:

__init__
Python
__init__(general_info: NovaSAR1GeneralChannelInfo, orbit: Trajectory, attitude: NovaSAR1Attitude, 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, incidence_angles_poly: NovaSAR1IncidenceAnglePolynomial, pulse: PulseInfo, coordinate_conversions: CoordinatesConversions, state_vectors: StateVectors) -> None

NovaSAR1Product

NovaSAR-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 of NovaSAR product

metadata_file property
Python
metadata_file: Path

Returning the product metadata file path of NovaSAR product

channels_number property
Python
channels_number: int

Returning the number of channels of NovaSAR product

channels_list property
Python
channels_list: list[str]

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

product_type property
Python
product_type: NovaSAR1ProductType

Returning the product type

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

NovaSAR Product init from directory path.

Parameters:

Name Type Description Default
path str | Path

path to NovaSAR product

required
get_raster_files_from_channel_name
Python
get_raster_files_from_channel_name(channel_name: str) -> Path

Get raster file path associated to input channel name.

Parameters:

Name Type Description Default
channel_name str

selected channel name

required

Returns:

Type Description
Path

raster file path

Functions:

get_basic_info_from_metadata

Python
get_basic_info_from_metadata(metadata_path: str | Path) -> tuple[PreciseDateTime, NovaSAR1ProductType, list[str], tuple[float, float, float, float]]

Recovering acquisition time and list of channels.

Parameters:

Name Type Description Default
metadata_path str | Path

Path to NovaSAR-1 metadata file

required

Returns:

Type Description
tuple[PreciseDateTime, NovaSAR1ProductTypes, list[str]]

acquisition time in PreciseDateTime format, product type, list of channels ids, scene footprint [min lat, max lat, min lon, max lon]

Raises:

Type Description
RuntimeError

if acquisition mode is not stripmap nor scansar

get_acquisition_mode_from_product_type

Python
get_acquisition_mode_from_product_type(prod_type: NovaSAR1ProductType) -> NovaSAR1AcquisitionModes

Get product acquisition mode from product type.

Parameters:

Name Type Description Default
prod_type NovaSAR1ProductTypes

product type

required

Returns:

Type Description
NovaSAR1AcquisitionModes

product acquisition mode

get_projection_from_product_type

Python
get_projection_from_product_type(prod_type: NovaSAR1ProductType) -> SARProjection

Get product projection from product type.

Parameters:

Name Type Description Default
prod_type NovaSAR1ProductTypes

product type

required

Returns:

Type Description
SARProjection

product projection

raster_info_from_metadata_nodes

Python
raster_info_from_metadata_nodes(image_generation_parameters_node: _Element, image_attributes_node: _Element, product_type: NovaSAR1ProductType) -> RasterInfo

Creating a RasterInfo metadata element from xml node.

Parameters:

Name Type Description Default
image_generation_parameters_node _Element

Image_Generation_Parameters metadata xml node

required
image_attributes_node _Element

Image_Attributes metadata xml node

required
product_type NovaSAR1ProductTypes

product type

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_node

Python
dataset_info_from_metadata_node(source_attributes_node: _Element, prod_type: NovaSAR1ProductType) -> DatasetInfo

Creating a DatasetInfo metadata element from safe xml nodes.

Parameters:

Name Type Description Default
source_attributes_node _Element

Source_Attributes metadata xml node

required
prod_type NovaSAR1ProductTypes

product type

required

Returns:

Type Description
DatasetInfo

DatasetInfo metadata object

swath_info_from_metadata

Python
swath_info_from_metadata(source_attributes_node: _Element, acq_mode: NovaSAR1AcquisitionModes) -> SwathInfo

Creating a SwathInfo metadata object from metadata file.

Parameters:

Name Type Description Default
source_attributes_node _Element

Source_Attributes xml node

required
acq_mode _Element

product acquisition mode

required

Returns:

Type Description
SwathInfo

SwathInfo metadata object

state_vectors_from_metadata

Python
state_vectors_from_metadata(orbit_data_node: _Element) -> StateVectors

Generating StateVectors object directly from product metadata.

Parameters:

Name Type Description Default
orbit_data_node _Element

OrbitInformation xml node

required

Returns:

Type Description
StateVectors

orbit's state vectors dataclass

sampling_constants_from_metadata

Python
sampling_constants_from_metadata(image_generation_parameters_node: _Element, raster_info: RasterInfo, product_type: NovaSAR1ProductType) -> SARSamplingFrequencies

Creating a SARSamplingFrequencies metadata object from metadata file.

Parameters:

Name Type Description Default
image_generation_parameters_node _Element

ImageGenerationParameters xml node

required
raster_info RasterInfo

product raster info

required
product_type NovaSAR1ProductType

product type

required

Returns:

Type Description
SARSamplingFrequencies

SARSamplingFrequencies metadata object

pulse_info_from_metadata_nodes

Python
pulse_info_from_metadata_nodes(image_generation_parameters_node: _Element, source_attributes_node: _Element, samples_step: float) -> PulseInfo

Creating a PulseInfo dataclass from xml nodes.

Parameters:

Name Type Description Default
image_generation_parameters_node _Element

Image_Generation_Parameters metadata xml node

required
source_attributes_node _Element

Source_Attributes metadata xml node

required
samples_step float

raster info samples step

required

Returns:

Type Description
PulseInfo

PulseInfo dataclass

Raises:

Type Description
RuntimeError

unsupported chirp direction

doppler_centroid_poly_from_metadata_node

Python
doppler_centroid_poly_from_metadata_node(image_generation_parameters_node: _Element, raster_info: RasterInfo) -> DopplerEvaluator

Creating a DopplerEvaluator doppler centroid polynomial wrapper from metadata.

Parameters:

Name Type Description Default
image_generation_parameters_node _Element

Image_Generation_Parameters metadata xml node

required
raster_info RasterInfo

product raster info

required

Returns:

Type Description
DopplerEvaluator

DopplerEvaluator dataclass for Doppler Centroid polynomial

coordinates_conversions_from_metadata

Python
coordinates_conversions_from_metadata(image_generation_parameters_node: _Element, raster_info: RasterInfo) -> 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
image_generation_parameters_node _Element

Image_Generation_Parameters metadata xml node

required
raster_info RasterInfo

product raster info

required

Returns:

Type Description
CoordinatesConversions

polynomial for coordinate conversion dataclass

is_novasar_1_product

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

Check if input path corresponds to a valid NovaSAR-1 product, basic version.

Conditions to be met for basic validity: - path exists - path is a directory - metadata file exists - basic info from metadata file can be read

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