Module: sarpyx.processor.core.signal
File: sarpyx/processor/core/signal.py
Signal processing functions for Sentinel-1 Level-0 processing. This module provides signal processing functions including FFT operations, filtering, windowing, and other DSP utilities for SAR processing.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (23)
fft_1d function
Compute 1D FFT of input data.
File location: sarpyx/processor/core/signal.py:17
Signature
fft_1d(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | int | no | -1 | Axis along which to compute FFT |
Return Type
np.ndarray
FFT of input data
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import fft_1d
result = fft_1d(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
ifft_1d function
Compute 1D inverse FFT of input data.
File location: sarpyx/processor/core/signal.py:31
Signature
ifft_1d(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | int | no | -1 | Axis along which to compute IFFT |
Return Type
np.ndarray
IFFT of input data
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import ifft_1d
result = ifft_1d(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
fft_2d function
Compute 2D FFT of input data.
File location: sarpyx/processor/core/signal.py:45
Signature
fft_2d(data: np.ndarray) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input 2D data array |
Return Type
np.ndarray
2D FFT of input data
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import fft_2d
result = fft_2d(data=<data>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
ifft_2d function
Compute 2D inverse FFT of input data.
File location: sarpyx/processor/core/signal.py:58
Signature
ifft_2d(data: np.ndarray) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input 2D data array |
Return Type
np.ndarray
2D IFFT of input data
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import ifft_2d
result = ifft_2d(data=<data>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
zero_pad function
Zero-pad data to specified length.
File location: sarpyx/processor/core/signal.py:71
Signature
zero_pad(data: np.ndarray, new_length: int, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
new_length | int | yes | - | Target length after padding |
axis | int | no | -1 | Axis along which to pad |
Return Type
np.ndarray
Zero-padded data array
Exceptions
ValueError
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import zero_pad
result = zero_pad(data=<data>, new_length=<new_length>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior.
apply_window function
Apply window function to data.
File location: sarpyx/processor/core/signal.py:105
Signature
apply_window(data: np.ndarray, window_type: str='hamming', axis: int=-1, beta: float=8.6) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
window_type | str | no | 'hamming' | Type of window ('hamming', 'hanning', 'blackman', 'kaiser') |
axis | int | no | -1 | Axis along which to apply window |
beta | float | no | 8.6 | Beta parameter for Kaiser window |
Return Type
np.ndarray
Windowed data array
Exceptions
ValueError
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import apply_window
result = apply_window(data=<data>)
Edge Cases
May raise: ValueError. Includes optional parameters with implementation-defined fallback behavior.
bandpass_filter function
Apply bandpass filter to data.
File location: sarpyx/processor/core/signal.py:143
Signature
bandpass_filter(data: np.ndarray, low_freq: float, high_freq: float, sample_rate: float, order: int=5) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
low_freq | float | yes | - | Low cutoff frequency (Hz) |
high_freq | float | yes | - | High cutoff frequency (Hz) |
sample_rate | float | yes | - | Sampling rate (Hz) |
order | int | no | 5 | Filter order |
Return Type
np.ndarray
Filtered data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import bandpass_filter
result = bandpass_filter(data=<data>, low_freq=<low_freq>, high_freq=<high_freq>, sample_rate=<sample_rate>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
lowpass_filter function
Apply lowpass filter to data.
File location: sarpyx/processor/core/signal.py:171
Signature
lowpass_filter(data: np.ndarray, cutoff_freq: float, sample_rate: float, order: int=5) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
cutoff_freq | float | yes | - | Cutoff frequency (Hz) |
sample_rate | float | yes | - | Sampling rate (Hz) |
order | int | no | 5 | Filter order |
Return Type
np.ndarray
Filtered data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import lowpass_filter
result = lowpass_filter(data=<data>, cutoff_freq=<cutoff_freq>, sample_rate=<sample_rate>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
highpass_filter function
Apply highpass filter to data.
File location: sarpyx/processor/core/signal.py:196
Signature
highpass_filter(data: np.ndarray, cutoff_freq: float, sample_rate: float, order: int=5) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
cutoff_freq | float | yes | - | Cutoff frequency (Hz) |
sample_rate | float | yes | - | Sampling rate (Hz) |
order | int | no | 5 | Filter order |
Return Type
np.ndarray
Filtered data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import highpass_filter
result = highpass_filter(data=<data>, cutoff_freq=<cutoff_freq>, sample_rate=<sample_rate>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
cross_correlate function
Compute cross-correlation between two signals.
File location: sarpyx/processor/core/signal.py:221
Signature
cross_correlate(signal1: np.ndarray, signal2: np.ndarray, mode: str='full') -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signal1 | np.ndarray | yes | - | First input signal |
signal2 | np.ndarray | yes | - | Second input signal |
mode | str | no | 'full' | Correlation mode ('full', 'valid', 'same') |
Return Type
np.ndarray
Cross-correlation result
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import cross_correlate
result = cross_correlate(signal1=<signal1>, signal2=<signal2>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
autocorrelate function
Compute autocorrelation of a signal.
File location: sarpyx/processor/core/signal.py:237
Signature
autocorrelate(signal_data: np.ndarray, max_lag: Optional[int]=None) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signal_data | np.ndarray | yes | - | Input signal |
max_lag | Optional[int] | no | None | Maximum lag to compute (None for full) |
Return Type
np.ndarray
Autocorrelation result
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import autocorrelate
result = autocorrelate(signal_data=<signal_data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
hilbert_transform function
Compute Hilbert transform of data.
File location: sarpyx/processor/core/signal.py:259
Signature
hilbert_transform(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | int | no | -1 | Axis along which to compute transform |
Return Type
np.ndarray
Hilbert transform result
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import hilbert_transform
result = hilbert_transform(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
envelope_detection function
Detect envelope of signal using Hilbert transform.
File location: sarpyx/processor/core/signal.py:273
Signature
envelope_detection(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input signal data |
axis | int | no | -1 | Axis along which to compute envelope |
Return Type
np.ndarray
Signal envelope
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import envelope_detection
result = envelope_detection(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
phase_unwrap function
Unwrap phase discontinuities.
File location: sarpyx/processor/core/signal.py:288
Signature
phase_unwrap(phase: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
phase | np.ndarray | yes | - | Input phase array (radians) |
axis | int | no | -1 | Axis along which to unwrap |
Return Type
np.ndarray
Unwrapped phase array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import phase_unwrap
result = phase_unwrap(phase=<phase>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
detrend_linear function
Remove linear trend from data.
File location: sarpyx/processor/core/signal.py:302
Signature
detrend_linear(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | int | no | -1 | Axis along which to detrend |
Return Type
np.ndarray
Detrended data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import detrend_linear
result = detrend_linear(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
detrend_constant function
Remove constant (DC) component from data.
File location: sarpyx/processor/core/signal.py:316
Signature
detrend_constant(data: np.ndarray, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | int | no | -1 | Axis along which to detrend |
Return Type
np.ndarray
Detrended data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import detrend_constant
result = detrend_constant(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
upsample function
Upsample data by integer factor using zero-padding in frequency domain.
File location: sarpyx/processor/core/signal.py:330
Signature
upsample(data: np.ndarray, factor: int, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
factor | int | yes | - | Upsampling factor |
axis | int | no | -1 | Axis along which to upsample |
Return Type
np.ndarray
Upsampled data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import upsample
result = upsample(data=<data>, factor=<factor>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
downsample function
Downsample data by integer factor.
File location: sarpyx/processor/core/signal.py:356
Signature
downsample(data: np.ndarray, factor: int, axis: int=-1, anti_alias: bool=True) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
factor | int | yes | - | Downsampling factor |
axis | int | no | -1 | Axis along which to downsample |
anti_alias | bool | no | True | Whether to apply anti-aliasing filter |
Return Type
np.ndarray
Downsampled data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import downsample
result = downsample(data=<data>, factor=<factor>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
complex_to_magnitude_phase function
Convert complex data to magnitude and phase.
File location: sarpyx/processor/core/signal.py:388
Signature
complex_to_magnitude_phase(data: np.ndarray) -> Tuple[np.ndarray, np.ndarray]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Complex input data |
Return Type
Tuple[np.ndarray, np.ndarray]
Tuple of (magnitude, phase) arrays
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import complex_to_magnitude_phase
result = complex_to_magnitude_phase(data=<data>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
magnitude_phase_to_complex function
Convert magnitude and phase to complex data.
File location: sarpyx/processor/core/signal.py:403
Signature
magnitude_phase_to_complex(magnitude: np.ndarray, phase: np.ndarray) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
magnitude | np.ndarray | yes | - | Magnitude array |
phase | np.ndarray | yes | - | Phase array (radians) |
Return Type
np.ndarray
Complex data array
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import magnitude_phase_to_complex
result = magnitude_phase_to_complex(magnitude=<magnitude>, phase=<phase>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
rms function
Compute root mean square of data.
File location: sarpyx/processor/core/signal.py:418
Signature
rms(data: np.ndarray, axis: Optional[int]=None) -> Union[float, np.ndarray]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
axis | Optional[int] | no | None | Axis along which to compute RMS (None for all) |
Return Type
Union[float, np.ndarray]
RMS value(s)
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import rms
result = rms(data=<data>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
snr_estimate function
Estimate signal-to-noise ratio.
File location: sarpyx/processor/core/signal.py:432
Signature
snr_estimate(signal_data: np.ndarray, noise_data: np.ndarray) -> float
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
signal_data | np.ndarray | yes | - | Signal data array |
noise_data | np.ndarray | yes | - | Noise data array |
Return Type
float
SNR in dB
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import snr_estimate
result = snr_estimate(signal_data=<signal_data>, noise_data=<noise_data>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
frequency_shift function
Apply frequency shift to data.
File location: sarpyx/processor/core/signal.py:453
Signature
frequency_shift(data: np.ndarray, shift_freq: float, sample_rate: float, axis: int=-1) -> np.ndarray
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data | np.ndarray | yes | - | Input data array |
shift_freq | float | yes | - | Frequency shift in Hz |
sample_rate | float | yes | - | Sampling rate in Hz |
axis | int | no | -1 | Axis along which to apply shift |
Return Type
np.ndarray
Frequency-shifted data
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.core.signal import frequency_shift
result = frequency_shift(data=<data>, shift_freq=<shift_freq>, sample_rate=<sample_rate>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
Public Classes (0)
No public classes detected.