HERA-Team / hera_cal

Library for HERA data reduction, including redundant calibration, absolute calibration, and LST-binning.
MIT License
11 stars 8 forks source link

Add min_dim_size feature to redcal.filter_reds #827

Closed jsdillon closed 2 years ago

jsdillon commented 2 years ago

In working on redcal, I found a case where having just a few antennas in a new degeneracy dimension (the three in the northeast corner here) make redcal go slower and have a weird bistability in the convergence.

image

And here's that apparent bistability in the phase.

image

Eliminating those 3 antennas (167, 189, 191) helped a lot. Here's the phase of an antenna after: image

In theory, the degeneracies are fixed by firstcal and so shouldn't be allowed to have this kind of phase structure. I'm not 100% sure what's going on. One clue is that the convergence criterion is getting stuck at much higher values than elsewhere in the band at those frequencies: image

Regardless, it seems like it's useful to enable to user to filter out dimensions that are small with filter_reds. This PR does that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #827 (43a09a5) into main (ac6703c) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #827   +/-   ##
=======================================
  Coverage   97.11%   97.12%           
=======================================
  Files          18       18           
  Lines        8365     8372    +7     
=======================================
+ Hits         8124     8131    +7     
  Misses        241      241           
Impacted Files Coverage Δ
hera_cal/redcal.py 99.26% <100.00%> (+<0.01%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.