HERA-Team / hera_sim

Simple simulation code for HERA-like redundant interferometric arrays
Other
15 stars 8 forks source link

Allow proper addition of real-valued noise to autocorrelations #213

Open jsdillon opened 2 years ago

jsdillon commented 2 years ago

As of #212, adding thermal noise will increase autocorrelations to account for the noise bias from the receiver temperature. However, it does not add a random component on top of that, since the SNR on autocorrelations is so high that this rarely matters. That said, we should also add thermal noise to the autocorrelations (in addition to the receiver noise bias).

jsdillon commented 2 years ago

Adding a note that @aewallwi shared some math relevant to this problem over in #212.

aewallwi commented 2 years ago

While we are on the topic of noise in autocorrelations, I noticed that gen_white_noise method, which generates gaussian noise, is used to get noise fluctuations regardless of whether we are dealing with cross or autocorrelations.

https://github.com/HERA-Team/hera_sim/blob/9576e78bd8807473c40152f9b6b61745ca9dc879/hera_sim/utils.py#L411

The thermal noise on autocorrelation should technically be drawn from a Gamma distribution rather than a normal distribution. Is this done in hera_sim?

image

I guess this Gamma distribution converges to a normal through the central limit theorem (N = 1 million) so a gaussian is an excellent approximation but maybe we should note this somewhere in a docstring.