Module: sarpyx.processor.core.subaperture_full_img
File: sarpyx/processor/core/subaperture_full_img.py
No module docstring available; module purpose is inferred from implementation.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (6)
find_base_iq_pairs_in_dim_data function
Detect base complex i/q pairs per polarization from a DIM ``.data`` folder.
File location: sarpyx/processor/core/subaperture_full_img.py:50
Signature
find_base_iq_pairs_in_dim_data(data_dir: str)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data_dir | str | yes | - | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import find_base_iq_pairs_in_dim_data
result = find_base_iq_pairs_in_dim_data(data_dir=<data_dir>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
DeHammWin function
Vectorized Hamming de-weighting.
File location: sarpyx/processor/core/subaperture_full_img.py:104
Signature
DeHammWin(signal, coeff)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signal | inferred from implementation | yes | - | np.ndarray, 1-D complex |
coeff | inferred from implementation | yes | - | float (Hamming coefficient, typically 0.5–1.0) |
Return Type
inferred from implementation
np.ndarray – de-weighted signal (complex64).
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import DeHammWin
result = DeHammWin(signal=<signal>, coeff=<coeff>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
DeHammWin_2d function
Apply Hamming de-weighting to every column (axis-1 slice) of a 2-D array.
File location: sarpyx/processor/core/subaperture_full_img.py:128
Signature
DeHammWin_2d(signals_2d, coeff)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signals_2d | inferred from implementation | yes | - | np.ndarray, shape (nGood, nCols), complex |
coeff | inferred from implementation | yes | - | float |
Return Type
inferred from implementation
np.ndarray – same shape, de-weighted and conjugated (complex64).
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import DeHammWin_2d
result = DeHammWin_2d(signals_2d=<signals_2d>, coeff=<coeff>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
write_envi_bsq_float32 function
Write a single-band ENVI BSQ float32 image + header.
File location: sarpyx/processor/core/subaperture_full_img.py:147
Signature
write_envi_bsq_float32(path_img, path_hdr, arr2d, band_name, byte_order=1, type_='real')
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path_img | inferred from implementation | yes | - | str Output binary file path (.img). |
path_hdr | inferred from implementation | yes | - | str Output ENVI header path (.hdr). |
arr2d | inferred from implementation | yes | - | array-like 2D array (lines, samples). |
band_name | inferred from implementation | yes | - | str Band name to write into the ENVI header (must match your naming convention). |
byte_order | inferred from implementation | no | 1 | int ENVI byte order: 0 = little endian, 1 = big endian. |
type_ | inferred from implementation | no | 'real' | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- filesystem
Example Usage
from sarpyx.processor.core.subaperture_full_img import write_envi_bsq_float32
result = write_envi_bsq_float32(path_img=<path_img>, path_hdr=<path_hdr>, arr2d=<arr2d>, band_name=<band_name>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
find_pols_in_dim_data function
Search for base polarization i/q pairs in the product .data folder.
File location: sarpyx/processor/core/subaperture_full_img.py:781
Signature
find_pols_in_dim_data(data_dir: str)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data_dir | str | yes | - | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import find_pols_in_dim_data
result = find_pols_in_dim_data(data_dir=<data_dir>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
do_subaps function
Orchestrator:
File location: sarpyx/processor/core/subaperture_full_img.py:793
Signature
do_subaps(dim_path: str, safe_path: str, numberofLooks: int=3, n_decompositions: Optional[Union[int, List[int]]]=None, DownSample: bool=True, byte_order: int=1, prefix: str='', VERBOSE: bool=False, force_dask: Optional[bool]=None, chunk_cols: Optional[int]=None)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dim_path | str | yes | - | inferred from implementation. |
safe_path | str | yes | - | inferred from implementation. |
numberofLooks | int | no | 3 | inferred from implementation. |
n_decompositions | Optional[Union[int, List[int]]] | no | None | * None -> uses numberofLooks (backward compatible) * int -> runs a single decomposition with that N * list -> runs all decompositions in the list (e.g. [2,3,5,7]) |
DownSample | bool | no | True | inferred from implementation. |
byte_order | int | no | 1 | inferred from implementation. |
prefix | str | no | '' | inferred from implementation. |
VERBOSE | bool | no | False | inferred from implementation. |
force_dask | Optional[bool] | no | None | bool | None ``True`` → always use dask lazy backend (bounded memory). ``False`` → always use numpy eager backend. ``None`` (default) → auto-detect based on image size vs available RAM. |
chunk_cols | Optional[int] | no | None | int | None Column-chunk width for dask. ``None`` → auto-computed. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
FileNotFoundErrorRuntimeErrorValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.subaperture_full_img import do_subaps
result = do_subaps(dim_path=<dim_path>, safe_path=<safe_path>)
Edge Cases
May raise: FileNotFoundError, RuntimeError, ValueError. Includes optional parameters with implementation-defined fallback behavior.
Public Classes (1)
CombinedSublooking class
Subaperture decomposition of a SAR SLC image. Supports two execution backends selected automatically based on image size (or overridden with ``force_dask``): * **numpy** – eager, in-memory. Fast for moderate images. * **dask** – lazy, chunked along columns. Handles arbitrarily large images with bounded RAM. Parameters ---------- metadata_pointer_safe : str Path to the .SAFE product (metadata source). numberofLooks : int Number of sublooks to generate (≥ 2). i_image, q_image : str | np.ndarray | None In-phase / quadrature inputs (file paths or arrays). DownSample : bool Reserved for legacy compatibility. assetMetadata : dict | None Optional pre-extracted metadata dictionary. force_dask : bool | None ``True`` → always use dask. ``False`` → always numpy. ``None`` (default) → auto-detect from image size vs available RAM. chunk_cols : int | None Column-chunk width for the dask path (auto-computed if *None*).
File location: sarpyx/processor/core/subaperture_full_img.py:251
Class Signature
class CombinedSublooking
Constructor Parameters
Return Type
CombinedSublooking instances.
Exceptions
Construction/runtime exceptions are inferred from implementation and method-level documentation.
Side Effects
See method-level side effects below.
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
obj = CombinedSublooking(...) # inferred from implementation
Edge Cases
No class-level edge-case section is explicitly documented; rely on method-level checks and raised exceptions.
Public Methods (11)
CombinedSublooking.FrequencyComputation method
Calculate the min, max and central frequencies of each sublook.
File location: sarpyx/processor/core/subaperture_full_img.py:388
Signature
FrequencyComputation(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.FrequencyComputation()
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.CalcFrequencyVectors method
Zero-centred frequency vector for the analysis axis.
File location: sarpyx/processor/core/subaperture_full_img.py:432
Signature
CalcFrequencyVectors(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.CalcFrequencyVectors()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.SpectrumComputation method
FFT along the chosen axis (azimuth=0 or range=1), with fftshift.
File location: sarpyx/processor/core/subaperture_full_img.py:449
Signature
SpectrumComputation(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.SpectrumComputation()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.SpectrumNormalization method
Normalise spectrum to the average magnitude profile.
File location: sarpyx/processor/core/subaperture_full_img.py:476
Signature
SpectrumNormalization(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.SpectrumNormalization()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.SpectrumDeWeighting method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:511
Signature
SpectrumDeWeighting(self)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
- | - | no | - | No explicit public parameters; behavior inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.SpectrumDeWeighting()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
CombinedSublooking.AverageDeWe method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:517
Signature
AverageDeWe(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.AverageDeWe()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.AncillaryDeWe method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:625
Signature
AncillaryDeWe(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.AncillaryDeWe()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.Generation method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:716
Signature
Generation(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.Generation()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.save_sublooks_envi method
Save i/q of each sublook as ENVI BSQ float32, forcing endianness.
File location: sarpyx/processor/core/subaperture_full_img.py:725
Signature
save_sublooks_envi(self, out_dir, pol, prefix='', byte_order=1)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
out_dir | inferred from implementation | yes | - | inferred from implementation. |
pol | inferred from implementation | yes | - | inferred from implementation. |
prefix | inferred from implementation | no | '' | inferred from implementation. |
byte_order | inferred from implementation | no | 1 | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.save_sublooks_envi(out_dir=<out_dir>, pol=<pol>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.chain method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:762
Signature
chain(self, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.chain()
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
CombinedSublooking.run_and_save method
inferred from implementation.
File location: sarpyx/processor/core/subaperture_full_img.py:771
Signature
run_and_save(self, out_dir, pol, prefix='', byte_order=1, VERBOSE=False)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
out_dir | inferred from implementation | yes | - | inferred from implementation. |
pol | inferred from implementation | yes | - | inferred from implementation. |
prefix | inferred from implementation | no | '' | inferred from implementation. |
byte_order | inferred from implementation | no | 1 | inferred from implementation. |
VERBOSE | inferred from implementation | no | False | inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.subaperture_full_img import CombinedSublooking
# Constructor arguments are inferred from implementation.
obj = CombinedSublooking(...) # inferred from implementation
result = obj.run_and_save(out_dir=<out_dir>, pol=<pol>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.