Manual

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

Introduction

IM2DAT radially (or azimuthally) averages a two-dimensional input image in Tagged Image File Format (.tiff), Crystallographic Binary Format (.cbf) or ESRF Data Format (.edf) to a one-dimensional scattering pattern. Besides the input image the user may provide:

  • a text file in “key: value” format that will be appended as a footer to the final output.
  • a detector or beam-stop mask to mask out certain pixels or areas
  • an axis file prepared by AXIS based on an experimental standard, or IMSIM for simulated data

In addition the beam-center position in x/y image coordinates is required. Additional options that modify the behaviour of IM2DAT are described below.

Running im2dat

Usage:

$ im2dat [OPTIONS] <IMAGE> [HEADER]

OPTIONS known by IM2DAT are described in next section, the required and optional arguments are described in the section on input files.

Command-Line Arguments and

Options IM2DAT accepts the following command line arguments:

Argument Description
IMAGE Required: a two-dimensional image in Tagged Image File Format (.tiff), Crystallographic Binary Format (.cbf) or ESRF Data Format (.edf).
HEADER Optional: may contain “key: value” pairs that are included verbatim in the footer of the final data output file. If the HEADERs are present, some keywords are parsed and used to format the output file, in particular: Description, Code, Concentration, Exposure time, and Transmitted Beam.

IM2DAT accepts the following command line options:

Short Option Long Option Description
  --flatfield=<FILE> Flatfield image (default: none)
  --beamstop-mask=<FILE> Beamstop mask file (default: none). This mask may be generated by external software or IMSIM for simulated data, in any of the supported image formats or FIT2D .msk format.
  --shield-mask=<FILE> Shield mask for MAR345 (default: none)
  --axis-data=<FILE> Angular axis data file derived from standard measurement (default: none); see AXIS for experimental and IMSIM for simulated data on how to obtain axis data files.
  --response-data=<FILE> Detector response data (default: none)
-x --beam-center-x=<ARG> Pixel x-coordinate of the beam center in image coordinates (default: 0.0)
-y --beam-center-y=<ARG> Pixel y-coordinate of the beam center in image coordinates (default: 0.0)
  --unit-time=<ARG> Unit time for standardization in seconds (default: 1)
  --maxpoints=<ARG> Maximum number of data points in output (default: all)
  --angular-unit=<ARG> Character string describing the angular units, e.g. ‘1/nm’ (default: undefined). Note: this may be any string, if defined it will be added as key-value-pair to the footer of the output file.
  --frame=<ARG> Frame number in image file (default: 1). This is only applicable to image file formats that support multiple data frames in a single image file.
  --median-filter=<y|n> Whether or not to apply a median filter (default: yes). The median filter discards outliers of the expected Poisson distribution (recommended).
-o --output=<FILE> Radially averaged output file (default: stdout)
-v --version Print version information and exit.
-h --help Print a summary of arguments, options, and exit.

Runtime Output

There is no output of IM2DAT at run-time. For data output see output files.

im2dat Input Files

IM2DAT requires the image to work radially average and has a number of additional, but optional, input files:

  • a text file in “key: value” format that will be appended as a footer to the final output.
  • a detector or beam-stop mask to mask out certain pixels or areas
  • an axis file prepared by AXIS based on an experimental standard, or IMSIM for simulated data

im2dat Output Files

If the output option is given, the radially averaged data is written to the specified location, existing files will be overwritten without further notice. Otherwise the data is written to standard output.

Example

See the manual of IMSIM for a fully worked example on the usage of IMSIM and IM2DAT. Everything shown there for simulated data also applies to experimental data.