Processing math: 100%

3 Data Format and Storage

 3.1 Reading ASCII files as input
 3.2 Reading OGIP FITS files as input

3.1 Reading ASCII files as input

The simplest form of input for PERIOD is an ASCII file. The files may contain any number of rows and columns. It is possible to specify which column refers to the x-axis, which column refers to the y-axis and which column refers to the y-axis errors. The y-axis errors are optional and if included are used (or handled) by all operations in the main PERIOD menu (see section 5). However, the only periodicity-finding option in the period_period sub-menu which actually uses the errors on data points is CHISQ (see section 5). The remaining five techniques (CLEAN, FT, PDM, SCARGLE, STRING) ignore errorbars if they are present. Note also that the input file must contain x-axis values which are in ascending order, otherwise the program will report a warning and either sort the data (if requested to do so) or abort the input.

Data is stored and processed within PERIOD using a slot system. A data slot is simply an array holding one dataset. The maximum number of data slots which can be handled at any one time in PERIOD is 40; hence PERIOD has the capability of analysing a large amount of data simultaneously.

The first command that is usually run in PERIOD is INPUT (see section 5), which loads datasets into data slots:

  Enter first and last slots for input (0,0 to quit) :

In order to load the first slot with a single dataset, you should reply 1,1 to the above prompt. Similarly, if you want to load slots 4 through to 9 with 6 datasets, one should reply 4,9 to the above prompt. It is important to note that slots can be overwritten. Typing 0,0 will return the you to the menu.

Most PERIOD commands prompt not only for an input slot, but also for an output slot:

  Enter first and last slots for input  (0,0 to quit) :
  Enter first and last slots for output (0,0 to quit) :

The input should contain the dataset (or datasets) and the output will contain the result of the operation on the dataset (or datasets). For example, given a set of 5 time-series (which have previously been loaded into slots 1 to 5 using INPUT) which need to be fitted with a sine curve (using the command FIT, see section 5), you would type 1,5 in reply to the first prompt and 6,10 in reply to the second. PERIOD will then fit sine curves to the data files loaded in slots 1 to 5 and put the fits in slots 6 to 10. Clearly, the number of output slots must be equal to the number of input slots. In addition, if any selected input slot is empty, PERIOD will abort the operation and return you to the main menu. It should be noted that in order to save on storage space you could have typed 1,5 in reply to the second prompt and the original data-files would have been overwritten by the resulting sine curves.

3.2 Reading OGIP FITS files as input

Because of the increasing use of OGIP standard FITS files within the X-ray community, PERIOD has been extended to allow FITS file table extensions where the FITS keyword HDUCLASS has the value OGIP.

As with ASCII data, data files may contain any number of rows. There is also no restricition on the number of FITS file extensions within the file to be read. Again, you must specify which columns of the table refers to the x-axis, which column refers to the y-axis and which column refers to the y-axis errors. The y-axis errors are optional and if included are used (or handled) by all operations in the main PERIOD menu (see section 5).

After you have entered the name of the file to be read, the file is opened and the keywords relating to telescope type etc are read. These are displayed so that you can make sure you are looking at the right file. The output will look something like this.

   PERIOD> ogip
  
   Enter name of OGIP FITS file (<CR> to quit) : test.fits
  
   File details are...
  
   Telescope:   ROSAT
   Instrument:  PSPCC
   Detector:    Unknown
   Object:      XRT/PSPC PSF AR LA
  
   Total number of extensions found:   4
   Number of OGIP extensions found:    4
  
   Extension   1
   A binary table.
   Size   3 by   2
   EXTNNAME is:  STDGTI
   HDUCLAS1 is:  GTI
   HDUCLAS2 is:  STANDARD
  
   Extension   2
   A binary table.
   Size   8 by   29380
   EXTNNAME is:  STDEVT
   HDUCLAS1 is:  EVENTS
   HDUCLAS2 is:  ACCEPTED
  
   Extension   3
   A binary table.
   Size   8 by   1246
   EXTNNAME is:  REJEVT
   HDUCLAS1 is:  EVENTS
   HDUCLAS2 is:  REJECTED

You are then asked to select the extension to be examined and are shown the header descriptions for each table column. From this information you can select which column should be in x-axis, y-axis or the y-axis errors part of your chosen data slot.

   Enter the extension number to be considered (0 to quit) : 3
   Column        Contents
     1             X
     2             Y
     3             PHA
     4             PI
     5             TIME
     6             DETX
     7             DETY
     8             STATUS
   Enter the TTYPE column number to be read as X (0 to quit) : 1
   Enter the TTYPE column number to be read as Y (0 to quit) : 2
   Enter the TTYPE column number to be read as Y errors (0 to ignore) : 0
  
   Enter the slot number into which the data should be read (0 to quit) : 1
  
   Reading data into slot   1
  
   Read   1246 out of   1246
  
   ** OK: Filled Slot=  1

After this you are given the option to reread the same document and fill a different slot.

While slightly more complicated to read than normal ASCII the program is still very easy to use.