From 9d68b290402d3f88abac09992117c08275038bcc Mon Sep 17 00:00:00 2001 From: hamogu Date: Mon, 11 Jan 2016 08:09:57 -0500 Subject: [PATCH] add sort to docs --- docs/ccdproc/image_management.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/ccdproc/image_management.rst b/docs/ccdproc/image_management.rst index 3c61b355..3cc09844 100644 --- a/docs/ccdproc/image_management.rst +++ b/docs/ccdproc/image_management.rst @@ -62,6 +62,16 @@ seconds, there is a convenience method ``.files_filtered``:: The optional arguments to ``files_filtered`` are used to filter the list of files. +Sorting files +------------- +Sometimes it is useful to bring the files into a specific order, e.g. if you +make a plot for each object you probably want all images of the same object +next to each other. To do this, the images in a collection can be sorted with +the ``sort`` method using the fits header keys in the same way you would sort a +:class:`~astropy.table.Table`:: + + >>> ic1.sort(['object', 'filter']) + Iterating over hdus, headers or data ------------------------------------