aabdurrouf / piXedfit

piXedfit is a Python package designed for analyzing spatially resolved SEDs of galaxies
https://pixedfit.readthedocs.io/en/latest/index.html
MIT License
40 stars 7 forks source link

several possible bugs #19

Open BetaGem opened 4 months ago

BetaGem commented 4 months ago

Hi, I've encountered several possible bug in the image processing code. Here's a list of them:

in image_process.py, line 197, 211, 377, 390, 436, 449 The "hdu.header.update()" seems not to update the WCS correctly. I fixed it by replacing the "hdu.writeto(...)" with "fits.writeto(name_out, cutout.data, cutout.wcs.to_header(), overwrite=True)"

in image_process.py, line 107: get_img_pixsizes() will fail if the "dir_images" parameter is provided.

in image_utils.py, line 906: Add .astype(int) to np.zeros() or use np.full(..., 0). The "mask_region1" can't be a float array.

in image_utils.py, line 907: "or" should be replaced with "|" or "np.logical_or()".

yun201720 commented 3 months ago

The singleSEDfit founction is no longer usable.