For large negative flux, this will lead to a complex flux error. Then because matlab sometimes requires uniform data format, some catalogs can become complex (see https://github.com/EranOfek/AstroPack/issues/492#issue-2442972383) when the error is saved to the catalog.
When running aperture photometry with
imUtil.sources.aperPhotCube
, the error on the flux is derived in line 174For large negative flux, this will lead to a complex flux error. Then because matlab sometimes requires uniform data format, some catalogs can become complex (see https://github.com/EranOfek/AstroPack/issues/492#issue-2442972383) when the error is saved to the catalog.
Can we just change the line to
as a simple solution?