About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/mkoif.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 mkoif Context: tools

Synopsis

Create an OIF (observation index file) for a dataset

Syntax

mkoif [input_dir]

Description

The OIF

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:

MEMBER_LOCATION MEMBER_XTENSION MEMBER_NAME
primary/acisf01843N001_cntr_img2.fits.gz PRIMARY IMAGE
primary/acisf01843N001_evt2.fits.gz BINTABLE EVENTS
primary/acisf01843N001_full_img2.fits.gz PRIMARY IMAGE

How to use mkoif

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.

Example 1

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.

Example 2

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.

Bugs

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.