BURST EXPECTATION SEARCH (BES) METHOD DEMONSTRATION PROGRAM



Version No. 1.0
Date: June 21, 1997


INTRODUCTION:-

This demonstration program provides routines to study binned time series data to search for statistically significant fast bursts or transient spikes. The method used has been called the Burst Expectation Search (BES) method. A detailed description of the method can be found in:

"An Efficient Algorithm for the Detection of Infrequent Rapid Bursts in Time Series Data", Giles, A.B., 1997, ApJ, 474, 464

That paper contains sufficient information to enable the C code program to be understood. This file contains some additional information and describes the menu options in the demonstration program.

The program uses a random number routine from Numerical Recipes to provide integers with a Poissonian distribution. This routine can be turned off by setting Sim = 'N' in the program and adding your own code in GetUserData(), the last routine in the main program file. Your binned values can be provided in any way you like.

If you use this code or ideas expressed in the paper in any major or significant way I would appreciate being informed. Please send me a copy of any resulting publication.



COMPILATION:-

This is very simple. The main file BESmethod.c calls two include files ArrayCalc.c and Poisson.c

For a C Unix cc compiler simply use:

cc -o BESmethod BESmethod.c -lm

Then run BESmethod to get the simple menu options.



MENU OPTIONS:-

List Poisson Table (t)

The Poisson table created by the program as presently set has 9 columns (ResultWidth) and 101 rows (MaxXrayHt). The screen listing shows every 2nd row only.

Save Poisson Table (s)

The full Poisson table can be saved to a disc file using this option. This in fact saves two files - the window means (poisson_1.dat) and the equivalent threshold integers version (poisson_2.dat).

Poisson Statistics - Test Sample (p)

You can look at the relationship of Poisson probability and bin height by using this test option. The mean value per bin can be set using another menu option. The program only lists to the screen the bin heights up to 20. An extra column shows the probability per single bin multiplied by the number of bins across the Working Array (AnalysisWidth).

Change Poisson Simulation Mean (m)

Use this option to change the mean per bin. This value is used by both the Poisson statistics test option and the built in data simulator.

Load & Process (256) Data Samples (1)

This option reads in sufficient data points to refresh the top line of the Working Array. For the present setting of AnalysisWidth this is 256 points. Note that as the array is empty (all zero) to start with, the last line of the Working Array will have four updates since there are seven rows (ResultHeight) in this table [ 256 / 2**(7-1) ].

Load & Process ( 1 Full Cycle) (2)

This option reads in sufficient data points to completely cycle the entire Working Array. For the set parameters that is 16,384 points ( 256 x 64 ).

Load & Process ('N' Full Cycles) (3)

This option reads in sufficient data points to cycle the entire Working Array table N times. At the start a file is opened to log the contents of the Working Array after each cycle, The file is automatically closed at the end of the last cycle so rename the file to avoid it being overwritten. A second file is also created. This contains details of the detected bursts which occur with a significance, placing them in the array beyond a specified column number. The column number limit can be set using a menu option. These two files are only created if their toggle options are set to active. The defaults are off.

Set No. of Full Cycles (n)

This option sets an integer value for the number of analysis cycles desired.

Save Light Curve - Working Array Row 'R' (l)

Each row of the Working Array can be considered to be a Light Curve consisting of a string of 256 data points. This option saves the row (r) selected in another menu option to a file named .

Set Row Value (r)

Used to select the row of the Working Array (1 - ResultHeight) to be used by the save light curve option.

List Working Array Summary (4)

Use this option to list the Working Array Summary. A typical sample is given below:

Working Array Summary:-

       Bin     Burst     Burst       Row       No.
   Pointer   Pointer     Value       Sum      Trys
         0       128         1       237         0
         0       128         0       474         0
         0       128         2       984         0
         0       128         7      1972         0
         0       128        12      3999         0
         0       128        32      8203         0
         0       128        63     16423         0

List Working Array (5)

Use this option to list the Working Array. A typical sample is given below:

Working Array:- (LIVE)

     0     2     1     1     1     0     0     2     1     3     3     1
     4     0     1     1     2     2     8     0     3     2     1     2
     5     6     4     3     5     4     6     5    11     6     3     4
     6     3     5     7     6    11    10     5     7     9     7     7
    10    14    15    10    15    13    12    16    14    15    16    19
    34    29    37    34    31    36    26    31    24    33    26    29
    63    61    52    48    75    75    61    57    65    59    66    64

