Skip to content

API

Product Folder Format

Product Folder utilities.

Attributes

__all__ module-attribute

Python
__all__ = ['ProductFolder', 'create_product_folder', 'delete_product_folder_content', 'is_product_folder', 'is_valid_product_folder', 'open_product_folder', 'rename_product_folder']

Classes

ProductFolder

Product Folder main object.

Attributes

name property
Python
name: str

The Product Folder base name.

path property
Python
path: Path

The Product Folder path.

manifest property
Python
manifest: Path

Manifest full path.

raster_extension property
Python
raster_extension: RasterExtension

The channel raster file extension.

channel_ids property
Python
channel_ids: list[int]

The list of available channels on disk for the current Product Folder.

Returns:

Type Description
list[int]

list of integers corresponding to the available channels.

Raises:

Type Description
RuntimeError

if the current path is not a valid product folder

config_path property
Python
config_path: Path

Getter method for retrieving Product Folder config file path.

Returns:

Type Description
Path

Path to the Product Folder config file.

overlay_path property
Python
overlay_path: Path

Getter method for retrieving Product Folder overlay (.kmz) file path.

Returns:

Type Description
Path

Path to the Product Folder overlay file.

Methods:

__init__
Python
__init__(path: str | Path, raster_extension: RasterExtension = '') -> None

Generate a Product Folder object from its path and the extension of its data files.

Parameters:

Name Type Description Default
path str | Path

path to the selected Product Folder

required
raster_extension RasterExtension

extension of channel raster data files, by default "".

''
rename
Python
rename(new_path: str | Path) -> None

Rename current product folder with new path.

Parameters:

Name Type Description Default
new_path str | Path

new full path for the current product folder.

required
delete
Python
delete() -> None

Delete current product on disk.

channel_metadata_path
Python
channel_metadata_path(channel: int) -> Path

Getter method for retrieving Product Folder channel's metadata path.

Parameters:

Name Type Description Default
channel int

channel id.

required

Returns:

Type Description
Path

Path to the selected channel's metadata files

channel_data_path
Python
channel_data_path(channel: int) -> Path

Getter method for retrieving Product Folder channel's raster file path.

Parameters:

Name Type Description Default
channel int

channel id.

required

Returns:

Type Description
Path

Path to the selected channel's raster file

channel_quicklook_path
Python
channel_quicklook_path(ext: QuicklookExtension, channel_id: int) -> Path

Quicklook full path for the selected channel.

Parameters:

Name Type Description Default
ext QuicklookExtension

quicklook extension

required
channel_id int

channel number.

required

Returns:

Type Description
Path

Path to the quicklook image corresponding to the selected channel

__str__
Python
__str__() -> str

Return a human-readable representation of the Product Folder.

__repr__
Python
__repr__() -> str

Return an unambiguous representation of the Product Folder.

Functions:

create_product_folder

Python
create_product_folder(pf_path: str | Path, raster_extension: RasterExtension = '', *, overwrite_ok: bool = False, description: str | None = None) -> ProductFolder

Create a new Product Folder layout at the desired location.

If the path provided already exists, it raises an error unless the overwrite_ok flag is set to True. In this case, if the target location corresponds to a valid Product Folder, the Product is erased and overwritten.

Parameters:

Name Type Description Default
pf_path str | Path

path to the location where to create the Product Folder

required
raster_extension RasterExtension

extension of the channel's raster data file to be written in Manifest, by default ""

''
overwrite_ok bool

if True, if a valid Product Folder is located at the given path, it is overwritten, by default False

False
description str | None

description of the product folder, by default None

None

Returns:

Type Description
ProductFolder

Product Folder object

Raises:

Type Description
RuntimeError

if path already exist but the path does not correspond to a valid Product Folder

RuntimeError

if input path already exist but overwrite permissions are not given

open_product_folder

Python
open_product_folder(pf_path: str | Path) -> ProductFolder

Open Product Folder at the provided location.

Parameters:

Name Type Description Default
pf_path str | Path

path to the location where to create the Product Folder.

required

Returns:

Type Description
ProductFolder

Product Folder object

Raises:

Type Description
RuntimeError

if path provided does not exist

RuntimeError

if path provided exist but does not correspond to a valid Product Folder

is_product_folder

Python
is_product_folder(pf_path: str | Path) -> bool

Check if input path corresponds to a valid Product Folder, basic version.

Conditions to be met for Product Folder validity: - path exists - path is a directory - manifest exist - manifest can be loaded

Parameters:

Name Type Description Default
pf_path str | Path

path to Product Folder to be checked

required

Returns:

Type Description
bool

true if path is a Product Folder, else False

is_valid_product_folder

Python
is_valid_product_folder(pf_path: str | Path) -> bool

Check if the input path corresponds to a valid Product Folder.

Conditions to be met for Product Folder validity: - path exists - path is a directory - manifest exists - pairing between channel metadata and data, aka a raster for each header

Parameters:

Name Type Description Default
pf_path str | Path

path to the selected Product Folder

required

Returns:

Type Description
bool

True if path corresponds to a valid Product Folder, else False

delete_product_folder_content

Python
delete_product_folder_content(product_folder: ProductFolder) -> None

Safely deleting a Product Folder on disk at the selected location.

Removing main constituents of a Product Folder based on ProductFolder input object. If more files than the essential ones are found inside the Product Folder directory, the whole directory is not removed and those files only are preserved. Quicklook files are not considered part of the ProductFolder structure, so they are always kept.

If there any files left in the folder after removing the main constituents, the manifest file is formatted to the default factory value and the folder is not deleted. Otherwise, if only the manifest file is left, it is removed along with the folder itself.

Parameters:

Name Type Description Default
product_folder ProductFolder

Product Folder object corresponding to the Product Folder on disk to be removed

required

rename_product_folder

Python
rename_product_folder(current_folder: str | Path, new_folder: str | Path) -> None

Rename a Product Folder keeping all files and properly renaming them.

Channel metadata are edited to replace the old Filename field with the new one.

Parameters:

Name Type Description Default
current_folder str | Path

current Product Folder, full path

required
new_folder str | Path

desired Product Folder, full path

required

Raises:

Type Description
RuntimeError

if current folder does not exist or is not a directory

Product Folder layout definition.

Attributes

__all__ module-attribute

Python
__all__ = ['METADATA_EXTENSION', 'ProductFolderLayout', 'QuicklookExtension', 'RasterExtension']

METADATA_EXTENSION module-attribute

Python
METADATA_EXTENSION = '.xml'

CONFIG_EXTENSION module-attribute

Python
CONFIG_EXTENSION = '.config'

OVERLAY_EXTENSION module-attribute

Python
OVERLAY_EXTENSION = '.kmz'

MANIFEST_NAME module-attribute

