EoRImaging / eppsilon

eppsilon - error propagated power spectrum with interleaved observed noise
BSD 2-Clause "Simplified" License
5 stars 4 forks source link

Change to using a symmetric window rather than an asymmetric one for even numbers of frequencies #127

Closed bhazelton closed 4 years ago

bhazelton commented 4 years ago

Needs to be tested. Cath reports that she finds a symmetric window performs better, but in my very simple tests it looks like it might be worse in eppsilon.

fixes #124

bhazelton commented 4 years ago

@nicholebarry can you test this? If it performs worse (or even if it's not wildly better) we might want to make this a top-level option rather than hardcoding it.

nicholebarry commented 4 years ago

So, an "antisymmetric" window is correct! We should leave in the periodic keyword.

However, if we have an "antisymmetric" window, does that mean the calculated mean redshift of the window should be slightly shifted? I understand that it will be minuscule and most likely insignificant, but we have a chance right now to report the most accurate redshift we can.

Here's an excerpt from Harris 1978 that defines "DFT-even":

Since the DFT essentially considers sequences to be periodic, we can consider the missing end point to be the beginning of the next period of the periodic extension of this sequence. In fact, under the periodic extension, the next sample is indistinguishable from the sample at zero seconds. 

This apparent lack of symmetry due to the missing (but implied) end point is a source of confusion in sampled window design. This can be traced to the early work related to convergence factors for the partial sums of the Fourier series. The partial sums (or the finite Fourier transform) always include an odd number of paints and exhibit even symmetry about the origin. Hence much of the literature and many software libraries incorporate windows designed with true even symmetry rather than the implied symmetry with the missing endpoint! 

We must remember for DFT processing of sampled data that even symmetry means that the projection upon the sampled sine sequences is identically zero; it does not mean a matching left and right data point about the midpoint. To distinguish this symmetry from conventional evenness we will refer to it as DFT-even (i.e., a conventional even sequence with the right end point removed). Another example of DFT-even symmetry is presented in Fig. 2 as samples of a periodically extended triangle wave. 

bhazelton commented 4 years ago

@nicholebarry Thanks! I know that I did some reading back when I first wrote this but I couldn't remember why I decided to use the periodic (asymmetric) one. We can adjust the reported redshift if you like, I'm not super exercised about it one way or the other.