achael / eht-imaging

Imaging, analysis, and simulation software for radio interferometry
https://achael.github.io/eht-imaging/
GNU General Public License v3.0
5.29k stars 496 forks source link

fixed non-square polarized image saving #162

Closed dpesce closed 1 year ago

dpesce commented 1 year ago

The image.save_fits() function was incorrectly shaping non-square images in Q, U, and V. E.g., an image that was supposed to have a shape of (100,20) would instead be saved with a shape of (100,20) in I but (20,100) in Q, U, and V, which caused issues when reading the file. The fix was simply to swap the xdim and ydim in some np.reshape() calls inside of the function.