Table of Contents

Name

scan345 - terminal program for doing scans and other operations on the 345mm mar research Imaging Plate Detector System .

Synopsis

scan345 [ -h ] [ [ -keep ] [ -more LEVEL ] [ -host HOST ] [ -port PORT ]

Description

scan345 is a program for performing scanner operations on the mar research Imaging Plate Detector System without graphical user interface. Input is read from a command file (see below). The program exists in two versions to cooperate with different types of controllers. Version >=2.0 of scan345 cooperates with scanners with serial no. > 043 only, while version 0.x of scan345 operates with scanners from serial no. 001 to 043. Note, however, that even scanners with serial numbers <= 043 may have been upgraded to behave like one of the later models. For scan345 >= 2.0, all scanner functions can be used, for scan345 < 2.0, available program functions are:

Options

-keep
Write spiral images to disk during scan. By default, only transformed images are saved.
-more LEVEL
Verbose output; the amount depends on the value of LEVEL, which may have a value between 0 and 3, higher values giving more information.
-host HOST
Connect to host HOST. By default, the scanner hostname is "mar345" (192.0.2.1). The host name giving on the command line overrides the default and the entry in the configuration file.
-port PORT
Connect to port PORT. By default, the connection will be established through the arbitrary ports no. 4441 to 4444. The port number given on the command line overrides the default and the entry in the configuration file.
-s PORT
Start TCP/IP-server on port PORT.

Program Flow

At startup, the program reads internal parameters from a configuration file (see below). The program then connects to the scanner via the BSD-socket-interface (Ethernet). If successful, the program waits for input from file $MARLOGDIR/mar.com. This ASCII-file contains keyworded commands. After the input has been processed, the file is deleted and the specified command is sent to the scanner. As of program version 5.0, the program can also act as TCP/IP-server by listening to connections on a given port number (see section TCP/IP-SERVER). The command syntax is the same as for the ASCII-file input. The progress of an active command is monitored in output file $MARLOGDIR/mar.message. The information in this file refers to one task only. The file is truncated at the start of each new task. If the specified command has finished, $MARLOGDIR/mar.message is closed and the program looks for further commands from file $MARLOGDIR/mar.com. Only one command can be processed at one time (the last COMMAND keyword found in mar.com). All log information goes into standard output and into the log file $MARLOGDIR/log/mar.log.NO (see below).

Keywords

The following keywords in $MARLOGDIR/mar.com are mandatory:

COMMAND <task>
Specifies the task to execute. Can be: SCAN, ERASE, CHANGE, QUIT or LISTEN (scan345 < 2.0) or SCAN, ERASE, CHANGE, QUIT, START, INIT, SHUTTER, EXPOSE, PHI, DISTANCE and OMEGA (scan345 >= 2.0). A scan in a different scanmode automatically involves a mode change. QUIT tells the scanner to exit from its listener program, LISTEN (scan345 < 2.0 only) means, that the scanner will wait for another connect request. No default.

With scan345 >= 2.0, the following commands accept further input:

With scan345 >= 2.2, the SCAN command accepts additional input:

With scan345 >= 2.0, instead of COMMAND, the following keywords can be used to access the whole range of commands for the scanner and base:

Either IPS or SYSTEM will overwrite all COMMAND keywords. Use these keywords very carefully and only after consulting mar research.

The following keywords in $MARLOGDIR/mar.com are mandatory only when doing a scan:

DIRECTORY <directory>
Specifies the output directory for image files.
Default: DIRECTORY current_directory

ROOT <root>
Specifies the root name of the output image when doing scans. The syntax is: <string>_<no>, where <string> is any string and <no> is a three digit number, e.g. 001. When not supplying the image number in _NNN notation, the image number given on the IMAGE/FFRM keyword will be appended to the root name.
Default: ROOT xtal_001

IMAGe | FFRM <n>
Optional image number to be appended to the image root name given by the ROOT keyword. An additional underscore character is appended to the root name in front of the 3-digit number.
Default: If no image is given, the root name is checked for a 3-digit ending.

MODE <scanmode>
Specifies the scan mode. The number range from 0 to 7. The scanmodes are as follows:
MODE 0 = 2300 pixels, 345 mm diameters, 0.15 mm pixelsize
MODE 1 = 2000 pixels, 300 mm diameters, 0.15 mm pixelsize
MODE 2 = 1600 pixels, 240 mm diameters, 0.15 mm pixelsize
MODE 3 = 1200 pixels, 180 mm diameters, 0.15 mm pixelsize
MODE 4 = 3450 pixels, 345 mm diameters, 0.10 mm pixelsize
MODE 5 = 3000 pixels, 300 mm diameters, 0.10 mm pixelsize
MODE 6 = 2400 pixels, 240 mm diameters, 0.10 mm pixelsize
MODE 7 = 1800 pixels, 180 mm diameters, 0.10 mm pixelsize
In mar345s detectors, scanmode 4 to 7 have been replace by:
MODE 4 = 1150 pixels, 345 mm diameters, 0.15 mm pixelsize
MODE 5 = 1000 pixels, 300 mm diameters, 0.15 mm pixelsize
MODE 6 = 800 pixels, 240 mm diameters, 0.15 mm pixelsize
MODE 7 = 600 pixels, 180 mm diameters, 0.15 mm pixelsize
In some versions of the mar345s detectors, the 150 micron modes modes 0 to 4 have been replaced by the 100 micron modes 5 to 7.
Default: MODE 0

FORMAT <format>
Specifies the image output format. For scan345 < 2.0 available formats are: 0 = spiral output only, 1 = mar345 style output, 3 = image style output. For scan345 >= 2.0, available format specifiers are: MAR345, IMAGE and SPIRAL.
In scan345 >= 3.0, the imgCIF/CBF output format has been added. CBF and imgCIF differ in the way the binary data are encoded: CBF uses binary encoding and is somewhat more compact while in the imgCIF format, the data are ASCII-encoded. The format specifier to use is: CBF and CIF. For more details about CBF/imgCIF see http://www.bernstein-plus-sons.com/software/CBF
It is strongly recommended to use the mar345 format!
Default: FORMAT MAR345 (or FORMAT 1 in scan345 < 2.0)

The following keywords in $MARLOGDIR/mar.com are optional. Their only purpose is to fill up image header entries with meaningful values. It is strongly suggested to pass at least the PHI, DISTANCE and WAVELENGTH parameters to the program.

DISTANCE <distance>
Specifies the distance crystal-detector in mm.
Default: 100 mm.

WAVELENGTH <lambda>
Specifies the used wavelength in Angstroem.
Default: Taken from configuration file

PHI <start> <end> <oscillations>
Specifies the starting and ending values of the PHI axis in degrees, as well as the number of oscillations used.
Default: Taken from configuration file

OMEGA <start> <end> <oscillations>
Specifies the starting and ending values of the OMEGA axis in degrees, as well as the number of oscillations used.
Default: Taken from configuration file

CHI <chi>
Specifies the position of the CHI axis in degrees.
Default: Taken from configuration file

THETA <2-theta>
Specifies the position of the 2-THETA axis in degrees.
Default: Taken from configuration file

TIME <exposure-time>
Specifies the used exposure time in seconds.
Default: TIME 60.0

COLLECT <mode>
Specifies the type of exposures: TIME controlled or X-ray DOSE controlled. In scan345 < 2.0, enter COLLECT 0 (time mode) or COLLECT 1 (dose mode), in scan345 >= 2.0 give, COLLECT TIME <time> or COLLECT DOSE <dose>.
Default: COLL TIME 60.0 (scan345 >= 2.0) or COLL 1 (scan345 < 2.0)

SOURCE <X-ray_source>
String to specify the type of X-ray source.
Default: Taken from configuration file

FILTER <monochromator>
String to specify the type of monochromator used.
Default: Taken from configuration file

REMARK <remark>
String for additional comments.
Default: None

BEAM <slit_X> <slit_Y>
Specifies the aperture of the collimator in X and Y.
Default: Taken from configuration file.

POLARIZATION <pol>
Specifies the polarization factor of the beam.
Default: Taken from configuration file.

POWER <kV> <mA>
Specifies the power settings of the X-ray source (kiloVolt, milliAmps).
Default: Taken from configuration file.

Environment

The following logical names must be assigned:
MARTABLEDIR:
Location of scanner specific calibration and configuration files.
MAR_SCANNER_NO
Serial number of scanner.
MARLOGDIR
Directory where log files will go.

Tcp/Ip-server

As of version 5.0, the program may accept input from a TCP/IP-socket. In the client/server-model, program scan345 is the server and listens to a given port number for incoming connections. The port number can be given on the command line by using option ’-s PORT_NUMBER’ or by providing a line in the configuration file:
SERVER PORT port_number WRITE n
The port number here specifies the port number to listen to. The option "WRITE n" is optional and is going to dump the information that would go into file mar.message (see above) as output on the TCP/IP-socket every "n" seconds. The default is n=0, i.e. no message output will be generated on the TCP/IP-socket.

$MARTABLEDIR/mar2300.$MAR_SCANNER_NO:

Input Files

The program requires the following input files:
$MARTABLEDIR/mar2300.$MAR_SCANNER_NO:
Scanner specific calibration table used for transformation of the images collected with 0.15 mm pixelsize.
$MARTABLEDIR/mar3450.$MAR_SCANNER_NO:
Scanner specific calibration table used for transformation of the images collected with 0.10 mm pixelsize.
$MARTABLEDIR/config.$MAR_SCANNER_NO:
Scanner specific configuration file (Ascii).
$MARLOGDIR/mar.com.
Keyworded ASCII file containing commands and other parameters.

Output Files

Besides the desired image, the program produces the following output files:
$MARLOGDIR/last.log:
Contains the version number of the latest log file.
$MARLOGDIR/mar.log_NO (scan345 < 2.0 only):
Latest log file. NO ranges from 1 to 99 and is increased with each call of program mar345. If NO > 99, NO = 1.
$MARLOGDIR/log/mar.log.NO (scan345 >= 2.0 only):
Latest log file. NO ranges from 1 to 99 and is increased with each call of program mar345. If NO > 99, NO = 1.
$MARLOGDIR/spy/mar.spy.NO (scan345 >= 2.0 only):
Latest spy file. Output will be produced only if "USE SPY" is given in the configuration file.
$MARLOGDIR/mar.status (scan345 >= 2.0 only):
Current scanner status: DISTANCE, PHI, currently active tasks and hardware bits (currently undocumented). The current status will be updated approx. once per second. This file is being used only if "USE STATUS" is given.
$MARLOGDIR/mar.message.
This file will be truncated at the start of each new task. The progress of the current command will be logged into this file. If the task has finished, the file will be closed.

Examples

scan345 -port 4532 -host mars

See Also

mar345_config_file, mar345, marView, marTools, mar345xf, mar345_formats, marpack, marcvt.

Author

Claudio Klein, marXperts GmbH, Norderstedt, Germany

Copyright

© Copyright 2000-2015 marXperts GmbH, Norderstedt, Germany

Address

marXperts GmbHPhone: +49 - (40) - 529 884-0
Werkstr. 3 FAX: +49 - (40) - 529 884-20
D-22844 Norderstedt - GERMANYinfo@marXperts.com
www.marXperts.com


Table of Contents