BellaNasirudin / py21cmmc_fg

A foreground and instrumental plugin for py21cmmc
MIT License
1 stars 4 forks source link

should we use data in the rawest possible form? #14

Closed steven-murray closed 5 years ago

steven-murray commented 6 years ago

At the moment, the idea is to use "data" which is itself a (2D) PS, then apply our model to mock data, simulating the way that the data was put together. However, real data is a bunch of visibilities. To get the "data" power spectrum we would have had to basically grid and transform it, just as we do inside the Likelihood class anyway.

Might it be better to use the visibilities themselves as the data, and transform them to a grid in the setup(). Are there any good reasons not to do so?

steven-murray commented 6 years ago

Our discussion today indicated that the answer to the question is "yes", so I'll do this ASAP.

steven-murray commented 6 years ago

fixed in 03f80d67c6840e4e6a2b40d2719b5a01b68981e9

BellaNasirudin commented 6 years ago

Sorry, I have questions about this.

What do you mean by using the "raw visibilities"? I thought that means we're not going to use the power spectrum at all and will be using the visibility instead for the likelihood. But we're still computing the 2D PS in computepower?

steven-murray commented 6 years ago

We are still using the power spectrum for the actual likelihood, but we are taking the "data" as visibilities, and then converting them to power spectra within the class itself. This ensures that the data is processed the same way as the model is.

BellaNasirudin commented 6 years ago

So when we compute the 2D power spectrum, we are not changing the units to cosmological units and are just using the observation units?

steven-murray commented 6 years ago

Yeah. I think this is easier and faster and less error-prone. The conversion to cosmological units is just multiplicative, so it will do the same thing to the numerator and denominator, and therefore cancels out in the likelihood.