List Result Array (6)

Use this option to list the Result Array. A typical sample is given below:

Result Array - No. of Identified Bursts:- (LIVE)

  0.0400  0.0200  0.0100  0.0050  0.0025  0.0010  0.0005  0.0002  0.0001
       3       1       0       0       0       0       1       0       0
       0       0       1       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       1       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0

List Normalisation Array (7)

Use this option to list the Normalisation Array. A typical sample is given below:

Normalisation Array:- (LIVE)

  0.0400  0.0200  0.0100  0.0050  0.0025  0.0010  0.0005  0.0002  0.0001
     5.1     2.6     1.3     0.6     0.3     0.1     0.1     0.0     0.0
     2.6     1.3     0.6     0.3     0.2     0.1     0.0     0.0     0.0
     1.3     0.6     0.3     0.2     0.1     0.0     0.0     0.0     0.0
     0.6     0.3     0.2     0.1     0.0     0.0     0.0     0.0     0.0
     0.3     0.2     0.1     0.0     0.0     0.0     0.0     0.0     0.0
     0.2     0.1     0.0     0.0     0.0     0.0     0.0     0.0     0.0
     0.1     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0

List Scale Array (8)

Use this option to list the Scale Array. A typical sample is given below:

Scale Array:- (LIVE)

  0.0400  0.0200  0.0100  0.0050  0.0025  0.0010  0.0005  0.0002  0.0001
   0.586   0.391   0.000   0.000   0.000   0.000  15.625   0.000   0.000
   0.000   0.000   1.562   0.000   0.000   0.000   0.000   0.000   0.000
   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
   1.562   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000
   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000   0.000

List All (9)

This option lists in one hit the Working Array Summary, Working Array, Result Array, Normalisation Array and Scale Array.

Clear Working Array (x)

This option sets all locations in the Working Array, and those variables associated with it, to zero.

Clear Result Array (y)

This option sets all locations in the Result Array, and those variables associated with it, to zero.

Results Array Log ON/OFF (a)

Selecting this option toggles ON/OFF the Result Array log file . A sample of a short log is given below:

No. of Identified Bursts:- (LIVE)  Block      1
  0.0400  0.0200  0.0100  0.0050  0.0025  0.0010  0.0005  0.0002  0.0001
       2       0       0       0       0       0       1       0       0
       0       0       1       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0

No. of Identified Bursts:- (LIVE)  Block      2
  0.0400  0.0200  0.0100  0.0050  0.0025  0.0010  0.0005  0.0002  0.0001
       3       1       0       0       0       0       1       0       0
       0       0       1       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       1       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0

Quit at Bin No. =         49152.0
As presently set in the program the Results Array contents are cumulative for the number of cycles set. Individual time snaps can be obtained by subtracting consecutive array contents. Since the Results Array log file is overwritten for every restart of the analyse "N" cycles option (3) the contents of the Results Array are also zeroed at the start of the integration run.

Significant Bursts Log ON/OFF (b)

Selecting this option toggles ON/OFF the Bursts log file . A sample of a short log is given below:

Column Limit >=   2
 No. =    1  Bin No. =     19387.0  Row =  1  Ht =    9  Av =  1.0273  Col =  7
 No. =    2  Bin No. =     19515.0  Row =  2  Ht =   10  Av =  1.9336  Col =  3
 No. =    3  Bin No. =     42756.0  Row =  1  Ht =    7  Av =  0.9883  Col =  2

Quit at Bin No. =         49152.0

Set column limit for bursts log ( 5) (c):

Use this option to change the column threshold for logging details of significant bursts to a file.

Quit (q)

This option exits the program.



CONTACT INFO:-

  Author:  Dr.A.B.Giles    Rossi X-ray Timing Explorer (RXTE)
                           Proportional Counter Array (PCA) science team
                           Universities Space Research Association (USRA)
                           NASA / GSFC
                           
  Address:                 Code 662
                           NASA / GSFC
                           Greenbelt
                           MD 20771
                           USA

  Tel:                     301 286 6628
  FAX:                     301 286 1684
  E-mail:                  barry@pcasun3.gsfc.nasa.gov


This document is maintained by Keith Jahoda 301-286-3527.