Python
MANIFEST_NAME = 'aresys_product'

RasterExtension module-attribute

Python
RasterExtension: TypeAlias = Literal['', '.tiff']

QuicklookExtension module-attribute

Python
QuicklookExtension: TypeAlias = Literal['.png', '.jpg']

Classes

ProductFolderLayout

Class that manages the whole product folder layout and file paths.

Attributes

product_name property
Python
product_name: str

Accessing Product Folder base name.

Methods:

__init__
Python
__init__(path: str | Path) -> None

Product folder layout definition.

Build full paths to channel dependent raster files (with specified extension), metadata files (with default extension), quicklook files (with specified extension) and product folder related config file and overlay (.kmz) file.

Parameters:

Name Type Description Default
path str | Path

path to the product folder

required
generate_manifest_path staticmethod
Python
generate_manifest_path(pf_path: Path) -> Path

Generate the manifest file full path for the current Product Folder.

Parameters:

Name Type Description Default
pf_path Path

Product Folder absolute base path.

required

Returns:

Type Description
Path

full path to manifest file

get_config_path
Python
get_config_path() -> Path

Retrieve config full path.

Returns:

Type Description
Path

path to the product folder's config file.

get_overlay_path
Python
get_overlay_path() -> Path

Retrieve the overlay kmz archive full path.

Returns:

Type Description
Path

path to the product folder's overlay file (.kmz archive).

get_channel_metadata_path
Python
get_channel_metadata_path(channel_id: int) -> Path

Retrieve the channel metadata full path for the given channel number.

Parameters:

Name Type Description Default
channel_id int

channel number of choice.

required

Returns:

Type Description
Path

path to the channel's metadata file for the channel of choice

get_channel_data_path
Python
get_channel_data_path(channel_id: int, extension: RasterExtension) -> Path

Retrieve the channel data full path for the given channel number.

Parameters:

Name Type Description Default
channel_id int

channel number of choice

required
extension RasterExtension

extension of raster data file in folder.

required

Returns:

Type Description
Path

full path to the channel's data file for the channel of choice

get_channel_quicklook_path
Python
get_channel_quicklook_path(channel_id: int, extension: QuicklookExtension) -> Path

Retrieve the channel quicklook full path for the given channel number.

Parameters:

Name Type Description Default
channel_id int

channel number of choice

required
extension QuicklookExtension

extension of quicklook image file in folder.

required

Returns:

Type Description
Path

full path to the channel's quicklook file for the channel of choice

Product Folder manifest definition.

Attributes

__all__ module-attribute

Python
__all__ = ['Manifest']

Classes

Manifest dataclass

Product folder manifest document dataclass.

Attributes

version class-attribute instance-attribute
Python
version: str = _VERSION
description class-attribute instance-attribute
Python
description: str | None = None
datafile_extension class-attribute instance-attribute
Python
datafile_extension: RasterExtension = ''

Methods:

__init__
Python
__init__(version: str = _VERSION, description: str | None = None, datafile_extension: RasterExtension = '') -> None
write
Python
write(file_path: str | Path) -> None

Write manifest file to disk.

Parameters:

Name Type Description Default
file_path str | Path

path of the file to be written, comprehensive of file name.

required
from_file staticmethod
Python
from_file(file_path: str | Path) -> Manifest

Read manifest xml document from file.

Parameters:

Name Type Description Default
file_path str | Path

path to the xml manifest file.

required

Returns:

Type Description
Manifest

Manifest dataclass containing all the info from loaded file

Raises:

Type Description
RuntimeError

if the input file does not exist

ValueError

if the raster extension found in the manifest is not valid

Metadata

Aresys product metadata definition.

Attributes

__all__ module-attribute

Python
__all__ = ['MetaData', 'MetaDataChannel', 'create_new_metadata']

Classes

MetaDataChannel dataclass

MetaDataChannel class.

Attributes

content_id class-attribute instance-attribute
Python
content_id: str | None = None
number class-attribute instance-attribute
Python
number: int | None = None
total class-attribute instance-attribute
Python
total: int | None = None
elements class-attribute instance-attribute
Python
elements: dict[MetaDataElementName, MetaDataPydanticModel] = field(default_factory=dict)
sampling_constants property
Python
sampling_constants: SamplingConstants

SamplingConstants.

Returns:

Type Description
SamplingConstants

SamplingConstants metadata element.

pulse property
Python
pulse: Pulse

Pulse.

Returns:

Type Description
Pulse

Pulse metadata element.

raster_info property
Python
raster_info: RasterInfo

RasterInfo.

Returns:

Type Description
RasterInfo

RasterInfo metadata element.

dataset_info property
Python
dataset_info: DataSetInfo

DataSetInfo.

Returns:

Type Description
DataSetInfo

DataSetInfo metadata element.

state_vectors property
Python
state_vectors: StateVectors

StateVectors.

Returns:

Type Description
StateVectors

StateVectors metadata element.

attitude_info property
Python
attitude_info: AttitudeInfo

AttitudeInfo.

Returns:

Type Description
AttitudeInfo

AttitudeInfo metadata element.

acquisition_time_line property
Python
acquisition_time_line: AcquisitionTimeLine

AcquisitionTimeLine.

Returns:

Type Description
AcquisitionTimeLine

AcquisitionTimeLine metadata element.

ground_corner_points property
Python
ground_corner_points: GroundCornerPoints

GroundCornerPoints.

Returns:

Type Description
GroundCornerPoints

GroundCornerPoints metadata element.

burst_info property
Python
burst_info: BurstInfo

BurstInfo.

Returns:

Type Description
BurstInfo

BurstInfo metadata element.

doppler_centroid property
Python
doppler_centroid: DopplerCentroidVector

DopplerCentroidVector.

Returns:

Type Description
DopplerCentroidVector

DopplerCentroidVector metadata element.

doppler_rate property
Python
doppler_rate: DopplerRateVector

DopplerRateVector.

Returns:

Type Description
DopplerRateVector

DopplerRateVector metadata element.

tops_azimuth_modulation_rate property
Python
tops_azimuth_modulation_rate: TopsAzimuthModulationRateVector

TopsAzimuthModulationRateVector.

Returns:

Type Description
TopsAzimuthModulationRateVector

TopsAzimuthModulationRateVector metadata element.

slant_to_ground property
Python
slant_to_ground: SlantToGroundVector

SlantToGroundVector.

Returns:

Type Description
SlantToGroundVector

SlantToGroundVector metadata element.

ground_to_slant property
Python
ground_to_slant: GroundToSlantVector

GroundToSlantVector.

Returns:

Type Description
GroundToSlantVector

GroundToSlantVector metadata element.

slant_to_incidence property
Python
slant_to_incidence: SlantToIncidenceVector

SlantToIncidenceVector.

Returns:

