Skip to content
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

Merged
merged 3 commits into from Jan 12, 2016
Merged

Conversation

hamogu
Copy link
Member

@hamogu hamogu commented Jan 8, 2016

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.)

@hamogu
Copy link
Member Author

hamogu commented Jan 8, 2016

The appveyor tests fail, because the setup is not complete. I assume that that has to do with the fact the @bsipocz activated appveyor tests, but #273 is not merged yet.

@mwcraig
Copy link
Member

mwcraig commented Jan 11, 2016

@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 ?

@hamogu
Copy link
Member Author

hamogu commented Jan 11, 2016

@bsipocz : "1 failing check": Where did Travis go? It seems we are running only appveyor now?

hamogu and others added 3 commits January 11, 2016 08:43
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.)
@hamogu
Copy link
Member Author

hamogu commented Jan 11, 2016

OK, I pushed again and now I see Travis. That may have been a github fluke.

@bsipocz
Copy link
Member

bsipocz commented Jan 11, 2016

@hamogu - Must have been a glitch. Sometimes there is an annoying delay in picking up the commits.

@hamogu
Copy link
Member Author

hamogu commented Jan 11, 2016

Docs added. Tests passed.

crawfordsm added a commit that referenced this pull request Jan 12, 2016
Add a 'sort' method to ImageFileCollection
@crawfordsm crawfordsm merged commit e6cb55a into astropy:master Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants