SPEC Data File#

The SPEC data file is written to a NeXus HDF5 file by parts as described below.

File name#

The file name (shown in this example):

1#F /home/sricat/POLAR/data/CMR/lmn40.spe

The file name is copied to the file root as the SPEC_file attribute (denoted here as @SPEC_file):

1@SPEC_file = "/home/sricat/POLAR/data/CMR/lmn40.spe"

It is expected there is only one #F control line in a SPEC data file (assumes that the name of a file will not change midway) and, if it appears, it is the first line.

File header#

Some content from a SPEC data file header is written to the root of the NeXus HDF5 file. Consider this example:

1#E 918630612
2#D Wed Feb 10 01:10:12 1999
3#C spec1ID  User = polar
4#O0    Theta  Two Theta  sample x  sample y

From this example, this content is written to attributes of the file root:

1@SPEC_epoch = 918630612
2@SPEC_date = "1999-02-10T01:10:12"
3@SPEC_comments = "spec1ID  User = polar"
4@SPEC_user = "polar"
5@SPEC_num_headers = 1

The @SPEC_comments attribute includes contents of all #C (comment) lines that appear in the header section(s), joined together by newline (\n) characters. See Comments for how this handled in scans.

The additional information in the positioner names #O0 control line will be used later (in Positioners) when writing the positioners to the file.