Type Description
SlantToIncidenceVector

SlantToIncidenceVector metadata element.

slant_to_elevation property
Python
slant_to_elevation: SlantToElevationVector

SlantToElevationVector.

Returns:

Type Description
SlantToElevationVector

SlantToElevationVector metadata element.

antenna_info property
Python
antenna_info: AntennaInfo

AntennaInfo.

Returns:

Type Description
AntennaInfo

AntennaInfo metadata element.

data_statistics property
Python
data_statistics: DataStatistics

DataStatistics.

Returns:

Type Description
DataStatistics

DataStatistics metadata element.

swath_info property
Python
swath_info: SwathInfo

SwathInfo.

Returns:

Type Description
SwathInfo

SwathInfo metadata element.

coreg_poly property
Python
coreg_poly: CoregPolyVector

CoregPolyVector.

Returns:

Type Description
CoregPolyVector

CoregPolyVector metadata element.

Methods:

__init__
Python
__init__(content_id: str | None = None, number: int | None = None, total: int | None = None, elements: dict[MetaDataElementName, MetaDataPydanticModel] = dict()) -> None
__contains__
Python
__contains__(item: MetaDataElementName) -> bool

Overloaded method to check if the element is available in the metadata channel.

insert_element
Python
insert_element(element: MetaDataPydanticModel, *, overwrite_ok: bool = False) -> None

Insert the specified metadata element.

Parameters:

Name Type Description Default
element MetaDataPydanticModel

metadata element to insert

required
overwrite_ok bool

overwrite existing metadata element of the same type. False by default.

False

Raises:

Type Description
RuntimeError

if the element is not supported in the current metadata channel

RuntimeError

if the element is already present and overwrite_ok is False

remove_element
Python
remove_element(element_type: MetaDataElementName) -> None

Remove specified channel element.

Parameters:

Name Type Description Default
element_type MetaDataElementName

element name.

required
get_element
Python
get_element(element_type: MetaDataElementName) -> mtd_elements.MetaDataPydanticModel

Channel metadata element from element name.

Parameters:

Name Type Description Default
element_type MetaDataElementName

element name.

required

Returns:

Type Description
MetaDataPydanticModel

channel metadata element

Raises:

Type Description
RuntimeError

if element is not available in the current metadata channel

trajectory
Python
trajectory() -> CubicSplineTrajectory

Create a CubicSplineTrajectory from the state vector data.

attitude
Python
attitude() -> Attitude

Create an Attitude object from the attitude data.

doppler_centroid_poly
Python
doppler_centroid_poly() -> DopplerCentroidPoly

Create a DopplerCentroidPoly from the doppler centroid metadata element.

doppler_rate_poly
Python
doppler_rate_poly() -> DopplerRatePoly

Create a DopplerRatePoly from the doppler rate metadata element.

tops_azimuth_modulation_rate_poly
Python
tops_azimuth_modulation_rate_poly() -> TopsAzimuthModulationRatePoly

Create a TopsAzimuthModulationRatePoly from the tops azimuth rate metadata element.

ground_to_slant_poly
Python
ground_to_slant_poly() -> GroundToSlantPoly

Create a GroundToSlantPoly from the ground to slant metadata element.

slant_to_ground_poly
Python
slant_to_ground_poly() -> SlantToGroundPoly

Create a SlantToGroundPoly from the slant to ground metadata element.

slant_to_incidence_poly
Python
slant_to_incidence_poly() -> SlantToIncidencePoly

Create a SlantToIncidencePoly from the slant to incidence metadata element.

slant_to_elevation_poly
Python
slant_to_elevation_poly() -> SlantToElevationPoly

Create a SlantToElevationPoly from the slant to elevation metadata element.

coregistration_poly
Python
coregistration_poly() -> CoregistrationPoly

Create a CoregistrationPoly from the coreg_poly metadata element.

__repr__
Python
__repr__() -> str

Return a compact, readable representation.

__str__
Python
__str__() -> str

Return a human-readable representation.

MetaData dataclass

Metadata.

Attributes

channels class-attribute instance-attribute
Python
channels: list[MetaDataChannel] = field(default_factory=list)
description class-attribute instance-attribute
Python
description: str = ''
sampling_constants property
Python
sampling_constants: SamplingConstants

SamplingConstants from the first metadata channel.

Returns:

Type Description
SamplingConstants

SamplingConstants metadata element from the first metadata channel.

pulse property
Python
pulse: Pulse

Pulse from the first metadata channel.

Returns:

Type Description
Pulse

Pulse metadata element from the first metadata channel.

raster_info property
Python
raster_info: RasterInfo

RasterInfo from the first metadata channel.

Returns:

Type Description
RasterInfo

RasterInfo metadata element from the first metadata channel.

dataset_info property
Python
dataset_info: DataSetInfo

DataSetInfo from the first metadata channel.

Returns:

Type Description
DataSetInfo

DataSetInfo metadata element from the first metadata channel.

state_vectors property
Python
state_vectors: StateVectors

StateVectors from the first metadata channel.

Returns:

Type Description
StateVectors

StateVectors metadata element from the first metadata channel.

attitude_info property
Python
attitude_info: AttitudeInfo

AttitudeInfo from the first metadata channel.

Returns:

Type Description
AttitudeInfo

AttitudeInfo metadata element from the first metadata channel.

acquisition_time_line property
Python
acquisition_time_line: AcquisitionTimeLine

AcquisitionTimeLine from the first metadata channel.

Returns:

Type Description
AcquisitionTimeLine

AcquisitionTimeLine metadata element from the first metadata channel.

ground_corner_points property
Python
ground_corner_points: GroundCornerPoints

GroundCornerPoints from the first metadata channel.

Returns:

Type Description
GroundCornerPoints

GroundCornerPoints metadata element from the first metadata channel.

burst_info property
Python
burst_info: BurstInfo

BurstInfo from the first metadata channel.

Returns:

Type Description
BurstInfo

BurstInfo metadata element from the first metadata channel.

doppler_centroid property
Python
doppler_centroid: DopplerCentroidVector

DopplerCentroidVector from the first metadata channel.

Returns:

Type Description
DopplerCentroidVector

DopplerCentroidVector metadata element from the first metadata channel.

doppler_rate property
Python
doppler_rate: DopplerRateVector

DopplerRateVector from the first metadata channel.

Returns:

Type Description
DopplerRateVector

DopplerRateVector metadata element from the first metadata channel.

tops_azimuth_modulation_rate property
Python
tops_azimuth_modulation_rate: TopsAzimuthModulationRateVector

TopsAzimuthModulationRateVector from the first metadata channel.

Returns:

Type Description
TopsAzimuthModulationRateVector

TopsAzimuthModulationRateVector metadata element from the first metadata channel.

slant_to_ground property
Python
slant_to_ground: SlantToGroundVector

