Closed ssiegelx closed 1 year ago
I think there is a bug here: find_basis
is calculating the argmin
of the absolute value of the (nbase, 2)
baseline array. This will give an index into the (nbase * 2,)
flattened array, but it is being used to index the first dimension of the unflattened array.
This happens to give the correct basis for both the un-rotated and rotated versions of CHIME. However, it is giving incorrect results for certain CHORD baseline layouts that are on a simple un-rotated grid.
I think the intention here was to find the baseline with the shortest total length. I've updated the function and confirmed that is gives the expected result for un-rotated/rotated CHIME and CHORD.
Yeah, that's a bug. Good catch!
Previous version gives the correct result for CHIME, but can result in incorrect values for the grid spacing and indices for other telescopes due to a bug in how the shortest baseline is identified.