rss_ringoccs.calibration.resample_IQ module

Purpose:Resample I and Q from uniformly spaced time to uniformly spaced radius. This is set up to downsample from the raw resolution data.
rss_ringoccs.calibration.resample_IQ.pre_resample(rho_km, vec, freq)

Set vector sampling to be uniform with respect to radius at a spacing comparable to that of raw resolution. For ingress occultations, this step implicitly reverses the radius scale when interpolating.

Arguments
rho_km (np.ndarray):
 radius in kilometers
vec (np.ndarray):
 a single vector component I or Q of the complex signal
freq (float):radial sampling frequency
Returns
rho_grid (np.ndarray):
 Radii at uniform spacing at which the signal component is resampled
vec_grid (np.ndarray):
 Signal resampled with respect to radius with a uniform spacing
p (float):upsampling rate to be used by scipy.signal.resample_poly. This will always be unity because no upsampling is done.
q (float):downsampling rate to be used by scipy.signal.resample_poly. This depends on the uniform radial sampling rate at which rho_grid and vec_grid are sampled.
rss_ringoccs.calibration.resample_IQ.resample_IQ(rho_km, IQ_c, dr_desired, verbose=False)

Resample I and Q to uniformly spaced radius. Based off of Matlab’s resample function

Arguments
rho_km (np.ndarray):
 Set of ring intercept point values at initial resolution before resampling
IQ_c (np.ndarray):
 Frequency-corrected complex signal at initial resolution before resampling
dr_desired (float):
 Desired final radial sample spacing
verbose (bool):Testing variable to print out the first few resampled results
Returns
rho_km_desired (np.ndarray):
 array of ring radius at final desired spacing
IQ_c_desired (np.ndarray):
 Frequency-corrected complex signal at final desired spacing