EranOfek / AstroPack

Astronomy & Astrophysics Software Pacakge
Other
19 stars 4 forks source link

AstroImage.write1 function does not work in windows #393

Open michayesh opened 9 months ago

michayesh commented 9 months ago

Matlab 2023b Windows 10 Enterprise on AP-EO-ERAN-PC Generated a flat image Astroimage and tried to save it as a fits file with write1 function using: kboFlat.write1('kboflat_win.fits'); After about 30 sec this message appeared: Out of memory. This problem exists with other Astroimages.

Tried Matlab fitswrite command for the image data - worked fine - no problem.

Tried the same command on my Ubuntu 22.04 laptop - the function worked fast and perfectly .

EranOfek commented 9 months ago

theory: maybe related to relPath2absPath - maybe not working well in windows?

On Sat, Feb 10, 2024 at 10:28 PM Michael Engel @.***> wrote:

Matlab 2023b Windows 10 Enterprise on AP-EO-ERAN-PC Generated a flat image and tried to save it as a fits file with write1 function using: kboFlat.write1('kboflat_win.fits'); After about 30 sec this message appeared: Out of memory.

Tried Matlab fitswrite command for the image data - worked fine - no problem. Tried the same command on my Ubuntu 22.04 laptop - the function worked fast and perfectly .

— Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4MRK5W2SL5R4WUDFHLYS7J6XAVCNFSM6AAAAABDC6WYKOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDQNZQGQZDKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

michayesh commented 9 months ago

Your theory is correct. Just checked tools.os.relPath2absPath function on the win10 pc - gives "out of memory message". It seems that the function calls itself near the end in the case of "no change" - (line 70) and this causes an infinite loop?

EranOfek commented 9 months ago

Meanwhile use write1 with 'SanifyPath',false,...