EoRImaging / FHD

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

Fix bugs causing errors while gridding/degridding #297

Closed PyxieLouStar closed 1 year ago

PyxieLouStar commented 1 year ago

Some uvfits files were resulting in the following error during gridding/degridding: % Unable to dereference NULL pointer: <POINTER (<NullPointer>)>.

This was tracked down to two different bugs. In one case, the code which maps antenna numbers to indices was not being triggered. In another case, only using one of the two uvfits date fields resulted in an incorrect calculation of the number of baselines.

Both of these bugs are fixed here. Additionally, I have added a check which makes sure that all the elements from the uvfits header antenna arrays are present in the antenna numbers array from the antenna table.