EMBL Hamburg Biological
Small Angle Scattering

ALMERGE manual


Written by A.G. Kikhney.
Post all your questions about ALMERGE to the ATSAS Forum.

© ATSAS Team, 2010-2014

Table of Contents


The following sections shortly describe the method implemented in ALMERGE, how to run ALMERGE from the command-line on any of the supported platforms, the required input files and the produced output. This manual refers to version 1.1 or higher.

If you use results from ALMERGE in your own publication, please cite:

Franke, D., Kikhney, A.G. and Svergun, D.I. (2012) Automated Acquisition and Analysis of Small Angle X-ray Scattering Data. Nuc Inst Meth A 689, 52-59


ALMERGE is a command-line program to merge two SAS data sets together or to extrapolate several SAS data sets to infinite dilution (zero concentration).



$> 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 optionLong optionDescription
  --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'.
-z --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.
-c --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 and options and exit.

Runtime output

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

ALMERGE input files

ALMERGE works with buffer-subtracted concentration-normalized experimental SAS data files (*.dat) in ASCII format containing 3 columns: (1) momentum transfer, (2) experimental intensity and (3) experimental errors. ALMERGE will read the concentration value if the file format is compatible with the libsaxsdocument library.

The input data must be on the same s-grid; the angular range (smin—smax) must be the same.

ALMERGE output files

ALMERGE does not produce any output files unless the output option was specified.

If the zerconc option was specified than the program will save the data extrapolated to infinite dilution, otherwise the highest and the lowest concentration data sets will be merged and saved.


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 has 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.

  Last modified: June 24, 2014

© BioSAXS group 2014