Utilities

Break open the data file

A fortran subroutine is provided to break the large data files into separate pieces here. Call the subroutine by passing the file name and it returns the following:

ns = running number of spectra (unique E and theta)

npts(ns) = number of data points in each spectrum

e(ns) = Energy of each spectrum

theta(ns) = angle of each  spectrum

nu(ns,npts(ns)) = energy loss for each point in each spectrum

sig(ns,npts(ns))= cross section for each point in each spectrum

sige(ns,npts(ns)) = error on cross section for for each point in each spectrum

cite(ns) = bibtex citation for each spectrum

Be sure to properly dimension the arrays in your calling routine.

Many topdrawer plots on a single page

Download an awk script to create topdrawer plots, 12 spectra to a page. Click here. You must insure that the first line corresponds to the location of your system's awk command.

List energies, angles and number of data points

Get awk script to generate the energy, angles, number of data points and citation for each unique data set in the data file. Click here. You must insure that the first line corresponds to the location of your system's awk command.

Awk command at the terminal

For example:
awk '$3==.367 && $4==134.5 {printf "%7.3f %10e %10e \n", $5, $6, $7}' 3H.dat

will extract the energy loss, cross section and error for the data at 0.367 GeV and 134.5 degrees from the file 3H.dat. The output can be piped into another command or redirected into a file. Slightly more sophisticated commands have been written to provide different final formatting or to extract data in a range of energies and/or angles.