Manual

The following sections briefly describe the method implemented in ALMERGE, how to run ALMERGE from the command-line, the required input files and the produced output.

Introduction

ALMERGE is a command-line program to merge two SAS data sets together or extrapolate multiple SAS data sets to infinite dilution, a.k.a. zero concentration.

Running ALMERGE

Usage:

$> almerge [OPTIONS] <DATAFILES>

Command-line arguments and options

ALMERGE recognizes the following command-line options. Mandatory arguments to long options are mandatory for short options too.

Short option Long option Description
  --overlap <VALUE> Minimum overlap range length in points. Default is ‘30’.
  --step <VALUE> Enumeration step in points. Smaller values result in a better overlap but longer execution times. Default is ‘2’.
  --zerconc Extrapolate to “zero concentration”. If this option is not specified and the output option is present then the program will merge the lowest concentration data with the highest concentration data.
  --concentration <VALUE> <DATAFILE> Concentration of the following data set, overrides the concentration read from the file header.
-o --output <FILE> Relative or absolute path to save the merged or extrapolated data.
-v --version Print version information and exit.
-h --help Print a summary of arguments, options, and exit.

Runtime output

The runtime output includes: the concentration, the scaling factor, the overlap range, the filename.

ALMERGE input files

ALMERGE requires background-subtracted and concentration-normalized experimental SAS data (.dat).

All input data files must be on the same angular grid, i.e the angular range (\(s_{min}\) to \(s_{max}\)) as well as the data spacing has to be identical.

ALMERGE output files

ALMERGE does not produce any output files unless the output option was specified. If the zerconc option was specified, then the program will save the data extrapolated to infinite dilution, otherwise the highest and the lowest concentration data sets will be merged and saved.

Examples

Finding the scaling factors

Find the best overlap and scaling factors:

$ almerge run_*.dat
  Concentration  Overlap    File
  4.65  (reference)         run_031.dat
  8.70 / 1.1083   56 - 166  run_064.dat
  5.30 / 1.3690   41 - 286  run_066.dat
  2.30 / 1.3541   56 - 176  run_068.dat
     ? / 1.3228   81 - 186  run_070.dat

Here, the first input file ‘run_031.dat’ is taken as a reference; the intensities in the next file ‘run_064.dat’ should be multiplied by 1.1083 to make the best overlap, the two files will overlap from point 56 to point 166, assuming that the concentration of the reference is correct, the concentration of ‘run_064.dat’ should be 8.7 / 1.1083 = 7.85; the next file ‘run_066.dat’ should be multiplied by 1.369, it will overlap with the reference from point 41 to point 286 and so on. Note that the concentration of the last file ‘run_070.dat’ could not be read from the file header.

Merging two data sets

Merge the low angle data from the lowest concentration measurement with the highest concentration data:

$ almerge run_031.dat run_064.dat run_066.dat run_068.dat -c 1.1 run_070.dat -o merged.dat
  Concentration  Overlap    File
  1.10 / 1.1905   81 - 186  run_070.dat
  8.70  (reference)         run_064.dat

The program identified the lowest and the highest concentrations, scaled the lowest concentration in a way that it fits the highest concentration (by multiplying by 1.1905) and produced a merged file that includes low concentration data (points 1-80) followed by averaged data (points 81-186) followed by high concentration data (points 187 till the last). Note that the concentration of the last file ‘run_070.dat’ was specified.

Extrapolating to infinite dilution

Extrapolate the lower angles to a “zero concentration” situation, take the higher angles from the highest concentration:

$ almerge run_031.dat run_064.dat run_066.dat run_068.dat -c 1.1 run_070.dat -z -o extrapolated.dat
  Concentration  Overlap    File
  1.10 / 1.1905   81 - 186  run_070.dat
  2.30 / 1.2179   71 - 176  run_068.dat
  4.65 / 0.9024   56 - 166  run_031.dat
  5.30 / 1.2344   56 - 146  run_066.dat
  8.70  (reference)         run_064.dat

Here the program identified the highest concentration, scaled all other data against the highest concentration data and used points 1-80 of the five data sets to extrapolate the data to an infinite dilution; in the resulting file the points from 81 till the last are taken from the highest concentration data.