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.
Parent Class:
Util::FileList
Constructor
- new()
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.
Accessors
- add(file, ext)
Add a file to the end of the list.
- files()
Return the file names without the extension specifier.
- files_with_ext()
Return the file names with the extension specifier.
- file(index, index)
Return the index-th file name without the extension specifier.
- file_with_ext(index)
Return the index-th file name with the extension specifier.
- files_for_param()
This overrides the inherited method to return the files names
with the extension specifier.
- extension(ext)
Set the extension indicator in all the file names.
Giving no argument will leave off the extension indicator.
- extensions()
Set separate extensions for each file. The arguments are a list of
extensions in the same order as the files.
- get_extension()
Return the extension of the first file.
- get_extensions()
Return the list of all extensions.
Methods
- 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
this one.
- 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
destroyed.
- 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
names.
- max_keyword(key)
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.
- min_keyword(key)
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_keywords(key)
Sum the values of a given keyword.
- unique_keywords(key)
Return a list of the unique values of a given keyword.
i.e. repeated values are dropped.
- select(expression)
Create a new file list which gives a subset of this list
and which is selected according to an expression involving the
header keywords.
- sort(key1, key2...)
Returns another file list sorted by the given set of keywords.
Special Methods
- DESTROY()
Destructor - deletes temporary file list and catalog.
This method should probably be
called explicitly after using the as_param method.