MATLAB script used to generate Figure 1a in the paper (average nighttime waveforms).