This class handles a list of FITS files. In particular it
provides an interface to the ffilecat and fmerge FTOOLs.
The Util::EventFileList sub-class does even more specific things
for FITS event files.
This is not much different from the inherited constructor. It also
sets the extension specifier to undef and initializes some internal
things needed for cataloging.
- add(file, ext)
Add a file to the end of the list.
Return the file names without the extension specifier.
Return the file names with the extension specifier.
- file(index, index)
Return the index-th file name without the extension specifier.
Return the index-th file name with the extension specifier.
This overrides the inherited method to return the files names
with the extension specifier.
Set the extension indicator in all the file names.
Giving no argument will leave off the extension indicator.
Set separate extensions for each file. The arguments are a list of
extensions in the same order as the files.
Return the extension of the first file.
Return the list of all extensions.
- merge(merged, ext)
Merge all the files in the list into a single file using the fmerge FTOOL
and return the name of the merged file.
If the list contains only one file this method does nothing and returns
the name of that one file.
The second argument is the name of the EXTNAME of the merged file.
Any additional agruments is a list of columns to be merged.
Note this overrides the inherited method, which just concatenates the files.
- sublist(from, to)
Create a new list which is a subset of the total.
This method is identical to the inherited method ,
except that it also sets the extension in the new list to be the same as in
- catalog(catalog, key1, key2...)
Make a FITS catalog file out of the list.
- temp_catalog(key1, key2...)
Make a temporary FITS catalog file for internal use.
If we have already made a catalog containing the requested keywords,
no new catalog will be created.
The temporary catalog file will be deleted when the FITSlist object is
- keywords(key1, key2...)
Return arrays of keyword values for all the files in the list.
The arrays are returned in the same way as UTIL::FITSfile->table().
Specifying "FILENAME" as one of the columns will give the corresponding file
Find the maximum value of a given keyword
In scalar context returns the maximum keyword value.
In list context returns the name of the first file with the maximum value
and the maximum value.
Find the minimum value of a given keyword
In scalar context returns the minimum keyword value.
In list context returns the name of the first file with the minimum value
and the minimum value.
Sum the values of a given keyword.
Return a list of the unique values of a given keyword.
i.e. repeated values are dropped.
Create a new file list which gives a subset of this list
and which is selected according to an expression involving the
- sort(key1, key2...)
Returns another file list sorted by the given set of keywords.
Destructor - deletes temporary file list and catalog.
This method should probably be
called explicitly after using the as_param method.