925-456-1020 info@acornnmr.com

NUTS file format

NUTS file format

NUTS Help

Common Data File Format

There are now 3 different NUTS file formats, referred to as Type 1 (original), Type 2 and Type 3.  The changes have been made to add flexibility for future program modifications.  The default format can be set in the NUTS.ini file, and can also be set while NUTS is running.  To do this, enter the "non-2-letter" command mode (by typing 2F), and type, for example, 

header 2

which would set the header type to 2.

This command can also be used to determine the length of the header, in bytes:

header length

Type 1

The translated files have a 258 32bit word header which contains several pieces of information.

A list of file types which can be identified and imported into NUTS with the import (IM) command can be found in the section on data translation.

The general description of the created file is given below:

See also:

C structure definitions for NUTS file format
C code which defines the structure of the NUTS data file and includes routine for writing out a NUTS Type 1 data file
Looking at data files
FORTRAN program for converting data to CDFF Type 1

NOTE Word numbering starts at zero since that is the way computer addressing schemes would start.

 

Word              Variable 	                    Description  Number          Type
0        int 		Byte Key 04030201 Hexadecimal 1        int 		Number of words in header     ( Usually has 256 here )  Start of general header information 2        int 		Number of Dimensions in data ( 1D, 2D, 3D etc. data )  NOTE - If data is written as integer NUTS will "import" the data as floats   3        int 		Data Format    0=IEEE float, 1=32 bit integer 4        int 		Empty             ( Usually a 1 here ) 5        int 		Frame Size         ( Usually 32 ) 6        int 		100 * Program Version Number 7        int 		Number of points in second dimension 8 	 int   	 	No Tailer = 0, Tailer present = 1  18       float 		SW Sweep Width - NOT used by NUTS         19       float 		SF Spectrometer Freq - Not used by NUTS      20 to 83   float        64 time values from an arrayed experiment   84-95      --           unassigned    (95 is last word of general header information)  First Dimension Parameters 96        int 		pts1d - Data Points 97        int 		complex1 - Data Type: 0 = Real; 1 = Complex; 2 = Bruker Interleaved 98        int 		domain1 - Domain Type: 0 = Time; 1 = Frequency 99        int 		axis1 - Axis Type: 0 = None; 1 = Points; 2 = Hz; 3 = PPM 100       long 		decimation - Bruker decimation no. for digitally filtered data  101-111    --   	unassigned  112       float 	sw1 - Sweep Width 113       float 	sf1 - Spectrometer Frequency 114       float 	of1 - Reference Shift 115       float 	Reference Point (unused by NUTS) 116       float 	Phase Pivot (unused by NUTS) 117       float 	tpa1 - Zero Order Phase 118       float 	tpb1 - First Order Phase 119       float 	tlb1 - LB -- Line Broadening by EM command 120-135    --           unassigned  Second Dimension Parameters. 136        int		pts2d - Data Points 137        int 		complex2 - Data Type: 0 = Real; 1 = Complex; 2 = Bruker Interleaved (TPPI) 138        int 		domain2 - Domain Type: 0 = Time; 1 = Frequency 139        int 		axis2 - Axis Type: 0 = None; 1 = Points; 2 = Hz 3 = PPM 140-151       		 unassigned  152        float 	sw2 - Sweep Width 153        float 	sf2 - Spectrometer Frequency 154        float 	of2 - Reference Shift 155        float 	Reference Point (unused by NUTS) 156        float 	Phase Pivot (unused by NUTS) 157        float 	tpa2 - Zero Order Phase 158        float 	tpb2 - First Order Phase 159        float 	tlb2 - LB -- Line Broadening by EM command 160-201     --          unassigned  General Parameters 204        float 	Temperature 205-214    chars 	EXperiment description string 215        float 	90 Degree pulse length in usec 216        float 	Recycle delay in seconds 217        long int 	Number of Acquisitions 218 - 227    chars 	USER name string 228 - 235    chars 	DATE string 236 - 256    chars 	COMMENT string  After the header comes the data as complex pairs. If the data is real only then every other word must be zero.  The first word of each slice of data is the size of that slice  in words. Therefore a 4096 Complex Pair data set would be 8192 words long. NOTE: While NUTS writes this word into the data format it never reads or uses this information.   The word numbers below assume the header is 256 Words long. 258        int 		Data size of slice 1 in words 259...    float 	Data  If multi-D then the next dimension. ... int 		Data Size of slice 2 in words ... float 		Data  As many slices as needed.

 

Type 2

In addition to a larger header block (1026 rather than 258), the new format also eliminates the "spacer" between slices.  In Type 1 format, the first word of each slice is an integer equal to the size of that slice.  NUTS never used that value, it was included to make the format consistent with the Felix format from which it derived.  To make things simpler, this spacer was eliminated in the Type 2 format.

 

