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).

setigen.funcs.f_profiles.box_f_profile(width)[source]

Square intensity profile in the frequency direction.

setigen.funcs.f_profiles.gaussian_f_profile(width)[source]

Gaussian profile; width is the FWHM of the profile.

setigen.funcs.f_profiles.multiple_gaussian_f_profile(width)[source]

Example adding multiple Gaussians in the frequency direction.

setigen.funcs.f_profiles.lorentzian_f_profile(width)[source]

Lorentzian profile; width is the FWHM of the profile.

setigen.funcs.f_profiles.voigt_f_profile(g_width, l_width)[source]

Voigt profile; g_width and l_width are the FWHMs of the Gaussian and Lorentzian profiles.

Further information here: https://en.wikipedia.org/wiki/Voigt_profile.

setigen.funcs.f_profiles.sinc2_f_profile(width, trunc=True)[source]

Sinc squared profile; width is the FWHM of the squared normalized sinc function.

The trunc parameter controls whether or not the sinc squared profile is truncated at the first root (e.g. zeroed out for more distant frequencies).

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.

setigen.funcs.paths.constant_path(f_start, drift_rate)[source]

Constant drift rate.

setigen.funcs.paths.squared_path(f_start, drift_rate)[source]

Quadratic signal path; drift_rate here only refers to the starting slope.

setigen.funcs.paths.sine_path(f_start, drift_rate, period, amplitude)[source]

Sine path in time-frequency space.

setigen.funcs.paths.simple_rfi_path(f_start, drift_rate, spread, spread_type='uniform', rfi_type='stationary')[source]

A crude simulation of one style of RFI that shows up, in which the signal jumps around in frequency. This example samples the center frequency for each time sample from either a uniform or normal distribution. ‘spread’ defines the range for center frequency variations.

Argument ‘spread_type’ can be either ‘uniform’ or ‘normal’.

Argument ‘rfi_type’ can be either ‘stationary’ or ‘random_walk’; ‘stationary’ only offsets with respect to a straight-line path, but ‘random_walk’ accumulates frequency offsets over time.

setigen.funcs.t_profiles module

Sample intensity profiles for signal injection.

These functions calculate the signal intensity and variation in the time direction.

setigen.funcs.t_profiles.constant_t_profile(level=1)[source]

Constant intensity profile.

setigen.funcs.t_profiles.sine_t_profile(period, phase=0, amplitude=1, level=1)[source]

Intensity varying as a sine curve, where level is the mean intensity.

setigen.funcs.t_profiles.periodic_gaussian_t_profile(pulse_width, period, phase=0, pulse_offset_width=0, pulse_direction='rand', pnum=3, amplitude=1, level=1, min_level=0)[source]

Intensity varying as Gaussian pulses, allowing for variation in the arrival time of each pulse.

period and phase give a baseline for pulse periodicity.

pulse_direction can be ‘up’, ‘down’, or ‘rand’, referring to whether the intensity increases or decreases from the baseline level. amplitude is the magnitude of each pulse. min_level is the minimum intensity, default is 0.

pulse_offset_width encodes the variation in the pulse period, whereas pulse_width is the width of individual pulses. Both are modeled as Gaussians, where ‘width’ refers to the FWHM of the distribution.

pnum is the number of Gaussians pulses to consider when calculating the intensity at each timestep. The higher this number, the more accurate the intensities.

setigen.funcs.bp_profiles module

setigen.funcs.bp_profiles.constant_bp_profile(level=1)[source]

Constant bandpass profile.

setigen.funcs.func_utils module

setigen.funcs.func_utils.gaussian(x, x0, sigma)[source]
setigen.funcs.func_utils.lorentzian(x, x0, gamma)[source]
setigen.funcs.func_utils.voigt(x, x0, sigma, gamma)[source]
setigen.funcs.func_utils.voigt_fwhm(g_width, l_width)[source]

Accurate to 0.0003% for a pure Lorentzian profile, precise for a pure Gaussian.

Source: https://en.wikipedia.org/wiki/Voigt_profile.