ICEYE
Reader Interface
ICEYE product format reader.
Functions:
read_channel_metadata
Reading channel metadata info and storing them in a ICEYEChannelMetadata dataclass.
The assumption here is that .xml files are associated ONLY to GRD, as reported in the official documentation while HDF5 file is SLC only
note: AUXILIARY .XML METADATA FILE OPTIONALLY AVAILABLE FOR SLC WILL NOT BE USED
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
Path | str
|
Path to the metadata file, could be an .xml (GRD) or a .h5 file (SLC) |
required |
Returns:
| Type | Description |
|---|---|
ICEYEChannelMetadata
|
ICEYEChannelMetadata metadata dataclass |
read_channel_data
read_channel_data(raster_file: str | Path, block_to_read: list[int] = None, scaling_conversion: float = 1) -> np.ndarray
Reading ICEYE data file. It can be a GeoTiff .tif file (for GRD products) or an HDF5 .h5 file (for SLC).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raster_file
|
str | Path
|
Path to GeoTiff .tif or HDF5 .h5 file |
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
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) |
Utilities
ICEYE reader support module.
Classes
InvalidICEYEProduct
Bases: RuntimeError
Invalid ICEYE product
ICEYEProductLevel
Bases: Enum
ICEYE L1 product level
ICEYEAcquisitionMode
Bases: Enum
ICEYE L1 acquisition modes
ICEYEStateVectorsReferenceSystem
Bases: Enum
Orbit's state vectors reference system
ICEYEOrbitProcessingLevel
Bases: Enum
Orbit's processing level type
ICEYEIncidenceAnglePolynomial
dataclass
ICEYE Incidence Angle Polynomial
Attributes
incidence_angles
class-attribute
instance-attribute
azimuth_reference_times
class-attribute
instance-attribute
Methods:
__init__
__init__(incidence_angles: list[ConversionFunction] | None = None, azimuth_reference_times: ndarray | None = None) -> None
from_metadata
staticmethod
Generating ICEYEIncidenceAnglePolynomial object directly from metadata xml node.
Evaluated polynomial gives Incidence Angle in deg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
ICEYEIncidenceAnglePolynomial
|
polynomial for incidence angle computation |
evaluate_incidence_angle
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 |
ICEYEGeneralChannelInfo
dataclass
ICEYE general channel info dataclass
Attributes
Methods:
__init__
__init__(product_name: str, channel_id: str, swath: str, product_level: ICEYEProductLevel, polarization: SARPolarization, projection: SARProjection, acquisition_mode: ICEYEAcquisitionMode, acquisition_mode_std: StandardSARAcquisitionMode, orbit_direction: OrbitDirection, signal_frequency: float, acq_start_time: PreciseDateTime, acq_stop_time: PreciseDateTime) -> None
from_metadata
staticmethod
Generating ICEYEGeneralChannelInfo object directly from metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
channel_id
|
str
|
channel id |
required |
Returns:
| Type | Description |
|---|---|
ICEYEGeneralChannelInfo
|
general channel info dataclass |
ICEYEChannelMetadata
dataclass
ICEYE channel metadata dataclass
Attributes
image_radiometric_quantity
instance-attribute
Methods:
__init__
__init__(general_info: ICEYEGeneralChannelInfo, 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, doppler_rate_poly: DopplerEvaluator, incidence_angles_poly: ICEYEIncidenceAnglePolynomial, pulse: PulseInfo, coordinate_conversions: CoordinatesConversions, state_vectors: StateVectors) -> None
ICEYEProduct
ICEYE product object
Attributes
acquisition_time
property
Acquisition start time for this product
data_list
property
Returning the list of raster data files of ICEYE product
channels_number
property
Returning the number of channels of ICEYE product
footprint
property
Product footprint as tuple of (min lat, max lat, min lon, max lon)
Methods:
__init__
get_files_from_channel_name
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: .h5 HDF5 file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_name
|
str
|
channel id name |
required |
Returns:
| Type | Description |
|---|---|
list[Path]
|
path to grd/slc files |
Functions:
raster_info_from_metadata
Creating a RasterInfo metadata object from metadata file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
RasterInfo
|
RasterInfo metadata object |
burst_info_from_metadata
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
Creating a DatasetInfo metadata object from metadata file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
DatasetInfo
|
DatasetInfo metadata object |
swath_info_from_metadata
Creating a SwathInfo metadata object from metadata file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
SwathInfo
|
SwathInfo metadata object |
state_vectors_from_metadata
Generating StateVectors object directly from product metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
StateVectors
|
orbit's state vectors dataclass |
sampling_constants_from_metadata
Creating a SARSamplingFrequencies metadata object from metadata file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
SARSamplingFrequencies
|
SARSamplingFrequencies metadata object |
pulse_info_from_metadata
Creating a PulseInfo metadata object from metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
PulseInfo
|
PulseInfo metadata object |
doppler_centroid_poly_from_metadata
doppler_centroid_poly_from_metadata(root: _Element | File, raster_info: RasterInfo) -> DopplerEvaluator
Creating a DopplerEvaluator doppler centroid polynomial wrapper from metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
raster_info
|
RasterInfo
|
channel raster info |
required |
Returns:
| Type | Description |
|---|---|
DopplerEvaluator
|
DopplerEvaluator dataclass for Doppler Centroid polynomial |
doppler_rate_poly_from_metadata
doppler_rate_poly_from_metadata(root: _Element | File, raster_info: RasterInfo) -> DopplerEvaluator
Creating a DopplerEvaluator doppler rate vector polynomial wrapper from metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
raster_info
|
RasterInfo
|
channel raster info |
required |
Returns:
| Type | Description |
|---|---|
DopplerEvaluator
|
DopplerEvaluator dataclass for Doppler Rate polynomial |
calibration_factor_and_radiometric_quantity_from_metadata
calibration_factor_and_radiometric_quantity_from_metadata(root: _Element | File) -> tuple[float, SARRadiometricQuantity]
Image calibration factor and radiometric quantity from metadata file.
SLC case: binary image * calibration factor = beta nought
GRD case: binary image (already sigma nought) * calibration factor = sigma nought
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, SARRadiometricQuantity]
|
image calibration factor, radiometric quantity |
coordinates_conversions_from_metadata
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
|
_Element | File
|
metadata root object |
required |
Returns:
| Type | Description |
|---|---|
CoordinatesConversions
|
polynomial for coordinate conversion dataclass |
is_iceye_product
Check if input path corresponds to a valid ICEYE product, basic version.
Conditions to be met for basic validity: - path exists - path is a directory - valid channels (GRD and/or SLC) can be found
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 |