Counters#

SPEC data file header control lines #J and #j describe the relationship between counter names (#J) and mnemonics (#j). The lines are numbered with a sequential index (starting at 0) to keep the line lengths within page limits.

When both types are present in the scan’s header, such as this example:

1#J0 seconds  I0  I00  USAXS_PD  TR_diode
2#j0 sec I0 I00 upd2 trd

then /SCAN/counter_cross_reference (a NXnote 1 group) is written. The fields of the group are the mnemonics and the values are the names.

1counter_cross_reference:NXnote
2   @NX_class = "NXnote"
3   @comment = "keys are SPEC counter mnemonics, values are SPEC counter names"
4   @description = "cross-reference SPEC counter mnemonics and names"
5   I0:NX_CHAR = [b'I0']
6   I00:NX_CHAR = [b'I00']
7   sec:NX_CHAR = [b'seconds']
8   trd:NX_CHAR = [b'TR_diode']
9   upd2:NX_CHAR = [b'USAXS_PD']
1

NXnote: https://manual.nexusformat.org/classes/base_classes/NXnote.html