SlantToGroundVector from the first metadata channel.

Returns:

Type Description
SlantToGroundVector

SlantToGroundVector metadata element from the first metadata channel.

ground_to_slant property
Python
ground_to_slant: GroundToSlantVector

GroundToSlantVector from the first metadata channel.

Returns:

Type Description
GroundToSlantVector

GroundToSlantVector metadata element from the first metadata channel.

slant_to_incidence property
Python
slant_to_incidence: SlantToIncidenceVector

SlantToIncidenceVector from the first metadata channel.

Returns:

Type Description
SlantToIncidenceVector

SlantToIncidenceVector metadata element from the first metadata channel.

slant_to_elevation property
Python
slant_to_elevation: SlantToElevationVector

SlantToElevationVector from the first metadata channel.

Returns:

Type Description
SlantToElevationVector

SlantToElevationVector metadata element from the first metadata channel.

antenna_info property
Python
antenna_info: AntennaInfo

AntennaInfo from the first metadata channel.

Returns:

Type Description
AntennaInfo

AntennaInfo metadata element from the first metadata channel.

data_statistics property
Python
data_statistics: DataStatistics

DataStatistics from the first metadata channel.

Returns:

Type Description
DataStatistics

DataStatistics metadata element from the first metadata channel.

swath_info property
Python
swath_info: SwathInfo

SwathInfo from the first metadata channel.

Returns:

Type Description
SwathInfo

SwathInfo metadata element from the first metadata channel.

coreg_poly property
Python
coreg_poly: CoregPolyVector

CoregPolyVector from the first metadata channel.

Returns:

Type Description
CoregPolyVector

CoregPolyVector metadata element from the first metadata channel.

Methods:

__init__
Python
__init__(channels: list[MetaDataChannel] = list(), description: str = '') -> None
__getitem__
Python
__getitem__(index: int) -> MetaDataChannel

Retrieve the metadata channel at the specified index.

__contains__
Python
__contains__(item: MetaDataElementName) -> bool

Overloaded method to check if the element is available in the metadata first channel.

insert_element
Python
insert_element(element: MetaDataPydanticModel, *, overwrite_ok: bool = False) -> None

Insert a new metadata element into the first metadata channel.

Parameters:

Name Type Description Default
element MetaDataPydanticModel

metadata element to be inserted into the first metadata channel.

required
overwrite_ok bool

overwrite existing metadata element of the same type. False by default.

False
remove_element
Python
remove_element(element_type: MetaDataElementName) -> None

Remove the specified metadata element from the first metadata channel.

Parameters:

Name Type Description Default
element_type MetaDataElementName

metadata element name to be removed from the first metadata channel.

required
trajectory
Python
trajectory() -> CubicSplineTrajectory

CubicSplineTrajectory from the first metadata channel.

Returns:

Type Description
CubicSplineTrajectory

CubicSplineTrajectory metadata element from the first metadata channel.

attitude
Python
attitude() -> Attitude

Attitude from the first metadata channel.

Returns:

Type Description
Attitude

Attitude metadata element from the first metadata channel.

doppler_centroid_poly
Python
doppler_centroid_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's doppler centroid.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

doppler_rate_poly
Python
doppler_rate_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's doppler rate.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

tops_azimuth_modulation_rate_poly
Python
tops_azimuth_modulation_rate_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's tops azimuth mod rate.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

ground_to_slant_poly
Python
ground_to_slant_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's ground to slant range.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

slant_to_ground_poly
Python
slant_to_ground_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's slant to ground range.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

slant_to_incidence_poly
Python
slant_to_incidence_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's slant to incidence.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

slant_to_elevation_poly
Python
slant_to_elevation_poly() -> PiecewisePolynomial2D

Create a PiecewisePolynomial2D from the first metadata channel's slant to elevation.

Returns:

Type Description
PiecewisePolynomial2D

PiecewisePolynomial2D metadata element from the first metadata channel.

coregistration_poly
Python
coregistration_poly() -> CoregistrationPoly

Create a CoregistrationPoly from the first metadata channel's coregistration.

Returns:

Type Description
CoregistrationPoly

CoregistrationPoly metadata element from the first metadata channel.

__repr__
Python
__repr__() -> str

Return a compact, readable representation.

__str__
Python
__str__() -> str

Return a human-readable representation.

Functions:

create_new_metadata

Python
create_new_metadata(num_metadata_channels: int = 1, description: str | None = None) -> MetaData

Create a new empty MetaData object with the selected number of channels.

Parameters:

Name Type Description Default
num_metadata_channels int

number of metadata channels, by default 1

1
description str | None

metadata description, by default None.

None

Returns:

Type Description
MetaData

new empty MetaData object

MetaData elements module.

Attributes

__all__ module-attribute

Python
__all__ = ['METADATA_ELEMENT_NAMES', 'AcquisitionTimeLine', 'AntennaInfo', 'AntennaPolarization', 'AttitudeInfo', 'AttitudeReferenceFrame', 'AttitudeRotationOrder', 'AttitudeType', 'Burst', 'BurstInfo', 'CoregPoly', 'CoregPolyVector', 'DataBlockStatistic', 'DataSetImageQuantity', 'DataSetInfo', 'DataStatistics', 'DopplerCentroid', 'DopplerCentroidVector', 'DopplerRate', 'DopplerRateVector', 'GeoPoint', 'GroundCornerPoints', 'GroundToSlant', 'GroundToSlantVector', 'MetaDataElementName', 'OrbitDirection', 'Poly2D', 'Pulse', 'PulseDirection', 'RasterByteOrder', 'RasterCellType', 'RasterFormat', 'RasterInfo', 'SamplingConstants', 'SideLooking', 'SlantToElevation', 'SlantToElevationVector', 'SlantToGround', 'SlantToGroundVector', 'SlantToIncidence', 'SlantToIncidenceVector', 'StateVectors', 'SwathInfo', 'SwathPolarization', 'TopsAzimuthModulationRate', 'TopsAzimuthModulationRateVector']

RasterByteOrder module-attribute

Python
RasterByteOrder = Literal['BIGENDIAN', 'LITTLEENDIAN']

RasterCellType module-attribute

Python
RasterCellType = Literal['INT8', 'INT16', 'INT32', 'FLOAT32', 'FLOAT64', 'INT8_COMPLEX', 'INT16_COMPLEX', 'INT_COMPLEX', 'FLOAT_COMPLEX', 'DOUBLE_COMPLEX', 'CUSTOM']

RasterFormat module-attribute

Python
RasterFormat = Literal['ARESYS_RASTER', 'ARESYS_GEOTIFF']

OrbitDirection module-attribute

Python
OrbitDirection = Literal['ASCENDING', 'DESCENDING']

SideLooking module-attribute

