EoRImaging / FHD

Fast Holographic Deconvolution
BSD 2-Clause "Simplified" License
20 stars 10 forks source link

Possible bug in crosspol phase calculation #260

Closed rlbyrne closed 3 years ago

rlbyrne commented 3 years ago

I believe the calculation in vis_calibration_crosspol_phase is incorrect. Here's a writeup of what I think the corrected math would be:

Potential_Crosspol_Phase_Calculation_Error.pdf

Testing is needed to see if this is a real bug and to determine how large of an effect it is.

isullivan commented 3 years ago

Interesting, this is a different result than in: https://github.com/EoRImaging/FHD/blob/master/fhd_core/calibration/crosspol_phase_calculation_memo.pdf Could you check that memo for errors, and if it is incorrect we should change the code and that memo.

rlbyrne commented 3 years ago

Unfortunately the calculation in that memo only deals with visibilities are reported with the "PQ" polarization convention. The actual implementation in the code tries to account for the fact that, in practice, we work with visibilities with both "PQ" and "QP" polarizations. There should be a sign flip when the visibilities are conjugated into the "QP" polarization convention.

rlbyrne commented 3 years ago

Pyxie found a sign error in the new memo, but the main issue is the sign difference between the two terms in the numerator and that persists with the correction. Here is the updated memo (also with the math in more gory detail, and fixing a typo where I didn't include the summation in the result.)

Potential_Crosspol_Phase_Calculation_Error.pdf