torchsig.utils.dspΒΆ

Digital Signal Processing (DSP) Utils

Functions

bandwidth_from_lower_upper_freq

Calculates bandwidth from lower frequency and upper frequency

center_freq_from_lower_upper_freq

Calculates center frequency from lower frequency and upper frequency

compute_spectrogram

Computes two-dimensional spectrogram values in dB.

convolve

Wrapper function to implement convolution()

design_half_band_filter

Designs half band filter weights for dyadic resampling

estimate_filter_length

Estimates FIR filter length

estimate_tone_bandwidth

Estimate the bandwidth of a tone

frequency_shift

Performs a frequency shift

gaussian_taps

Designs Gaussian filter weights

interpolate_power_of_2_resampler

Applies power of 2 resampling

is_even

Is the number even?

is_multiple_of_4

Is the number a multiple of 4?

is_odd

Is the number odd?

low_pass

Low-pass filter design

low_pass_iterative_design

Iteratively designs a low-pass filter using the window method, adjusting the filter length to meet the desired stopband attenuation.

lower_freq_from_center_freq_bandwidth

Calculates the lower frequency from center frequency and bandwidth

multistage_polyphase_decimator

Multi-stage polyphase filterbank-based decimation

multistage_polyphase_interpolator

Multi-stage polyphase filterbank-based interpolation

multistage_polyphase_resampler

Multi-stage polyphase filterbank-based resampling.

noise_generator

Generates additive complex noise of specified power and type.

pad_head_tail_to_length

Zero pads the head and tail of a signal

partition_polyphase

Partitions filter coefficients into a polyphase filter bank.

polyphase_decimator

Integer-rate polyphase filterbank-based decimation

polyphase_fractional_resampler

Fractional rate polyphase resampler

polyphase_integer_interpolator

Integer-rate polyphase filterbank-based interpolation

prototype_polyphase_filter

Designs the prototype filter for a polyphase filter bank

prototype_polyphase_filter_decimation

Designs polyphase filterbank weights for decimation

prototype_polyphase_filter_interpolation

Designs polyphase filterbank weights for interpolation

sampling_clock_impairments

Implements sampling clock impairments (jitter and drift) using polyphase filtering.

slice_head_tail_to_length

Slices the head and tail of a signal

slice_tail_to_length

Slices the tail of a signal

srrc_taps

Designs square-root raised cosine (SRRC) pulse shaping filter

upconversion_anti_aliasing_filter

Applies a BPF to avoid aliasing

update_signal_snr_bandwidth

Updates the SNR and bandwidth of a signal based on dataset parameters.

upper_freq_from_center_freq_bandwidth

Calculates upper frequency from center frequency and bandwidth

upsample

Upsamples a signal