Data sorting

  • Data scan: data_scan.c (Dr Carl Wheldon)

    This small program reads in a list of data file names and sorts the given ADCs into a RadWare format spectrum. Currently configured for the HMI SOP data format, but based on the RadWare get_event.c function to make it easily configurable for other data formats.

  • Matrices: matrix.c (Dr Carl Wheldon)

    A program to convert/compress/symmetrise/byte-swap matrices and output to RadWare format. Supported input formats are: DATA8M (HMI), RadWare and CMAT (decompressed) with 2 or 4 bytes per channel. Related programs, with a much lower memory usage, but without the symmetrisation option, are matrix_2b.c and matrix_4b.c for matrices with 2-bytes and 4-bytes per channel respectively.

  • MIDAS data: midas_decoder.c (Dr Carl Wheldon & Dr Tzany Kokalova)

    A program for decoding MIDAS format data files and can write both ASCII and RadWare format spectra and matrices.
    rdtape_MIDAS.c is a MIDAS data format decoder for use with the Sunsort.

  • Munich data: munich_decoder.c (Dr Carl Wheldon)

    A program for decoding MIDAS format data files and can write both ASCII and RadWare format spectra and matrices.
    block_munich.c reblocks Munich .med data files into 16k blocks. Events larger than the block. Events larger than the block size are removed.
    rdtape_munchon.c is for use with the Sunsort software and is a decoder for an open (i.e. one still being written) .med data file.
    rdtape_munchoff.c is the offline version of the Sunsort decoder.

  • General analysis

  • Halflife fitting: halflife.c (Dr Carl Wheldon)

    Fits a convolution of a Gaussian and an exponential decay (derived here gauss_exp_conv.pdf) to properly take account of finite time resolution in half-life measurements. This program uses non-linear curve fitting via a modified version of CURFIT from Bevington, "Data Reduction and Error Analysis for the Physical Sciences" (p237) as extracted from RadWare developed by David Radford at ORNL. Constant background is taken into account through χ2 minimisation. Input is from the command line. A range of input formats, including 1, 2 and 3 column ASCII data and Ortec .Spe files can be processed. Data compression and ASCII output are implemented. Example fits can be found here.

  • Kinematics and Q-values: ckin.c (Dr Carl Wheldon & Dr Tzany Kokalova))

    Calculates two-body kinematics and Q-values, including decay Q-values. Input is from the command line. This program uses the 2012 mass-table file from AMDC Atomic Mass Data Center. There is now the option (see top of source code) to compile with the Cern Libraries or libwclbes.a (compiled with gfortran, linux, x86_64) library file to enable the calculation of barrier penetration probabilities. To compile libwclbes.a for your system use the tarball wclbes.tar.gz (readme file with instructions for gfortran and f90/f77 inside). The program accepts reactions entered with 2 different formats and an arbitrary number of ejectiles, as well as accepting common notation, such as d (2H), a (4He) etc. Ckin outputs both relativistic and non-relativistic solutions. For two-body kinematics and other related derivations see kinematics.pdf.

  • Spectrum conversion: spec_conv.c (Dr Carl Wheldon)

    A program for converting between RadWare, ASCII, Xtrack (GASPWARE), Ortec (Maestro binary Chn) and GENIE (IEC) format spectra. This program includes the capability to read Xtrack multiple-spectra files of the type generated by the AGATA data acquisition. Extra features are the ability to apply gain-matching coefficients and to process many files from a list (including the multiple-spectra files). Features such as automatic byte swapping for RadWare and Maestro spectra and column detection for ASCII spectra are included. Use this script to convert Ortec Maestro .Spe format spectra into standard ASCII spectra. This script generates a new file for each spectrum with a commented header, no trailer and writes the data as two columns.

  • General purpose

  • Carriage: carriage.c (Dr Carl Wheldon)

    Either removes all carriage returns from an ASCII file (useful for pasting lines into Word LibreOffice Writer) or adds carriage returns every 'x' characters, where x is specified by the user. There is a quiet mode for calling from a script.

  • Fibonacci numbers: fibon.c (Dr Carl Wheldon)

    A program for testing and finding small (<18446744073709551615) Fibonacci numbers.

  • Pictures: pics.c (Dr Carl Wheldon)

    A program to resize a list of image files, e.g. jpeg files, using ImageMagick. This enables the fast resizing of lots of pictures. The output resolution can be specified by the user at the top of the program. Designed to be used in conjunction with ImageMagick 'identify' and 'convert' programs, enabling the appropriate orientation (portrait or landscape) to be retained.

  • Prime numbers: prime.c (Dr Carl Wheldon & Dr Tzany Kokalova)

    A program for testing and finding small (<18446744073709551615) prime numbers. The time taken for the calculation is printed at the end, making this useful for processor speed comparisons. On a modern computer the time for the largest prime below the maximum takes ~20 seconds (on a 64-bit machine). The largest prime in 2006, was the Mersenne prime: 232582657−1. Its 9808358 digits are here (9.4 MB).

  • Rotational-band analysis

  • Band alignments: alignment.f (Dr Carl Wheldon)

    Given the gamma-ray energies, spin and K value, the alignments for several bands can be calculated. The output file is in xmgrace format.
    Note: the method used to calculate the alignment is taken from C.S. Purry et al. Nucl. Phys. A 632 (1998) 229.

  • Band mixing: vmix.f (Dr Carl Wheldon)

    Calculates the interaction strength that reproduces the out-of-band/in-band gamma-ray intensity ratio. This version is spin independent but is very easy to modify with your own spin dependence. See my mixing scenarios diagram to help you decide on the input.

  • G-factors: pseudo.f (file input) (Dr Carl Wheldon)

    This program requires an input file (included at the bottom of the source code). From the transition intensities, and Nilsson configuration the output includes B(M1)/B(E2) ratios, g-factors (calc. and expt.), quadrupole mixing ratios etc. all with analytical errors. Don't be put off by the name [pseudo], I initially wrote it for a pseudo-spin nucleus, but the equations are the same: taken from the rotational model.
    A simpler command line version, gfact_err.f, calculates the intrinsic g-factor from a given in-band branching ratio (or vice versa) along with the associated error.

  • Weisskopf estimates: weisskopf.f (Dr Carl Wheldon)

    Weisskopf single-particle estimates are calculated for a given mass number and transition energy.