-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 'sort' method to ImageFileCollection #274
Conversation
@hamogu -- once again, thank you! Could you please add a short mention of this to https://github.com/astropy/ccdproc/blob/master/docs/ccdproc/image_management.rst ? |
@bsipocz : "1 failing check": Where did Travis go? It seems we are running only appveyor now? |
This uses the underlying table structure to do that sort, it also updates the separate self._files accordingly. This method allows me to set a the order in which the files are processed, e.g. I can iterate over all files and make plots sorted alphabetically by 'OBJECT' or by 'OBS-TIME' or 'FILTER'. A related chage is to sort the file list when reading files from a directory. This sorting is alphapetical, if the user does not like it they can always use the new 'sort' function later. This change makes the order of files that are read in reproducable, which useful when the iterators are used to make plots of each file - I want the same order when I re-run my script. (Without this change the order of files seems to change randomly at times.)
OK, I pushed again and now I see Travis. That may have been a github fluke. |
@hamogu - Must have been a glitch. Sometimes there is an annoying delay in picking up the commits. |
Docs added. Tests passed. |
Add a 'sort' method to ImageFileCollection
This uses the underlying table structure to do that sort, it also updates
the separate self._files accordingly.
This method allows me to set a the order in which the files are processed,
e.g. I can iterate over all files and make plots sorted alphabetically by
'OBJECT' or by 'OBS-TIME' or 'FILTER'.
A related change is to sort the file list when reading files from a
directory. This sorting is alphabetical, if the user does not like it
they can always use the new 'sort' function later.
This change makes the order of files that are read in reproducible, which is useful
when the iterators are used to make plots of each file - I want the same order
when I re-run my script.
(Without this change the order of files seems to change randomly at times.)