rss_ringoccs.scatter.spectrogram module

rss_ringoccs.scatter.spectrogram.Scatter(rsr_inst, geo_inst, cal_inst, rho_limits=[65000.0, 140000.0], stack=False, nstack=16, hires=False, numpts=None, nsegs=None)
Purpose:
Run spectrogram code and output results to file
Arguments:
rsr_inst (obj):instance of RSR reader
geo_inst (obj):instance of Geometry
cal_inst (obj):instance of Calibration
Keyword Arguments:
rho_limits (list):
 2x1 list of radii boundaries in km over which to compute the spectrogram. Default is [65000,140000].
stack (bool):specifies whether to stack the resulting spectrogram to improve scattered signal SNR. Default is True.
nstack (int):number of spectrogram slices to stack in each bin. Only used if stack is set to True.
hires (bool):specifying whether to compute spectrogram “manually” in a high resolution time sampling mode with a continuous Fourier transform (this circumvents the Gabor uncertainty limit posed by the discrete STFT). Default for hires is False. Note: this will take a substantial amount of time to compute and is not recommended.
rss_ringoccs.scatter.spectrogram.cont_stft(time, signal, numpts=1000, nsegs=500)
Purpose
Compute the continuous STFT
Arguments:
time (np.ndarray):
 one-dimensional array of times at which signal is sampled – sampling MUST be uniform
signal (np.ndarray):
 the uniformly-sampled signal
Keyword arguments:
numpts (int):number of points per STFT segment
nsegs (int):number of segments in STFT
Notes:
  1. Both numpts and nsegs MUST be smaller than the length of time
  2. Continuous STFT will have dimensions nsegs``x``numpts
rss_ringoccs.scatter.spectrogram.spectro(time, signal, stack=True, nstack=16, hires=False, numpts=None, nsegs=None)
Purpose:
Compute short-time Fourtier transform (STFT), i.e. the spectrogram, from a given signal.
Arguments:
time (np.ndarray):
 array of times at which signal was measured
signal (np.ndarray):
 array of signal values for which to compute the spectrogram, must match length of times
Keyword Arguments:
stack (bool):boolean specifying whether to stack the spectrogram to improve signal-to-noise, default is True
nstack (int):number of FFT segments to include in each bin when spectrogram is stacked. only used if stack is True. Default is 16.
hires (bool):boolean specifying whether to use a continuous Fourier transform to circumvent Gabor uncertainty when computing the STFT.
numpts (int):number of points to use in each STFT segment. Only used if hires is true, default 1000.
nsegs (int):number of segments to use in total STFT. Only used if hires is True, default is length of time / nperseg
Notes:
  1. The continuous Fourier transform specified by hires is computationally expensive and will take substatially longer to run than the discrete STFT bound by the Gabor limit.
  2. numpts * nsegs is not to exceed the length of time.
rss_ringoccs.scatter.spectrogram.stack_spec(time, Sxx, N=16)
Purpose:
Stack spectrogram slices to improve SNR of the incoherent signal.
Arguments:
time (np.ndarray):
 Jx1 array of times at which the spectrogram was computed
Sxx (np.ndarray):
 IxJ array of spectrogram power values
Keyword Arguments:
N (int):number of FFT segments to include in each bin, must be less than J, default is 16