ENHANCE-PET / FALCON

FALCON is a Python-based software application designed to facilitate PET motion correction, both for head and total-body scans. Our program is built around the fast 'greedy' registration toolkit, which serves as the registration engine. With FALCON, users can enjoy a streamlined experience for implementing motion correction.
GNU General Public License v3.0
36 stars 6 forks source link

Bug: collection.sort() does not correctly sort single digit numbers in filenames #20

Closed Keyn34 closed 2 years ago

Keyn34 commented 2 years ago

Issue collection.sort() does not sort the files as expected when single-digit numbers are used in the filename (1, 10, 11,...,19, 2, 20....)

How to reproduce The issue seems to be the naming convention of files regarding the numbering of single digits: Using 1, 2, 3, ..., 9 within a filename causes unexpected sorting Using 01, 02, 03, ..., 09 within a filename works fine

Proposed fix Changing collection.sort() to usage of natsort package