# How to calculate spectrogram from nonstationary, nonuniformly sampled signal

I have a high resolution 3D spatial signal (xy-elevation data collected via Terrestrial Laser Scan) with very nonuniform sampling (holes/shadows due to vegetation; point spread varies as a function of distance from scanner). The original point density varies from ~0-100 pt/cm2 and has been gridded/downsampled to 1 pt/cm2. Holes can be up to a few meters wide.

I now need to calculate a 1D spatial spectrogram in Matlab (in either x or y vs elevation) without interpolating data over the holes or downsampling to the lowest sampling rate since these would introduce high frequency artifacts or decrease resolution (I'm interested in the spectral characteristics at the cm-to-m-scale). The signal is also nonstationary, so I don't think I can just use a resampling or bootstrapping method.

The built-in Matlab functions I am familiar with (FFT, spect, pwelch,) result in NaN output if there are any NaNs in the signal, so I'm considering using Matlab's Lomb-Scargle periodogram algorith (plomb) in overlapping windows.

Is there another existing spectrogram method that uses least squares fitting, frequency-dependent windowing, or some other method to ignore NaNs/holes? Or is there any reason why using overlapping plomb windows would be a poor solution here?

• Welcome to DSP.SE! Do you mean a 3D Terrestrial Laser Scan? 2D is pretty pointless (pun intended). Generally when you have $x$, $y$, and elevation data that is called 3D. – Peter K. Sep 21 '17 at 18:37
• Sorry, that was a typo! Yes, I meant 3D TSL data (xyz). Please let me know if anything else needs to be clarified. Thank you! – Dandan Sep 21 '17 at 18:41
• Cool! I've played a bit with that sort of data, so I wondered. :-) – Peter K. Sep 21 '17 at 18:43
• Most things least squares often can also be formulated as $L_1$ and $L_{\infty}$ minimizations – user28715 Sep 21 '17 at 20:13