mar345_248x110
Edited on 19-May-2023

6. Output


6.1 Overview

Program mar345 produces a number of output files:

Table 1: mar345 output files.

File type File name Description
Lock file $MARLOGDIR/mar345.lock A file indicating that another session of program mar345 is still active.
Message file $MARLOGDIR/mar.message File used at startup by program marstart
Log file $MARLOGDIR/log/mar.log.N Log file with slightly more extensive output than printed on the terminal screen (stdout)
SPY file $MARLOGDIR/spy/mar.spy.N Log file with native messages of the mar345 controller
Image statistics $MARLOGDIR/lp/mar.lp.N Log file with statistical information about produced images
Current params $MARLOGDIR/mar345.dat Saved parameters from program mar345
Status file $MARLOGDIR/mar345.status Optional status file that is updated regularaly
Data Images .marXXXX | .cbfXXXX Image files in mar or cbf format produced during data collection
Summary (ASCII) .SUMMARY ASCII file with current data set parameters produced during data collection
Summary (HTML) .html HTML file with current data set parameters produced during data collection
Errors .ERRORS List of images that contained some sort of errors during data collection



6.2 Lock File

ASCII file $MARLOGDIR/mar345.lock will be created at startup of program mar345. Existence of this file indicates that a session is or might be active. The file will be deleted by the program when exiting the program. A program crash will leave the file where it is. If the file already exists at program startup, the program will ask you to confirm wether you really want to start another instance of it. The main reason for this procedure is that mar345-controller reuse the network sockets for talking to the computer, so any attempt to open a new connection to the controllers will make previous connections useless!


6.3 Message File

ASCII file $MARLOGDIR/mar.message will be created at startup of program mar345. This file reports wether the program is able to establish connection with the controllers. This message file will be read by program marstart which presents this information in a window to be acknowledged. In case of failure, the window allows to terminate the current mar345 process. Program marstart is called automatically by program mar345 and has no other functions.

When program mar345 is configured to accept commands from external programs (keyword COMMAND <interval>, see chapter Keywords in section Input), the message file will be written out periodically while a certain task is in progress. The 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. The message file may be used by external programs to synchronize the data read-out of the mar345-detector with other hardware. A typical output of a single scan would look like:

mar345: Task SCAN STARTED at Mon Feb 20 16:06:09 2014
mar345: Task SCAN   2 % complete
mar345: Task SCAN   8 % complete
...
mar345: Task SCAN  91 % complete
mar345: Task SCAN  97 % complete
mar345: Task SCAN ENDED   at Mon Feb 20 16:06:44 2014

The default location and name of the message file can be changed by assigning an environment variable MARMESSAGEFILE.


6.4 Log File

ASCII file $MARLOGDIR/log/mar.log.N will be created at startup of program mar345. It contains essentially the same information as printed on the terminal where you run the program.

It is generally a good idea to keep some versions of this file for backtracing hardware problems. The number of file versions to be kept is 1 to 99. After reaching 99, N will be reset to 1 for the next start of the program.

The program automatically creates a soft link $MARLOGDIR/mar.log pointing to the current log file $MARLOGDIR/log/mar.log.N, so for looking into the file currently in use you don't have to descend to directory $MARLOGDIR/log and look at the creation dates of all log files.

6.5 Spy Files

At startup, program mar345 optionally creates an ASCII file $MARLOGDIR/spy/mar.spy.N. This file contains native controller messages of the mar345-detector. The controller produces very detailed information about all hardware processes.

As with the log files, 99 versions of that file will be kept on disk and then recycled.

The program automatically creates a soft link $MARLOGDIR/mar.spy pointing to the current spy file $MARLOGDIR/spy/mar.spy.N.

Note: the files may become quite large in size. It is therefore advisable to have sufficient disk space!



6.6 Statistics File

At startup, program mar345 optionally creates ASCII files $MARLOGDIR/lp/mar.lp.N. This file contains some statistical information of the images produced during data collection. This file is mostly used for calibration purposes and of little importance for the user.

As with the log files, 99 versions of that file will be kept on disk and then recycled.

The program automatically creates a soft link $MARLOGDIR/mar.lp pointing to the current file $MARLOGDIR/lp/mar.lp.N.


6.7 Parameter Files

Program mar345 continuously saves parameters whenever they change within the program. When starting the program, the saved parameters are read back so the user always finds the latest changes after quitting a mar345 session. The parameter file read at startup and updated during program execution is called $MARLOGDIR/mar345.dat. The parameter file is a keyworded ASCII-file which may be edited. For syntax, consult chapter Parameter File in section Input.

Parameter files can be explicitely created from within the program. This is useful when working on a project where you always apply the same set of parameters. The parameter files carry the extension ".set" and may be saved using the "Save" button in the "Data collection parameters"-window ( see chapter 4.6.2 in section Collect).


6.8 Status File

Program mar345 can be configured to periodically save current status information to file $MARLOGDIR/mar345.status. This ASCII-file contains information about motor positions and about progress of current tasks of the mar345-detector. The purpose for this is to give any other program a chance to exchange information with the mar hardware.


6.9 Data Images

mar345 produces images in 3 formats during data collection.

Table 2: Image formats produced by mar345

Format Usual extension Description
mar345 .marXXXX Images in mar345 format
cbf .cbfXXXX Images in CBF format
spiral .sXXXX Raw spiral images
raw .rawXXXX Raw 16-bit images without header


6.10 ASCII Summary File

During data collection, the program optionally produces an ASCII file containing all relevant information about parameters of the current data collection. The file will be saved into the current data directory and is called "Image root".N.SUMMARY. N is a number starting at 1 and is incremented if the file already exists. This file is useful for keep track of what has been done during the current data collection.


6.11 HTML Summary File

Same as the ASCII summary file, but in html format.


6.12 Errors File

If an image has been recollected during a data collection because of some hardware problem, there will be a file written to the data directory containing the number of the images affected by an error. The file is called "Image root".N.ERRORS where N is a number starting at 1 and is incremented if the file already exists.