SPEC file format

The SPEC file format here refers to one with compatible data format with the output file from the common diffractometer control and data acquisition program SPECTM. First, let's show an example SPEC file.

#S 1  ascan  pmQ 1 13  600 1
#L pmQ ereal elive Epoch Seconds IC1 IC3 I_CESR PULSER TOTAL COMPTON IC2 ELASTIC
1  2.07 1.967 75931 2.11758 556914 396634 394.395 416 2866 233 31718 606
1.02  2.07 1.968 75934 2.11849 558523 396548 394.159 432 3000 217 31791 610
1.04  2.06 1.962 75936 2.10892 555188 394768 392.324 414 3030 253 31569 591
1.06  2.07 1.969 75939 2.11886 558933 396616 394.023 417 3138 240 31776 647
1.08  2.07 1.977 75942 2.1189 559126 396636 393.919 419 2923 246 31839 639

#S 2  ascan  pmQ 1 13  600 1
#L pmQ ereal elive Epoch Seconds IC1 IC3 I_CESR PULSER TOTAL COMPTON IC2 ELASTIC
1  2.07 1.999 77606 2.11876 490517 396566 353.616 418 2397 186 27129 533
1.02  2.069 1.997 77609 2.11807 490872 396438 353.319 415 2486 194 27167 558
1.04  2.07 1.989 77612 2.11884 489377 396583 353.419 416 2672 177 27045 536
1.06  2.07 1.996 77614 2.11884 492200 396585 353.414 428 2551 195 27218 551
1.08  2.06 1.989 77617 2.10866 488500 394682 351.707 419 2458 199 26993 550

Each scan is a data block delimited by spaces. The first line of each block must start with #S, followed by one or more spaces then the scan number, which MUST be unique throughout the file. All other texts after the scan number are taken as the scan title. The second line in each block (except comment lines) MUST start with #L, followed by column names. The column names need to be space separated, and have the same number of columns as the data. The data are simply multiple-column numbers. You can have comment lines with # as the first letter anywhere in the file, however, the first two letters cannot be either #S or #L.

SPEC is the only format allowed to contain more than one scan, and multiple scans of one measurement have to be in one file (assumption of the program). If a file format conversion or files merging becomes necessary, strictly follow the SPEC format described in the above paragraph. In the simplest case, you only need to add two lines in front of each scan, the ``#S <scan number> <scan title>'' and ``#L <column names>''.

Xiangyun Qiu 2004-04-23