setigen.funcs package

Submodules

setigen.funcs.bp_profiles module

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

Constant bandpass profile.

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.lorentzian_f_profile(width)[source]

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

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.choppy_rfi_path(f_start, drift_rate, spread, spread_type='uniform')[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.

Note: another approach could be to random walk the frequency over time.

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

Constant drift rate.

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

Sine path in time-frequency space.

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

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

setigen.funcs.scint_profiles module

Generate scintillated signals matching Gaussian pulse profiles and exponential intensity distributions using the autogregressive to anything (ARTA) algorithm.

Cario & Nelson 1996: https://www.sciencedirect.com/science/article/pii/016763779600017X

Scintillation on narrowband signals references:

Cordes & Lazio 1991: http://articles.adsabs.harvard.edu/pdf/1991ApJ…376..123C

Cordes, Lazio, & Sagan 1997: https://iopscience.iop.org/article/10.1086/304620/pdf

setigen.funcs.scint_profiles.autocorrelation(x, length=20)[source]
setigen.funcs.scint_profiles.build_Z(r, T)[source]

Build full baseline Z array.

setigen.funcs.scint_profiles.get_Y(Z)[source]

Get final values specific to an overall exponential distribution, normalized to mean of 1.

setigen.funcs.scint_profiles.get_rho(ts, tscint, p)[source]

Get autocorrelations with time array ts and scintillation timescale tscint.

setigen.funcs.scint_profiles.inv_exp_cdf(x, rate=1)[source]

Inverse exponential distribution CDF.

setigen.funcs.scint_profiles.psi(r)[source]

Return covariance matrix for initial multivariate normal distribution.

setigen.funcs.scint_profiles.scint_t_profile(Y, level=1)[source]

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

Module contents