API Reference
Plugin Interface
TERRASAR-X SCT plugin interface.
Attributes
Classes
TERRASARXProductPlugin
Plugin for TERRASAR-X product format
Attributes
Methods:
Protocol Implementation
TERRASAR-X format reader protocol-compliant wrapper for PERSEO-quality.
Classes
TERRASARXDopplerPolynomial
PERSEO-quality Doppler Function protocol compliant TERRASAR-X doppler polynomial wrapper
Methods:
evaluate
Evaluate the Doppler Polynomial at given azimuth and range times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_time
|
PreciseDateTime
|
azimuth time at which evaluate the polynomial |
required |
range_time
|
float
|
range time at which evaluate the polynomial |
required |
Returns:
| Type | Description |
|---|---|
float
|
doppler centroid at that time |
TERRASARXProductManager
SCTInputProduct protocol compliant TERRASAR-X wrapper
Attributes
channels_list
property
Get list of available channels for this product
Methods:
get_channel_data
Gathering all the information that are channel dependent and storing them in a protocol compliant object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_id
|
int
|
selected channel identifier |
required |
Returns:
| Type | Description |
|---|---|
TERRASARXChannelManager
|
ChannelData-compliant object containing data corresponding to the selected channel |
TERRASARXChannelManager
PERSEO-quality ChannelData protocol compliant TERRASAR-X channel wrapper
Attributes
sampling_constants
property
Channel data signal sampling frequencies
doppler_centroid
property
Channel doppler centroid polynomial wrapper
lines_per_burst
property
Lines per burst, for each burst in the swath
Methods:
__init__
__init__(channel_metadata: TERRASARXChannelMetadata, channel_raster_path: Path, channel_name: str) -> None
Creating a ChannelManager object compliant with the ChannelData protocol.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_metadata
|
TERRASARXChannelMetadata
|
channel metadata dataclass |
required |
channel_raster_path
|
int
|
Path to the channel raster file |
required |
channel_name
|
int
|
name of current channel |
required |
get_mid_burst_times
get_steering_rate
get_location_data
Generating a LocationData object containing data and info derived from the current TERRASARXChannelManager and declined to the specific azimuth and range times selected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_time
|
PreciseDateTime
|
selected azimuth time |
required |
range_time
|
float
|
selected range time |
required |
Returns:
| Type | Description |
|---|---|
LocationData
|
LocationData instance related to the selected location |
pixel_to_times_conversion
pixel_to_times_conversion(azimuth_index: float, range_index: float, burst: int = None) -> tuple[PreciseDateTime, float]
Converting input raster pixel coordinates (azimuth_index and range index) to corresponding absolute times, azimuth and range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_index
|
float
|
azimuth pixel index, subpixel precision |
required |
range_index
|
float
|
range pixel index, subpixel precision |
required |
burst
|
int
|
burst index, by default None |
None
|
Returns:
| Type | Description |
|---|---|
PreciseDateTime
|
azimuth time |
float
|
range time |
times_to_pixel_conversion
times_to_pixel_conversion(azimuth_time: PreciseDateTime, range_time: float, burst: int = None) -> tuple[float, float]
Converting azimuth and range times to raster image pixels indexes with subpixel precision.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_time
|
PreciseDateTime
|
azimuth time |
required |
range_time
|
float
|
range time |
required |
burst
|
int
|
burst number corresponding to these times |
None
|
Returns:
| Type | Description |
|---|---|
float
|
pixel corresponding to azimuth time |
float
|
pixel corresponding to range time |
times_to_burst_association
Associate the right burst to a given input time point. This function returns 1 association for each input time. Associating time only to the first burst containing it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_times
|
ArrayLike
|
azimuth time array in PreciseDateTime format |
required |
Returns:
| Type | Description |
|---|---|
list[int]
|
burst associated with a given time |
Raises:
| Type | Description |
|---|---|
CoordinatesOutOfBounds
|
if input time exceeds tme boundaries of the swath |
pixel_to_burst_association
Associate the azimuth pixel value to the right burst. This function returns 1 association for each input time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_px_indexes
|
ArrayLike
|
azimuth pixel indexes array |
required |
Returns:
| Type | Description |
|---|---|
list[int]
|
burst associated with a given pixel index |
Raises:
| Type | Description |
|---|---|
CoordinatesOutOfBounds
|
if input time exceeds tme boundaries of the swath |
ground_points_to_burst_association
Determining the burst (or bursts) where the input coordinates lie. If no association can be found (i.e. the point is not visible in the scene), None is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coordinates
|
ArrayLike
|
array of coordinates, in the form (N, 3) |
required |
Returns:
| Type | Description |
|---|---|
list[list[int] | None]
|
list containing the burst association for each input point, None if no association was found |
read_data
read_data(azimuth_index: float, range_index: float, cropping_size: tuple[int, int] = (150, 150), output_radiometric_quantity: SARRadiometricQuantity = SARRadiometricQuantity.BETA_NOUGHT, burst: int | None = None) -> np.ndarray
Extracting the swath portion centered to the provided target position and of size cropping_size by cropping_size. Target position is provided via its azimuth and range indexes in the swath array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuth_index
|
float
|
index of azimuth time in swath array |
required |
range_index
|
float
|
index of range time in swath array |
required |
cropping_size
|
tuple[int, int]
|
size in pixel of the swath portion to be read (number of samples, number of lines), by default (150, 150) |
(150, 150)
|
output_radiometric_quantity
|
SARRadiometricQuantity
|
selected output radiometric quantity to convert the read data to, if needed, by default SARRadiometricQuantity.BETA_NOUGHT |
BETA_NOUGHT
|
burst
|
int
|
if burst is provided, the roi extraction gives error if the boundaries exceed the burst boundaries, by default None |
None
|
Returns:
| Type | Description |
|---|---|
ndarray
|
cropped swath array centered to the input target coordinates, output array is (samples, lines) by default the output radiometric quantity is BETA_NOUGHT, unless specified otherwise |
Raises:
| Type | Description |
|---|---|
AzimuthExceedsBoundariesError
|
azimuth index exceeds swath boundaries |
RangeExceedsBoundariesError
|
range index exceeds swath boundaries |
Functions:
custom_roi_validation
custom_roi_validation(roi: list[int, int, int, int], raster_boundaries: list[int, int, int, int], check_raster_only: bool = False, burst_boundaries: list[int, int, int, int] | None = None) -> None
Validating the region of interest to be read from raster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
roi
|
list[int, int, int, int]
|
[reading start line, reading start sample, number of lines to be read, number of samples to be read] |
required |
raster_boundaries
|
list[int, int, int, int]
|
[0, 0, raster number of lines, raster number of samples] |
required |
check_raster_only
|
bool
|
if True check only raster, by default False |
False
|
burst_boundaries
|
list[int, int, int, int] | None
|
[current burst starting line, current burst starting sample, lines of current burst, samples of current burst], if None no validation against burst boundaries is performed, by default None |
None
|
Raises:
| Type | Description |
|---|---|
AzimuthExceedsBoundariesError
|
if roi boundaries exceed raster or burst azimuth boundaries |
RangeExceedsBoundariesError
|
ir roi boundaries exceed raster or burst range boundaries |