Python
SideLooking = Literal['RIGHT', 'LEFT']

PulseDirection module-attribute

Python
PulseDirection = Literal['UP', 'DOWN']

DataSetImageQuantity module-attribute

Python
DataSetImageQuantity = Literal['BETA', 'SIGMA', 'GAMMA']

SwathPolarization module-attribute

Python
SwathPolarization = Literal['HH', 'HV', 'VH', 'VV', 'XX']

AntennaPolarization module-attribute

Python
AntennaPolarization = Literal['HH', 'HV', 'VH', 'VV', 'XX']

AttitudeReferenceFrame module-attribute

Python
AttitudeReferenceFrame = Literal['GEOCENTRIC', 'GEODETIC', 'ZERODOPPLER']

AttitudeRotationOrder module-attribute

Python
AttitudeRotationOrder = Literal['YPR', 'YRP', 'PRY', 'PYR', 'RYP', 'RPY']

AttitudeType module-attribute

Python
AttitudeType = Literal['NOMINAL', 'REFINED']

MetaDataElementName module-attribute

Python
MetaDataElementName = Literal['RasterInfo', 'DataSetInfo', 'SwathInfo', 'SamplingConstants', 'AcquisitionTimeLine', 'BurstInfo', 'StateVectors', 'AttitudeInfo', 'Pulse', 'GroundCornerPoints', 'DopplerCentroidVector', 'DopplerRateVector', 'TopsAzimuthModulationRateVector', 'SlantToGroundVector', 'GroundToSlantVector', 'SlantToIncidenceVector', 'SlantToElevationVector', 'AntennaInfo', 'DataStatistics', 'CoregPolyVector']

METADATA_ELEMENT_NAMES module-attribute

Python
METADATA_ELEMENT_NAMES: set[MetaDataElementName] = set(get_args(MetaDataElementName))

ReferenceAzimuthTimeT module-attribute

Python
ReferenceAzimuthTimeT = TypeVar('ReferenceAzimuthTimeT', PreciseDateTime, float)

Classes

MetaDataPydanticModel

Bases: BaseModel

Base Pydantic model for metadata elements.

Attributes

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

RasterInfo

Bases: MetaDataPydanticModel

Raster metadata container based on Pydantic public fields.

Attributes

file_name class-attribute instance-attribute
Python
file_name: str = ''
lines instance-attribute
Python
lines: int
samples instance-attribute
Python
samples: int
header_offset_bytes class-attribute instance-attribute
Python
header_offset_bytes: int = 0
row_prefix_bytes class-attribute instance-attribute
Python
row_prefix_bytes: int = 0
byte_order class-attribute instance-attribute
Python
byte_order: RasterByteOrder = 'LITTLEENDIAN'
cell_type instance-attribute
Python
cell_type: RasterCellType
lines_start class-attribute instance-attribute
Python
lines_start: float | PreciseDateTime = 0.0
lines_start_unit class-attribute instance-attribute
Python
lines_start_unit: str = ''
lines_step class-attribute instance-attribute
Python
lines_step: float = 0.0
lines_step_unit class-attribute instance-attribute
Python
lines_step_unit: str = ''
samples_start class-attribute instance-attribute
Python
samples_start: float | PreciseDateTime = 0.0
samples_start_unit class-attribute instance-attribute
Python
samples_start_unit: str = ''
samples_step class-attribute instance-attribute
Python
samples_step: float = 0.0
samples_step_unit class-attribute instance-attribute
Python
samples_step_unit: str = ''
invalid_value class-attribute instance-attribute
Python
invalid_value: float | complex | None = None
format_type class-attribute instance-attribute
Python
format_type: RasterFormat | None = None
azimuth_axis property
Python
azimuth_axis: NDArray

The azimuth axis of the raster.

Returns:

Type Description
NDArray

The azimuth axis of the raster.

range_axis property
Python
range_axis: NDArray

The range axis of the raster.

Returns:

Type Description
NDArray

The range axis of the raster.

lines_start_date property
Python
lines_start_date: PreciseDateTime

The start date of the lines.

Returns:

Type Description
PreciseDateTime

The start date of the lines.

Raises:

Type Description
TypeError

If the lines start is not a PreciseDateTime.

samples_start_date property
Python
samples_start_date: PreciseDateTime

The start date of the samples.

Returns:

Type Description
PreciseDateTime

The start date of the samples.

Raises:

Type Description
TypeError

If the samples start is not a PreciseDateTime.

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

DataSetInfo

Bases: MetaDataPydanticModel

Dataset metadata container based on Pydantic public fields.

Attributes

sensor_name instance-attribute
Python
sensor_name: str
description instance-attribute
Python
description: str
sense_date class-attribute instance-attribute
Python
sense_date: PreciseDateTime | None = None
acquisition_mode instance-attribute
Python
acquisition_mode: str
image_type instance-attribute
Python
image_type: str
projection instance-attribute
Python
projection: str
projection_params class-attribute instance-attribute
Python
projection_params: str | None = None
projection_params_format class-attribute instance-attribute
Python
projection_params_format: str | None = None
image_quantity class-attribute instance-attribute
Python
image_quantity: DataSetImageQuantity | None = None
acquisition_station instance-attribute
Python
acquisition_station: str
processing_center instance-attribute
Python
processing_center: str
processing_date class-attribute instance-attribute
Python
processing_date: PreciseDateTime | None = None
processing_software instance-attribute
Python
processing_software: str
fc_hz instance-attribute
Python
fc_hz: float
side_looking instance-attribute
Python
side_looking: SideLooking
external_calibration_factor class-attribute instance-attribute
Python
external_calibration_factor: float | None = None
data_take_id class-attribute instance-attribute
Python
data_take_id: int | None = None
instrument_conf_id class-attribute instance-attribute
Python
instrument_conf_id: int | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

GeoPoint

Bases: MetaDataPydanticModel

GeoPoint class.

Attributes

lat class-attribute instance-attribute
Python
lat: float = 0.0
lon class-attribute instance-attribute
Python
lon: float = 0.0
height class-attribute instance-attribute
Python
height: float = 0.0
theta_inc class-attribute instance-attribute
Python
theta_inc: float = 0.0
theta_look class-attribute instance-attribute
Python
theta_look: float = 0.0
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Methods:

to_list
Python
to_list() -> list[float]

Retrieve the geo point as a list: [lat, lon, height, theta_inc, theta_look].

GroundCornerPoints

Bases: MetaDataPydanticModel

GroundCornerPoint class.

Attributes

