Resample a simple linear sequence at 3/2 the original rate of 10 Hz. Plot the original and resampled signals on the same figure.

When filtering, `resample`

assumes that the input sequence, `x`

, is zero before and after the samples it is given. Large deviations from zero at the endpoints of `x`

can result in unexpected values for `y`

.

Show these deviations by resampling a triangular sequence and a vertically shifted version of the sequence with nonzero endpoints.

Construct a sinusoidal signal. Specify a sample rate such that 16 samples correspond to exactly one signal period. Draw a stem plot of the signal. Overlay a stairstep graph for sample-and-hold visualization.

Use `resample`

to upsample the signal by a factor of four. Use the default settings. Plot the result alongside the original signal.

Repeat the calculation. Specify `n`

= 1 so that the antialiasing filter is of order
. Specify a shape parameter
for the Kaiser window. Output the filter as well as the resampled signal.

Verify that the filter has the expected order by plotting its impulse response.

Increase `n`

to 5 and leave
. Verify that the filter is of order 40. Plot the resampled signal.

Leave the filter order at
and increase the shape parameter to
.

Decrease the filter order back to
and leave
.

Generate 60 samples of a sinusoid and resample it at 3/2 the original rate. Display the original and resampled signals.

Plot the frequency response of the anti-aliasing filter.

Resample the signal at 2/3 the original rate. Display the original signal and its resampling.

Plot the impulse response of the new lowpass filter.

Use the data recorded by Galileo Galilei in 1610 to determine the orbital period of Callisto, the outermost of Jupiter's four largest satellites.

Galileo observed the satellites' motion for six weeks. The observations have several gaps because Jupiter was not visible on cloudy nights.

Resample the data onto a regular grid using a sample rate of one observation per day. Use a moderate upsampling factor of 3 to avoid overfitting.

Plot the data and the resampled signal.

Repeat the procedure using spline interpolation.

Compute the periodogram power spectrum estimate of the uniformly spaced, linearly interpolated data. The signal peaks at the inverse of the orbital period.