Closed ptiede closed 4 months ago
Hi @ptiede, there is an option in obs.switch_polrep called 'singlepol_hand', which handles exactly this case - it tells the function which hand (not) to NaN when switching feeds. Currently the default is 'R', leading to this issue.
Let me know if you think we should change the default behavior here. Maybe it should not have a default and require the user to enter something manually if it detects incomplete polarization information? Or should there be some finer-grained control to allow for different polarizations on different telescopes?
@ptiede is this still an issue? Let me know!
I think it is fine to close this. The only potential issue I see is if a cite changes its feed during an observation, which does happen but is rare. The only thing I could think of to improve this would be a clear warning when calling load_uvfits
if it detects a missing polarization hand and you are loading the data in the stokes basis.
I just found a small but silent bug when using eht-imaging to read in polarized data when feeds are missing. Suppose you are reading in data where the R CP feed is missing. If you read in the data using
then everything is fine, and I see the R products are NaN'd. However, if I read in the data using the method
I get that the L products are now NaN'd out.
My guess is that the
switch_polrep
function doesn't know which components are NaN'd when moving from stokes to circular, so it just defaults to the L feeds. I'm unsure if that is the correct behavior because it can lead to some wild d-terms if you get the polarization hands wrong.