Manual

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

Introduction

DATREGRID is a tool to modify the angular grid of experimental SAS data (.dat) files. Available modifications are:

  • replace: replaces the angular grid of one file with that of a template
  • scale: scale the angular grid by a factor, e.g. to convert from \(\AA^{-1}\) to \(\text{nm}^{-1}\) or vice versa
  • template-avrg: for each angular grid point of a template, average the nearest data points of the source data
  • template-copy: for each angular grid point of a template, find the closest data point of the source data
  • join: join a number of data points by averaging
  • logarithmic: convert the source grid to logarithmic scaling

All template grids must be less dense than the source data. There is no interpolation of data points.

Running datregrid

Usage:

$ datregrid [OPTIONS] <SASDATA>

OPTIONS known by DATREGRID are described in next section, the required argument FILE in the section on input files.

Command-Line Arguments and Options

DATREGRID requires the following command line arguments:

Argument Description
SASDATA Exactly one experimental SAS data (.dat) file.

Absolute as well as relative path to data files are accepted. Instead of a file name, the argument may be given as ‘-‘ to read data from stdin.

DATREGRID recognizes following command-line options:

Short option Long option Description
-r --replace <FILE> Replace input s-axis by the one read from FILE.
-s --scale <FACTOR> Scale the angular axis by FACTOR.
  --template-avrg <FILE> Use s-axis from FILE, average nearby neighbours
  --template-copy <FILE> Use s-axis from FILE, copy nearest neighbour to output
-j --join <N> Join N points by averaging.
-l --logarithmic <N> Logarithmic binning to N total points
-o --output <FILE> Relative or absolute path to save the result; if not specified, the result is printed to stdout.
-v --version Print version information and exit.
-h --help Print a summary of arguments, options, and exit.

datregrid input files

DATREGRID expects experimental SAS data (.dat).

datregrid output files

DATREGRID writes the same experimental SAS data (.dat), but with the angular grid transformed by the selected option.

Examples

Preparation of bsa_beg.dat and bsa_end.dat for merging using template.dat as a template and merging them with DATMERGE.

$ datregrid bsa_beg.dat -t template.dat -o bsa_beg_regrided.dat
$ datregrid bsa_end.dat -t template.dat -o bsa_end_regrided.dat
$ datmerge bsa_beg_regrided.dat bsa_end_regrided.dat -o bsa_regrided_merged

Changing angular units of the SAXS data file from inverse Angstroms to inverse nanometres.

$ datregrid bsa_angstrom.dat -s 10 -o bsa_nm.dat

Replace s-axis of SAXS data file with the new one.

$ datregrid bsa.dat -r new_axis.dat -o bsa_new_axis.dat