-
Notifications
You must be signed in to change notification settings - Fork 32
Description
When reading a measurement set into a UVData object, the UVW orientation is wrong.
I am loading a measurement set with uvd.read_ms() and get the warning The uvw_array does not match the expected values given the antenna positions. The largest discrepancy is 224341.28399469642 meters [...].
224km is a large discrepancy. It turns out that the UVW orientation is wrong and should be flipped: once flipped, the discrepancy is "only" ~4m.
The reason the flip is not performed is that uvd.check() compares the uvd.uvw_array with the UVW computed from antenna positions (temp_obj.set_uvws_from_antenna_positions()) with an absolute tolerance of 1. If the condition is not satisfied, it tries flipping the convention (uvd.uvw_array *= (-1)) and re-does the comparison with an absolute tolerance of 1 (np.allclose(-temp_obj.uvw_array, self.uvw_array, atol=1). In my case, the max discrepancy after flipping is 4 which means the flip is not performed. However, the match would be better if the flip happened.
I would recommend checking which UVW orientation leads to the smallest discrepancy and apply it to the data, but still print the warning.
Thanks!