Module: sarpyx.processor.core.spectrum
File: sarpyx/processor/core/spectrum.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 (9)
ifft2d function
Perform memory-efficient 2D inverse FFT on radar data.
File location: sarpyx/processor/core/spectrum.py:17
Signature
ifft2d(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after 2D inverse FFT.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import ifft2d
result = ifft2d(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
ifft_azimuth function
Perform memory-efficient inverse FFT along azimuth dimension.
File location: sarpyx/processor/core/spectrum.py:65
Signature
ifft_azimuth(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after inverse FFT along azimuth dimension.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import ifft_azimuth
result = ifft_azimuth(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
ifft_range function
Perform memory-efficient inverse FFT along range dimension.
File location: sarpyx/processor/core/spectrum.py:105
Signature
ifft_range(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after inverse FFT along range dimension.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import ifft_range
result = ifft_range(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
fft_range function
Perform memory-efficient FFT along range dimension.
File location: sarpyx/processor/core/spectrum.py:148
Signature
fft_range(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after FFT along range dimension.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import fft_range
result = fft_range(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
fft_azimuth function
Perform memory-efficient FFT along azimuth dimension.
File location: sarpyx/processor/core/spectrum.py:189
Signature
fft_azimuth(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after FFT along azimuth dimension.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import fft_azimuth
result = fft_azimuth(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
fft2d function
Perform memory-efficient 2D FFT on radar data in range and azimuth dimensions.
File location: sarpyx/processor/core/spectrum.py:230
Signature
fft2d(radar_data: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False, n: Optional[int]=None) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
radar_data | Union[np.ndarray, torch.Tensor] | yes | - | Input radar data array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
n | Optional[int] | no | None | Number of points for the transform. If None, uses input size. |
Return Type
Union[np.ndarray, torch.Tensor]
Processed radar data after 2D FFT.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import fft2d
result = fft2d(radar_data=<radar_data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
linear_convolution_2d function
Perform 2D linear convolution of two signals using FFT with proper padding.
File location: sarpyx/processor/core/spectrum.py:394
Signature
linear_convolution_2d(signal1: Union[np.ndarray, torch.Tensor], signal2: Union[np.ndarray, torch.Tensor], backend: str='numpy', verbose: bool=False) -> Union[np.ndarray, torch.Tensor]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signal1 | Union[np.ndarray, torch.Tensor] | yes | - | First input signal array. |
signal2 | Union[np.ndarray, torch.Tensor] | yes | - | Second input signal (kernel) array. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
Return Type
Union[np.ndarray, torch.Tensor]
Result of linear convolution with size (M+N-1, P+Q-1) where signal1 is MxP and signal2 is NxQ.
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import linear_convolution_2d
result = linear_convolution_2d(signal1=<signal1>, signal2=<signal2>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior.
correlation function
Perform cross-correlation between radar data and nominal chip.
File location: sarpyx/processor/core/spectrum.py:631
Signature
correlation(x1: np.ndarray, nomchip: np.ndarray, backend: str='numpy', verbose: bool=False) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
x1 | np.ndarray | yes | - | Input radar data array of shape (azimuth, range). |
nomchip | np.ndarray | yes | - | Nominal chip array for correlation. |
backend | str | no | 'numpy' | Backend to use ('numpy', 'torch', or 'scipy'). |
verbose | bool | no | False | Whether to print verbose output. |
Return Type
np.ndarray
Cross-correlation result with shape (range, azimuth).
Exceptions
ValueError
Side Effects
- io
Example Usage
from sarpyx.processor.core.spectrum import correlation
result = correlation(x1=<x1>, nomchip=<nomchip>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior.
linear_convolution function
Perform linear convolution of two signals using scipy with enhanced control.
File location: sarpyx/processor/core/spectrum.py:837
Signature
linear_convolution(x: Union[np.ndarray, list], h: Union[np.ndarray, list], mode: str='same', axis: Optional[int]=None, zero_pad_length: Optional[int]=None, method: str='fft') -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
x | Union[np.ndarray, list] | yes | - | Input signal or 2D array. |
h | Union[np.ndarray, list] | yes | - | Filter/impulse response (1D signal). |
mode | str | no | 'same' | Convolution mode ('full', 'valid', 'same'). |
axis | Optional[int] | no | None | Axis along which to perform convolution for 2D arrays. |
zero_pad_length | Optional[int] | no | None | Additional zero-padding length to prevent circular convolution artifacts. |
method | str | no | 'fft' | Convolution method ('fft' for FFT-based, 'direct' for direct convolution). |
Return Type
np.ndarray
Convolved signal with proper phase preservation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.spectrum import linear_convolution
result = linear_convolution(x=<x>, h=<h>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
Public Classes (0)
No public classes detected.