easting_grid_size class-attribute instance-attribute
Python
easting_grid_size: float = 0.0
northing_grid_size class-attribute instance-attribute
Python
northing_grid_size: float = 0.0
nw_point class-attribute instance-attribute
Python
nw_point: GeoPoint = Field(default_factory=GeoPoint)
ne_point class-attribute instance-attribute
Python
ne_point: GeoPoint = Field(default_factory=GeoPoint)
sw_point class-attribute instance-attribute
Python
sw_point: GeoPoint = Field(default_factory=GeoPoint)
se_point class-attribute instance-attribute
Python
se_point: GeoPoint = Field(default_factory=GeoPoint)
center_point class-attribute instance-attribute
Python
center_point: GeoPoint = Field(default_factory=GeoPoint)
geo_points property
Python
geo_points: list[GeoPoint]

Geo points as a list: [nw_point, ne_point, sw_point, se_point, center_point].

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

SwathInfo

Bases: MetaDataPydanticModel

SwathInfo class.

Attributes

swath instance-attribute
Python
swath: str
swath_acquisition_order class-attribute instance-attribute
Python
swath_acquisition_order: int = 0
polarization instance-attribute
Python
polarization: SwathPolarization
rank class-attribute instance-attribute
Python
rank: int = 0
range_delay_bias class-attribute instance-attribute
Python
range_delay_bias: float = 0.0
range_delay_bias_unit class-attribute
Python
range_delay_bias_unit: str = 's'
acquisition_start_time instance-attribute
Python
acquisition_start_time: PreciseDateTime
acquisition_start_time_unit class-attribute
Python
acquisition_start_time_unit: str = 'Utc'
azimuth_steering_angle_reference_time class-attribute instance-attribute
Python
azimuth_steering_angle_reference_time: float | None = None
az_steering_angle_ref_time_unit class-attribute
Python
az_steering_angle_ref_time_unit: str = 's'
azimuth_steering_angle_pol class-attribute instance-attribute
Python
azimuth_steering_angle_pol: tuple[float, float, float, float] | None = None
azimuth_steering_rate_reference_time class-attribute instance-attribute
Python
azimuth_steering_rate_reference_time: float | None = 0.0
az_steering_rate_ref_time_unit class-attribute
Python
az_steering_rate_ref_time_unit: str = 's'
azimuth_steering_rate_pol class-attribute instance-attribute
Python
azimuth_steering_rate_pol: tuple[float, float, float] | None = (0.0, 0.0, 0.0)
acquisition_prf class-attribute instance-attribute
Python
acquisition_prf: float = 0.0
acquisition_prf_unit class-attribute
Python
acquisition_prf_unit: str = 'Hz'
echoes_per_burst class-attribute instance-attribute
Python
echoes_per_burst: int = 0
channel_delay class-attribute instance-attribute
Python
channel_delay: float | None = None
rx_gain class-attribute instance-attribute
Python
rx_gain: float | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

SamplingConstants

Bases: MetaDataPydanticModel

SamplingConstants class.

Attributes

frg_hz instance-attribute
Python
frg_hz: float
brg_hz instance-attribute
Python
brg_hz: float
faz_hz instance-attribute
Python
faz_hz: float
baz_hz instance-attribute
Python
baz_hz: float
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

AcquisitionTimeLine

Bases: MetaDataPydanticModel

AcquisitionTimeLine class.

Attributes

missing_lines class-attribute instance-attribute
Python
missing_lines: list[float] = Field(default_factory=list)
swst_changes class-attribute instance-attribute
Python
swst_changes: list[tuple[float, float]] = Field(default_factory=list)
noise_packet class-attribute instance-attribute
Python
noise_packet: list[float] = Field(default_factory=list)
internal_calibration class-attribute instance-attribute
Python
internal_calibration: list[float] = Field(default_factory=list)
swl_changes class-attribute instance-attribute
Python
swl_changes: list[tuple[float, float]] = Field(default_factory=list)
prf_changes class-attribute instance-attribute
Python
prf_changes: list[tuple[float, float]] = Field(default_factory=list)
duplicated_lines class-attribute instance-attribute
Python
duplicated_lines: list[float] = Field(default_factory=list)
chirp_period class-attribute instance-attribute
Python
chirp_period: str | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

AttitudeInfo

Bases: MetaDataPydanticModel

AttitudeInfo class.

Attributes

ypr_deg instance-attribute
Python
ypr_deg: NDArray[float64]
reference_time instance-attribute
Python
reference_time: PreciseDateTime
time_step instance-attribute
Python
time_step: float
reference_frame instance-attribute
Python
reference_frame: AttitudeReferenceFrame
rotation_order instance-attribute
Python
rotation_order: AttitudeRotationOrder
attitude_type class-attribute instance-attribute
Python
attitude_type: AttitudeType = 'NOMINAL'
times property
Python
times: NDArray

The time axis of the attitude data.

Returns:

Type Description
NDArray

The time axis of the attitude data.

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Burst

Bases: MetaDataPydanticModel

Single burst metadata.

Attributes

range_start_time instance-attribute
Python
range_start_time: float
azimuth_start_time instance-attribute
Python
azimuth_start_time: PreciseDateTime
lines instance-attribute
Python
lines: int
burst_center_azimuth_shift class-attribute instance-attribute
Python
burst_center_azimuth_shift: float | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

BurstInfo

Bases: MetaDataPydanticModel

Burst info metadata container.

Attributes

burst_repetition_frequency class-attribute instance-attribute
Python
burst_repetition_frequency: float = 0.0
bursts class-attribute instance-attribute
Python
bursts: list[Burst] = Field(default_factory=list)
lines_per_burst property
Python
lines_per_burst: int

The number of lines per burst if constant, raise otherwise.

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Methods:

get_burst_roi
Python
get_burst_roi(burst_index: int, raster_info: RasterInfo, range_interval: tuple[int, int] | None = None) -> list[int]

Get the region of interest for a specific burst.

Parameters:

Name Type Description Default
burst_index int

Index of the burst to retrieve the ROI for.

required
raster_info RasterInfo

Raster information for the product.

required
range_interval tuple[int, int] | None

Range of interest in the format (start, end), by default None.

None

Returns:

Type Description
list[int]

The region of interest for the specified burst.

Raises:

Type Description
ValueError

If the burst index is not valid.

StateVectors

Bases: MetaDataPydanticModel

State vectors metadata container.

Attributes

position_vector instance-attribute
Python
position_vector: NDArray[float64]
velocity_vector instance-attribute
Python
velocity_vector: NDArray[float64]
reference_time instance-attribute
Python
reference_time: PreciseDateTime
time_step instance-attribute
Python
time_step: float
orbit_number class-attribute instance-attribute
Python
orbit_number: int | None = None
track_number class-attribute instance-attribute
Python
track_number: int | None = None
anx_time class-attribute instance-attribute
Python
anx_time: PreciseDateTime | None = None
anx_position class-attribute instance-attribute
Python
anx_position: tuple[float, float, float] | None = None
annotated_orbit_direction property writable
Python
annotated_orbit_direction: OrbitDirection | None

