setigen.funcs package
setigen.funcs.f_profiles module
Sample spectral profiles for signal injection.
For any given time sample, these functions map out the intensity in the frequency direction (centered at a particular frequency).
- class setigen.funcs.f_profiles.WidthMode(value)[source]
Bases:
str,EnumSupported width interpretations for sinc-squared profiles.
- CROSSING = 'crossing'
- FWHM = 'fwhm'
- setigen.funcs.f_profiles.box_f_profile(width: float | Quantity) FrequencyProfile[source]
Return a box spectral profile.
- Parameters:
width – Signal width.
- Returns:
Frequency-profile callable.
- setigen.funcs.f_profiles.gaussian_f_profile(width: float | Quantity) FrequencyProfile[source]
Return a Gaussian spectral profile.
- Parameters:
width – Gaussian FWHM.
- Returns:
Frequency-profile callable.
- setigen.funcs.f_profiles.multiple_gaussian_f_profile(width: float | Quantity) FrequencyProfile[source]
Return a multi-component Gaussian spectral profile.
- Parameters:
width – Gaussian FWHM.
- Returns:
Frequency-profile callable.
- setigen.funcs.f_profiles.lorentzian_f_profile(width: float | Quantity) FrequencyProfile[source]
Return a Lorentzian spectral profile.
- Parameters:
width – Lorentzian FWHM.
- Returns:
Frequency-profile callable.
- setigen.funcs.f_profiles.voigt_f_profile(g_width: float | Quantity, l_width: float | Quantity) FrequencyProfile[source]
Return a Voigt spectral profile.
- Parameters:
g_width – Gaussian FWHM.
l_width – Lorentzian FWHM.
- Returns:
Frequency-profile callable.
- setigen.funcs.f_profiles.sinc2_f_profile(width: float | Quantity, width_mode: str | WidthMode = 'crossing', trunc: bool = True) FrequencyProfile[source]
Return a sinc-squared spectral profile.
- Parameters:
width – Signal width in Hz.
width_mode – Whether width is interpreted as zero-crossing or FWHM.
trunc – Whether to truncate after the first zero crossing.
- Returns:
Frequency-profile callable.
setigen.funcs.paths module
Sample signal paths for signal injection.
For any given starting frequency, these functions map out the path of a signal as a function of time in time-frequency space.
- class setigen.funcs.paths.SpreadType(value)[source]
Bases:
str,EnumSupported spread distributions for simple RFI paths.
- UNIFORM = 'uniform'
- NORMAL = 'normal'
- class setigen.funcs.paths.RfiType(value)[source]
Bases:
str,EnumSupported RFI path families.
- STATIONARY = 'stationary'
- RANDOM_WALK = 'random_walk'
- setigen.funcs.paths.constant_path(f_start: float | Quantity, drift_rate: float | Quantity) FrequencyPath[source]
Return a constant-drift path.
- Parameters:
f_start – Starting center frequency.
drift_rate – Doppler drift rate.
- Returns:
Path callable.
- setigen.funcs.paths.squared_path(f_start: float | Quantity, drift_rate: float | Quantity) FrequencyPath[source]
Return a quadratic drift path.
- Parameters:
f_start – Starting center frequency.
drift_rate – Initial drift-rate slope.
- Returns:
Path callable.
- setigen.funcs.paths.sine_path(f_start: float | Quantity, drift_rate: float | Quantity, period: float | Quantity, amplitude: float | Quantity) FrequencyPath[source]
Return a sinusoidally modulated drift path.
- Parameters:
f_start – Starting center frequency.
drift_rate – Doppler drift rate.
period – Modulation period.
amplitude – Modulation amplitude.
- Returns:
Path callable.
- setigen.funcs.paths.simple_rfi_path(f_start: float | Quantity, drift_rate: float | Quantity, spread: float | Quantity, spread_type: str | SpreadType = 'uniform', rfi_type: str | RfiType = 'stationary', seed: None | int | Generator | BitGenerator | SeedSequence = None) FrequencyPath[source]
Return a simple randomized RFI path.
- Parameters:
f_start – Starting center frequency.
drift_rate – Doppler drift rate.
spread – Width of frequency variations.
spread_type – Distribution used for per-time-step offsets.
rfi_type – Whether offsets are stationary or cumulative.
seed – Random seed or generator.
- Returns:
Path callable.
setigen.funcs.t_profiles module
Sample intensity profiles for signal injection.
These functions calculate the signal intensity and variation in the time direction.
- class setigen.funcs.t_profiles.PulseDirection(value)[source]
Bases:
str,EnumSupported pulse directions for periodic Gaussian profiles.
- RANDOM = 'rand'
- UP = 'up'
- DOWN = 'down'
- setigen.funcs.t_profiles.constant_t_profile(level: float = 1) TimeProfile[source]
Return a constant intensity profile.
- Parameters:
level – Constant intensity level.
- Returns:
Time-profile callable.
- setigen.funcs.t_profiles.sine_t_profile(period: float | Quantity, phase: float = 0, amplitude: float = 1, level: float = 1) TimeProfile[source]
Return a sinusoidal intensity profile.
- Parameters:
period – Modulation period.
phase – Modulation phase.
amplitude – Modulation amplitude.
level – Mean intensity level.
- Returns:
Time-profile callable.
- setigen.funcs.t_profiles.periodic_gaussian_t_profile(pulse_width: float | Quantity, period: float | Quantity, phase: float | Quantity = 0, pulse_offset_width: float | Quantity = 0, pulse_direction: str | PulseDirection = 'rand', pnum: int = 3, amplitude: float = 1, level: float = 1, min_level: float = 0, seed: None | int | Generator | BitGenerator | SeedSequence = None) TimeProfile[source]
Return a periodic Gaussian-pulse intensity profile.
- Parameters:
pulse_width – FWHM of individual pulses.
period – Baseline modulation period.
phase – Baseline modulation phase.
pulse_offset_width – FWHM of timing jitter.
pulse_direction – Whether pulses go up, down, or randomly both.
pnum – Number of neighboring pulses to include in the calculation.
amplitude – Pulse magnitude.
level – Baseline intensity level.
min_level – Minimum allowed intensity level.
seed – Random seed or generator.
- Returns:
Time-profile callable.
setigen.funcs.bp_profiles module
setigen.funcs.func_utils module
- setigen.funcs.func_utils.gaussian(x: ndarray | float, x0: ndarray | float, sigma: float) ndarray | float[source]
Evaluate a Gaussian profile.
- Parameters:
x – Coordinate values.
x0 – Gaussian center.
sigma – Gaussian standard deviation.
- Returns:
Gaussian profile values at x.
- setigen.funcs.func_utils.lorentzian(x: ndarray | float, x0: ndarray | float, gamma: float) ndarray | float[source]
Evaluate a Lorentzian profile.
- Parameters:
x – Coordinate values.
x0 – Lorentzian center.
gamma – Lorentzian half-width parameter.
- Returns:
Lorentzian profile values at x.
- setigen.funcs.func_utils.voigt(x: ndarray | float, x0: ndarray | float, sigma: float, gamma: float) ndarray | float[source]
Evaluate a Voigt profile.
- Parameters:
x – Coordinate values.
x0 – Profile center.
sigma – Gaussian standard deviation.
gamma – Lorentzian half-width parameter.
- Returns:
Voigt profile values at x.