Create an OIF (observation index file) for a dataset
An OIF (observation index file) is a FITS file that contains the names
- plus ancillary information - of the data files stored within a directory
tree (ie it also includes files stored in sub-directories).
You will find such a file - called oif.fits - included in the top level of
any Chandra dataset you receive from the CXC or the Chandra archive.
As well as providing an overview of your data, the OIF provides the
information necessary for the firstlook GUI to work.
An abbreviated example of the contents of an OIF is shown below:
primary/acisf01843N001_cntr_img2.fits.gz
|
PRIMARY
|
IMAGE
|
primary/acisf01843N001_evt2.fits.gz
|
BINTABLE
|
EVENTS
|
primary/acisf01843N001_full_img2.fits.gz
|
PRIMARY
|
IMAGE
|
The mkoif tool allows you to recreate the oif.fits file for an
observation. This is useful when you add in new data from the
archive: the oif.fits will be over-written and only contain
information relevant to the new files. It also allows you to
add the full path name to the files, so that you can have access to
the data (using firstlook) from any directory (you could store the
OIFs for all your Chandra observations in a single directory - after
renaming them to oif<id>.fits - and then browse through them all using
firstlook).
Unlike the majority of the CIAO tools, mkoif does not use
the parameter interface. It scans the current directory (or the
directory specified on the command line), storing details of
all FITS files (including compressed ones) in the file oif.fits.
The scan is done recursively, so it will search all sub-directories of the
original directory.
The output file is always created in the current directory (ie the one
in which mkoif was started).
Notes:
-
The behavior of mkoif has changed from the CIAO 2.1 release: it now
no longer requires the ouput of a `ls' command to be piped to it,
but will scan the directory structure itself.
unix% ls
oif.fits primary/ secondary/
unix% mkoif
starting to read directory
found 6 files
Inserted row 1, file primary/acisf01843N001_cntr_img2.fits
Inserted row 2, file primary/acisf01843N001_evt2.fits
...
Here we re-create the OIF to ensure that it is up to date.
unix% mkoif /data/obsid1843
starting to read directory
found 6 files
Inserted row 1, file
/data/obsid1843/primary/acisf01843N001_cntr_img2.fits
Inserted row 2, file /data/obsid1843/primary/acisf01843N001_evt2.fits
...
Here we create an OIF for the files stored within the directory
/data/obsid1843. The oif.fits file will be created in the
directory in which mkoif is run.
Note that, unlike the previous example, the data files are stored in the OIF
with the full path name.
|