Chooch - anomalous scattering curves from an energy scan

Chooch is a program by Gwyndaf Evans that produces f' and f" curves from a fluorescence energy scan. It calculates the position of the peak and inflection point of the absorption edge and estimates f" at the peak and f' at the inflection point. A script chooch, written by Art Weaver and Marian Szebenyi, provides an easy way to run Chooch (and its companion program Benny) on either a spec log file containing Escans or a simple 2-column list of energy vs. fluorescence.

Input files

The chooch script takes care of reformatting the input file as needed. On C-1, there are two versions of the script available, chooch_spec and chooch_txt; on F-2 there is only chooch, which is the same as the C-1 chooch_spec. The input for these scripts is, respectively.

  1. A spec datafile containing Escans. The script expects to find energy in the first column and the fluorescence signal in column 14. In previous versions of spec/Escan, fluorescence was in a different column. Should it change again, the chooch_spec script must be modified accordingly. Any of the Escans may be interactively selected for analysis.

  2. A simple text file containing two columns of numbers; the first column has the energy and the second column the corresponding fluorescence signal. Comment lines prefixed with a # are allowed at the top of the file.

Other formats may be accommodated by appropriate modification of the chooch script.

A sample session (user input in blue)

[specuser@f2 specuser]$ chooch

cerione9_15_03.dat  arnold_feb03.dat  eck_1_15_03.dat    f2_2002Oct28.dat
crane_3_1.dat       f2_2003Feb19.dat  f2_2003Jan14.dat   arnold11_23.dat
lee_9_10_2003.dat   f2_2003Jan19.dat  f2_2003Jan13.dat   weiss11_21dsx.dat
Which data file? [cerione9_15_03.dat]: prive_9_3.dat
#S 1  Escan 12.643 12.673 30 -100000
#S 2  Escan 12.643 12.673 30 -200000
#S 3  Escan 12.643 12.673 30 -200000
#S 4  Escan 12.643 12.673 30 -200000
#S 5  Escan 12.643 12.673 30 0
#S 6  Escan 12.643 12.673 30 0
#S 7  Escan 12.643 12.673 30 0
#S 8  Escan 12.643 12.673 30 0
#S 9  Escan 12.643 12.673 30 0
#S 10  Escan 12.643 12.673 30 0
#S 11  Escan 12.643 12.673 30 -10000
#S 12  Escan 12.643 12.673 30 -10000
#S 13  Escan 12.643 12.673 30 -200000
#S 14  Escan 12.643 12.673 30 -10000
Which energy scan? [14]: 12
ndata 30
Is this a refscan (r) or xtal_scan (x)? [x]:
r
Enter atomic symbol [Se]:
Enter absorption edge (K,L1,L2,L3,M) [K]:

Brief instructions:
  When plot appears,
    1) Type '0' (for horizontal line fit). Move mouse to put horizontal
       line on curve below edge. Click left button.
    2) Type '0'. Move mouse to put horizontal line on flat part of
       curve above edge. Click.
    3) Press space bar twice. You will see smoothed fluorescence
       and derivative-of-fluorescence curves.
    4) Set cursor on peak of lower curve and click to get
       energy of inflection point. Set cursor on peak of upper
       curve and click to get energy of peak.
    5) Type 'c'. You will see f' and f'' curves and values.
    6) Type 'q'.

Hit Enter to continue.


 ******************************************

    Benny - Version 3.01  28th June 1999

 ******************************************
A plot of raw fluorescence vs. energy appears. Put the mouse in the plot window, follow instructions 1-2. Click or hit space bar to see a plot of normalized fluorescence. Click or hit space bar again to get smoothed fluorescence and derivative curves. On this plot you can position the mouse anywhere on the plot (e.g. at the top of the peak) and click to see the corresponding energy. You can also zoom in on details by typing a z. To continue, type c .
 ******************************************

  Chooch - Version 4.0   27 September 1999
      Gwyndaf Evans
      MRC Laboratory of Molecular Biology
      Hills Road, Cambridge CB2 2QH, UK.

 ******************************************

 Element = SE  Abs. edge = K
  C & L Correction term =     -0.215
Lower integration limit =    1265.80
Upper integration limit =   50632.00
Calculating... be patient... really...

 |                   |   E (eV)   |    fp   |    fpp   |
 | Inflection point  |  12658.22  |   -8.9  |    2.9   |
 |       Peak        |  12662.12  |   -7.2  |    4.6   |
The final plot of f' and f" is now visible. At the top of the plot are listed some identifying information about the scan, the positions of the peak and inflection point, and the maximum f' and f" values. You can zoom in using z. Typing p will save the plot to a PostScript file, which can then be printed. To exit from the program, type q in the plot window.

Output

Four plots are produced: raw fluorescence, normalized fluorescence, fluorescence plus its derivative, and f'/f". The last one can be saved to a PostScript file for later printing by typing a 'p' in the plot window. If you want to save any of the others, you will have to grab it from the screen (with xv, for example) while it is visible. The positions of the peak and inflection point for the edge are reported both in the terminal window and on the final plot, also the minimum value of f' and maximum value of f".

Installation and modifications

The Chooch package may be downloaded from the CCP4 CVS site. You will also need the PGPLOT library, available from CalTech. The chooch scripts are in ~specuser/bin on f2.chess.cornell.edu and c1.chess.cornell.edu. At the top of the scripts are some lines telling where Chooch and the PGPLOT libraries are located - edit as necessary. Also edit the scripts to deal with different input file formats.

Marian Szebenyi, September 30, 2003