Rolf-Hempel / PlanetarySystemStacker

Produce a sharp image of a planetary system object (moon, sun, planets) from many seeing-affected frames according to the "lucky imaging" technique.
275 stars 32 forks source link

Error reading images in folder due to hidden files #44

Closed channeng closed 2 years ago

channeng commented 3 years ago

After selecting a folder of .tif images, I received the following error when reading frames:

Error: Reading image with index: 66, Attempt to read image format other than 'tiff', 'tif', '.png', '.jpg' or 'fit', 'fits', continuing with next job

I did an ls -la, Turns out a .DS_Store was also created by MacOS in the same folder. Removing the hidden file resolved the issue.

This error could hinder new users in the usage of this program as most users may not be aware of any other non-visible files within the same directory.

A simple fix could be to ignore all hidden files within the selected folder when determining the file type extension for the selected folder.

Note: Thanks for creating this program. It's really useful as a native stacking application for Mac users.

Rolf-Hempel commented 2 years ago

In the most recent version I uploaded to PyPi (version 0.9.0) I fixed this issue. Now PSS includes only files with a proper picture type (png, tif, jpg, fits). All other files in the directory are ignored.