Annotated orbit direction.

Might be different from the orbit direction which is derived from velocity.

orbit_direction property
Python
orbit_direction: OrbitDirection

Orbit direction inferred from the first velocity vector.

num_state_vectors property
Python
num_state_vectors: int

Number of state vectors.

times property
Python
times: NDArray

The time axis of the state vector data.

Returns:

Type Description
NDArray

The time axis of the state vector data.

model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Methods:

model_post_init
Python
model_post_init(_: Any) -> None

Post-initialization for the model.

Poly2D

Bases: MetaDataPydanticModel, Generic[ReferenceAzimuthTimeT]

Base class for Poly2D format.

Attributes

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
UNITS class-attribute
Python
UNITS: tuple[str, ...] = 11 * ('',)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

DopplerCentroid

Bases: Poly2D

DopplerCentroid class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('Hz', 'Hz/s', 'Hz/s', 'Hz/s2', 'Hz/s2', 'Hz/s3', 'Hz/s4', 'Hz/s5', 'Hz/s6', 'Hz/s7', 'Hz/s8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

DopplerCentroidVector

Bases: MetaDataPydanticModel

List of DopplerCentroid poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[DopplerCentroid] = DopplerCentroid
poly_list class-attribute instance-attribute
Python
poly_list: list[DopplerCentroid] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

DopplerRate

Bases: Poly2D

DopplerRate class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('Hz/s', 'Hz/s2', 'Hz/s2', 'Hz/s3', 'Hz/s3', 'Hz/s4', 'Hz/s5', 'Hz/s6', 'Hz/s7', 'Hz/s8', 'Hz/s9')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

DopplerRateVector

Bases: MetaDataPydanticModel

list of DopplerRate poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[DopplerRate] = DopplerRate
poly_list class-attribute instance-attribute
Python
poly_list: list[DopplerRate] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

TopsAzimuthModulationRate

Bases: Poly2D

TopsAzimuthModulationRate class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('Hz', 'Hz/s', 'Hz/s', 'Hz/s2', 'Hz/s2', 'Hz/s3', 'Hz/s4', 'Hz/s5', 'Hz/s6', 'Hz/s7', 'Hz/s8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

TopsAzimuthModulationRateVector

Bases: MetaDataPydanticModel

List of TopsAzimuthModulationRate poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[TopsAzimuthModulationRate] = TopsAzimuthModulationRate
poly_list class-attribute instance-attribute
Python
poly_list: list[TopsAzimuthModulationRate] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

SlantToGround

Bases: Poly2D

SlantToGround class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('m', 'm/s', 'm/s', 'm/s2', 'm/s2', 'm/s3', 'm/s4', 'm/s5', 'm/s6', 'm/s7', 'm/s8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

SlantToGroundVector

Bases: MetaDataPydanticModel

List of SlantToGround poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[SlantToGround] = SlantToGround
poly_list class-attribute instance-attribute
Python
poly_list: list[SlantToGround] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

GroundToSlant

Bases: Poly2D

GroundToSlant class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('s', 's/m', 's/m', 's/m2', 's/m2', 's/m3', 's/m4', 's/m5', 's/m6', 's/m7', 's/m8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

GroundToSlantVector

Bases: MetaDataPydanticModel

List of GroundToSlant poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[GroundToSlant] = GroundToSlant
poly_list class-attribute instance-attribute
Python
poly_list: list[GroundToSlant] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

SlantToIncidence

Bases: Poly2D

SlantToIncidence class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('deg', 'deg/s', 'deg/s', 'deg/s2', 'deg/s2', 'deg/s3', 'deg/s4', 'deg/s5', 'deg/s6', 'deg/s7', 'deg/s8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

SlantToIncidenceVector

Bases: MetaDataPydanticModel

List of SlantToIncidence poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[SlantToIncidence] = SlantToIncidence
poly_list class-attribute instance-attribute
Python
poly_list: list[SlantToIncidence] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

SlantToElevation

Bases: Poly2D

SlantToElevation class.

Attributes

UNITS class-attribute instance-attribute
Python
UNITS = ('deg', 'deg/s', 'deg/s', 'deg/s2', 'deg/s2', 'deg/s3', 'deg/s4', 'deg/s5', 'deg/s6', 'deg/s7', 'deg/s8')
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

POWERS_X class-attribute
Python
POWERS_X: tuple[int, ...] = (0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0)
POWERS_Y class-attribute
Python
POWERS_Y: tuple[int, ...] = (0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8)
t_ref_az instance-attribute
Python
t_ref_az: ReferenceAzimuthTimeT
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients class-attribute instance-attribute
Python
coefficients: list[float] = Field(default_factory=list)

SlantToElevationVector

Bases: MetaDataPydanticModel

List of SlantToElevation poly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[SlantToElevation] = SlantToElevation
poly_list class-attribute instance-attribute
Python
poly_list: list[SlantToElevation] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

AntennaInfo

Bases: MetaDataPydanticModel

Antenna pattern metadata container.

Attributes

sensor_name class-attribute instance-attribute
Python
sensor_name: str | None = None
acquisition_mode instance-attribute
Python
acquisition_mode: str
acquisition_beam instance-attribute
Python
acquisition_beam: str
polarization instance-attribute
Python
polarization: AntennaPolarization
lines_per_pattern class-attribute instance-attribute
Python
lines_per_pattern: int | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

DataBlockStatistic

Bases: MetaDataPydanticModel

Statistics computed over a data block.

Attributes

num_samples instance-attribute
Python
num_samples: int
max_i instance-attribute
Python
max_i: float
min_i instance-attribute
Python
min_i: float
max_q instance-attribute
Python
max_q: float
min_q instance-attribute
Python
min_q: float
sum_i instance-attribute
Python
sum_i: float
sum_q instance-attribute
Python
sum_q: float
sum_2_i instance-attribute
Python
sum_2_i: float
sum_2_q instance-attribute
Python
sum_2_q: float
line_start instance-attribute
Python
line_start: int
line_stop instance-attribute
Python
line_stop: int
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

DataStatistics

Bases: MetaDataPydanticModel

Statistics computed over full data.

Attributes

num_samples instance-attribute
Python
num_samples: int
max_i instance-attribute
Python
max_i: float
min_i instance-attribute
Python
min_i: float
max_q instance-attribute
Python
max_q: float
min_q instance-attribute
Python
min_q: float
sum_i instance-attribute
Python
sum_i: float
sum_q instance-attribute
Python
sum_q: float
sum_2_i instance-attribute
Python
sum_2_i: float
sum_2_q instance-attribute
Python
sum_2_q: float
std_dev_i instance-attribute
Python
std_dev_i: float
std_dev_q instance-attribute
Python
std_dev_q: float
statistics_list class-attribute instance-attribute
Python
statistics_list: list[DataBlockStatistic] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

CoregPoly

Bases: MetaDataPydanticModel

Coregistration polynomials metadata container.

Attributes

t_ref_az instance-attribute
Python
t_ref_az: PreciseDateTime
t_ref_rg instance-attribute
Python
t_ref_rg: float
coefficients_az class-attribute instance-attribute
Python
coefficients_az: list[float] = Field(default_factory=list)
coefficients_rg class-attribute instance-attribute
Python
coefficients_rg: list[float] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

CoregPolyVector

Bases: MetaDataPydanticModel

List of CoregPoly.

Attributes

SINGLE_POLY_TYPE class-attribute
Python
SINGLE_POLY_TYPE: type[CoregPoly] = CoregPoly
poly_list class-attribute instance-attribute
Python
poly_list: list[CoregPoly] = Field(default_factory=list)
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Pulse

Bases: MetaDataPydanticModel

Pulse class.

Attributes

pulse_length instance-attribute
Python
pulse_length: float
bandwidth instance-attribute
Python
bandwidth: float
pulse_sampling_rate instance-attribute
Python
pulse_sampling_rate: float
pulse_energy instance-attribute
Python
pulse_energy: float
pulse_start_frequency class-attribute instance-attribute
Python
pulse_start_frequency: float | None = None
pulse_start_phase class-attribute instance-attribute
Python
pulse_start_phase: float | None = None
pulse_direction class-attribute instance-attribute
Python
pulse_direction: PulseDirection | None = None
model_config class-attribute instance-attribute
Python
model_config = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
element_name property
Python
element_name: MetaDataElementName

The element name.

Metadata file IO.

Attributes

__all__ module-attribute

Python
__all__ = ['parse_metadata', 'read_metadata', 'serialize_metadata', 'write_metadata']

Functions:

read_metadata

Python
read_metadata(metadata_file: str | Path) -> channel.MetaData

Read metadata from XML file.

Parameters:

Name Type Description Default
metadata_file str | Path

path to the xml aresys metadata file.

required

Returns:

Type Description
MetaData

Channel metadata

write_metadata

Python
write_metadata(metadata_obj: MetaData, metadata_file: str | Path) -> None

Write metadata to XML file.

Parameters:

Name Type Description Default
metadata_obj MetaData

Channel metadata.

required
metadata_file str | Path

path to the xml aresys metadata file

required

serialize_metadata

Python
serialize_metadata(metadata_obj: MetaData) -> str

Serialize metadata object.

Parameters:

Name Type Description Default
metadata_obj MetaData

Metadata representation object

required

Returns:

Type Description
str

serialized metadata as a string (xml format)

parse_metadata

Python
parse_metadata(metadata_content: str) -> channel.MetaData

Parse metadata XML string.

Parameters:

Name Type Description Default
metadata_content str

Metadata as string in XML format

required

Returns:

Type Description
MetaData

Metadata representation object

Input/output utilities using metadata objects.

Attributes

__all__ module-attribute

Python
__all__ = ['MemmappedNDArray', 'read_binary_header_with_raster_info', 'read_raster_as_memmap_with_raster_info', 'read_raster_with_raster_info', 'read_row_prefix_with_raster_info', 'retrieve_data_layout', 'write_binary_header_with_raster_info', 'write_raster_with_raster_info', 'write_row_prefix_with_raster_info']

MemmappedNDArray module-attribute

Python
MemmappedNDArray: TypeAlias = npt.NDArray

Classes

Functions:

retrieve_data_layout

Python
retrieve_data_layout(raster_info: RasterInfo) -> DataLayout

Retrieve the data layout from a RasterInfo object.

Parameters:

Name Type Description Default
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read

required

Returns:

Type Description
DataLayout

Unified layout and format information for the raster

Raises:

Type Description
ValueError

If the raster info cell type is 'custom', which is not supported for reading raster files

read_raster_with_raster_info

Python
read_raster_with_raster_info(raster_file: str | Path, raster_info: RasterInfo, block_to_read: list[int] | None = None) -> npt.NDArray

Read raster file using information from a RasterInfo metadata object.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster 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: 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

Returns:

Type Description
NDArray

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

read_raster_as_memmap_with_raster_info

Python
read_raster_as_memmap_with_raster_info(raster_file: str | Path, raster_info: RasterInfo) -> Generator[MemmappedNDArray, None, None]

Create and manage the lifecycle of a read-only memmap to a raster file.

Usage

with read_raster_as_memmap_with_raster_info(...) as data_as_memmap: ...

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read

required

Yields:

Type Description
MemmappedNDArray (alias to np.ndarray)

Memory-mapped numpy array containing raster data of shape (lines, samples)

write_raster_with_raster_info

Python
write_raster_with_raster_info(raster_file: str | Path, data: NDArray, raster_info: RasterInfo, write_offset: tuple[int, int] = (0, 0)) -> None

Write data to the specified raster file on disk.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be written

required
data NDArray

data to be written

required
raster_info RasterInfo

RasterInfo object containing all the info related to the raster of choice

required
write_offset tuple[int, int]

start point from where to write (lines, samples), by default (0, 0).

(0, 0)

read_binary_header_with_raster_info

Python
read_binary_header_with_raster_info(raster_file: str | Path, raster_info: RasterInfo) -> bytes

Read raster binary header using information from a RasterInfo metadata object.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read.

required

Returns:

Type Description
bytes

header binary of the raster file

write_binary_header_with_raster_info

Python
write_binary_header_with_raster_info(raster_file: str | Path, header: bytes, raster_info: RasterInfo) -> None

Write raster binary header using information from a RasterInfo metadata object.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
header bytes

header to be written in bytes

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read.

required

read_row_prefix_with_raster_info

Python
read_row_prefix_with_raster_info(raster_file: str | Path, line_interval: tuple[int, int], raster_info: RasterInfo) -> list[bytes]

Read the row prefix of a given line using information from a RasterInfo metadata object.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
line_interval tuple[int, int]

raster line interval as (start_line, end_line), with end excluded

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read.

required

Returns:

Type Description
list[bytes]

row prefixes as byte sequences

write_row_prefix_with_raster_info

Python
write_row_prefix_with_raster_info(raster_file: str | Path, line_interval: tuple[int, int], row_prefix: list[bytes], raster_info: RasterInfo) -> None

Write the row prefix at a given line using information from a RasterInfo metadata object.

Parameters:

Name Type Description Default
raster_file str | Path

path to the raster file to be read

required
line_interval tuple[int, int]

raster line interval as (start_line, end_line), with end excluded

required
row_prefix list[bytes]

row prefixes as byte sequences, one for each line in interval

required
raster_info RasterInfo

RasterInfo metadata corresponding to the raster to be read.

required