Word              Variable 	                    Description  Number          Type
0 	   int 		04030201 Hexadecimal
1 	   int 		Number of words in header, Usually 1024
2 	   int 		1=1D, 2=2D, 3=3D etc
3	   int 		0 = float, 1 = integer
4 	   int 		1 = NUTS 1st Header, 2 = NUTS 2nd Header,  5  	   int 		Usually 32 6 	   int 		Version Number of Program times 100 8 	   int 		0 = No Tailer, 1 = Tailer 20-83 	   float 	64 time values from an   1st Dimension Parameters 96        int 		pts1d - Data Points 97        int 		complex1 - Data Type: 0 = Real; 1 = Complex; 2 = Bruker Interleaved 98        int 		domain1 - Domain Type: 0 = Time; 1 = Frequency 99        int 		axis1 - Axis Type: 0 = None; 1 = Points; 2 = Hz; 3 = PPM 100       long 		decimation - Bruker decimation no. for digitally filtered data  101-111    --   	unassigned  112       float 	sw1 - Sweep Width 113       float 	sf1 - Spectrometer Frequency 114       float 	of1 - Reference Shift 115       float 	Reference Point (unused by NUTS) 116       float 	Phase Pivot (unused by NUTS) 117       float 	tpa1 - Zero Order Phase 118       float 	tpb1 - First Order Phase 119       float 	tlb1 - LB -- Line Broadening by EM command 120-135    --           unassigned
2nd Dimension Parameters 136        int		pts2d - Data Points 137        int 		complex2 - Data Type: 0 = Real; 1 = Complex; 2 = Bruker Interleaved (TPPI) 138        int 		domain2 - Domain Type: 0 = Time; 1 = Frequency 139        int 		axis2 - Axis Type: 0 = None; 1 = Points; 2 = Hz 3 = PPM 140-151     --  	unassigned  152        float 	sw2 - Sweep Width 153        float 	sf2 - Spectrometer Frequency 154        float 	of2 - Reference Shift 155        float 	Reference Point (unused by NUTS) 156        float 	Phase Pivot (unused by NUTS) 157        float 	tpa2 - Zero Order Phase 158        float 	tpb2 - First Order Phase 159        float 	tlb2 - LB -- Line Broadening by EM command 160-201     --          unassigned  176-215 -- reserved for
 3rd Dimension Parameters 216-255 -- reserved for 4th Dimension Parameters  General Parameters 256 	   float 	Temperature for experiment  257 	   float 	90 degree pulse length in usec  258 	   float 	Recycle delay in seconds  259 	   int 		Number of acquisitions  260-267    char 	Name of pulse program  268-275    char 	Name of nucleus 276-283    char 	solvent  284-291    char 	USER name string  292-299    char 	DATE string  300-331    char 	COMMENT string  332-1025    --		unassigned
After the header comes the data as complex pairs  (alternating real and imaginary pts). If the data is real only then every other word must  be zero.  Subsequent slices follow immediately after the preceeding slice. 
Type 3

This format is based on the JCAMP specifications, but is not identical to JCAMP.  The header is ASCII, with a keyword at the beginning of each line.  This offers much more flexibility for future additions to information stored in the header, because the exact location of any item in the header and the order of items is not fixed.  Some of the lines conform to the JCAMP-DX specification, others are NUTS-specific items and are in a proprietary section.  Another advantage of this format is that the header can be viewed in any text editor.

The data is not stored as ASCII, as is the case for JCAMP files, because the file size would be much larger.  The header is terminated with Ctrl-Z, and is followed by the data points, stored as 32-bit floating point numbers in Intel (little endian) byte order.   The data are organized as Real, Imag, Real, Imag, etc.  This is essentially the format proposed as JCAMP-DXB, which was not approved as a JCAMP standard.

An example is shown below, for a small 1H spectrum.

##TITLE= Ethyl Benzene on a QE 300 ##JCAMP-DXB $$JCAMPDX Header and Binary Data ##DATA TYPE= NMR SPECTRUM ##DATA Class= NTUPLES ##ORIGIN= NUTS NATIVE (RI) ##OWNER= ##SPECTROMETER/DATA SYSTEM= NUTS NATIVE (RI) ##INSTRUMENTAL PARAMETERS= H1 ##.OBSERVE FREQUENCY= 300.152374 ##.OBSERVE NUCLEUS= H1 ##.DELAY= 0.000000 ##.AVERAGES= 1 $$ NUTS specific parameters ##$AXIS_TYPE=3, 3, 0, 0 ##$AQ_mod=1, 0, 0, 0 ##$DATE= 12/31/92 ##$USER= WWC ##$NAME1=ethylbenzene ##$NAME2= ##$NAME3= ##$FORMULA=C8H10 ##$Nucleus1= H1 ##$Nucleus2= ##$Nucleus3= ##$Nucleus4= ##$PATH= c:nutsdatatest.nmr ##$DECIM=0 ##$DOMAIN=1, 0, 0, 0 ##$DSPFVS=0 ##$POINTS=2048, 1, 1, 1 ##$FREQUENCY=300.152374, 1.000000, 1.000000, 1.000000 ##$SWEEP_WIDTH=4000.000000, 1.000000, 1.000000, 1.000000 ##$FREQ_OFFSET=1850.000000, 0.000000, 0.000000, 0.000000 ##$PULPROG= One Pulse ##$PULSE_LENGTH= 0.000000 $$ End of NUTS specific parameters ##NTUPLES=NMR SPECTRUM ##VAR_NAME= PPM, SPECTRUM/REAL, SPECTRUM/IMAG, PAGE NUMBER ##SYMBOL= X, R, I, N ##SYMBOL= INDEPENDENT, DEPENDENT, DEPENDENT, PAGE ##VAR_FORM= AFFN, ASDF, ASDF, AFFN ##VAR_DIM= 2048, 2048, 2048, 2 ##UNITS= HZ, ARBITRARY UNITS, ARBITRARY UNITS ##FIRST= 3850.0000 , -1406.669434, -465.478027 ##LAST= -150.0000 , -557.505615, -853.042786 ##MIN= 3850.000 , -3443.531006, -100636.140625 ##MAX= -150.000 , 257425.500000, 96545.257813 ##FACTOR= 1.0, 1.000000, 1.000000 ##YDATA=(Y..Y) $$ Binary Data follows Control Z $$ Binary( Total # Points) = Total # Bytes, Intel Little Endian floats $$ Complex Pairs packed RIRIRIRI... ##BINARY(2048)=16384,IEEE32L

followed by data

Main Help page

Command Index

 


Last updated: 5/24/02.