On 6/24/19, Marten van Kerkwijk <m.h.vankerkw...@gmail.com> wrote: > Hi Eric, > > The easiest definitely is for the mask to just propagate, which that even > if just one point is masked, all points in the fft will be masked. > > On the direct point I made, I think it is correct that since one can think > of the Fourier transform of a sine/cosine fit, then there is a solution > even in the presence of some masked data, and this solution is distinct > from that for a specific choice of fill value. But of course it is also > true that the solution will be at least partially degenerate in its result > and possibly indeterminate (e.g., for the extreme example of a real > transform for which all but the first point are masked, all cosine term > amplitudes are equal to the value of the first term, and are completely > degenerate with each other, and all sine term amplitudes are indeterminate; > one has only one piece of information, after all). Yet the inverse of any > of those choices reproduces the input. That said, clearly there is a choice > to be made whether this solution is at all interesting, which means that > you are right that it needs an explicit user decision. >
FWIW: The discrete Fourier transform is equivalent to a matrix multiplication (https://en.wikipedia.org/wiki/DFT_matrix, https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.dft.html), so whatever behavior you define for a nonmasked array times a masked vector also applies to the FFT of a masked vector. Warren > All the best, > > Marten > _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion