925-456-1020 info@acornnmr.com




File Handling Overview

This section describes how NUTS keeps track of file names, opening and saving data files and the file "tailer".

A data file (either an FID or a spectrum) can be read into NUTS using the File/Open menu command or, equivalently, the GA command. The GA command can be used for both 1D and 2D data sets. The current working directory is established each time a file open or file save command is completed. A file can be saved using the same name (writing over the original data) or a new name. These are the Save and Save As operations, respectively, found under the File menu. The equivalent 2-letter commands are SA and SB, respectively. Either command brings up a dialog box allowing a file name to be entered. The difference between the two commands has to do with the file name which NUTS assigns to the currently displayed data. The currently displayed file is always designated as file A and its file name is displayed at the top of the screen and is printed on plots. Saving the data with a new name using SA will cause the name at the top of the screen to change. The same operation using SB leaves the name at the top of the screen unchanged. This allows NUTS to keep track of two different file names, and becomes important in operations which involve processing of a series of files, by allowing the processed data to be saved using a new name rather than being written over the original file.

The Import (IM) command (also available from the File menu) operates on data which has not been translated into the NUTS file format. NUTS will attempt to identify the data’s source and apply the appropriate translation. The translated file is created with the same name, but with a $ appended to the beginning, so that the original data is never altered. This new file becomes the current file in NUTS. The translated file is always written to disk, to the current data directory.  See also the section on importing data.

The default directories for file importing and for the file Open/Save operations (eg, GA and SA) can be different and can also be set in the NUTS.INI file. (Note that this does not work correctly on the Mac.) If a file is imported from a different directory, this new directory becomes the import directory, and will be the directory displayed for subsequent IM commands. Similarly, if a file is read from or saved to a different directory from the default data directory, this operation changes the data directory for subsequent Open and Save operations. The WP command (Which Path) displays the current directories for Read/Write and for Import, so the user can keep track of them.

The S2 command is available for making copies of a 2D file and for saving a 2D file after modifying an individual slice.

The user needs to be aware that the command GA (open file A) when applied to a 2D file behaves slightly differently in macros or Links from when it is entered directly. The difference lies in whether NUTS reads just a slice of the 2D data or reads both the slice and the data header. While in a Link (either by itself or within a macro), NUTS reads the data header only once, for the first slice. This makes reading subsequent slices faster. When GA is used to read a 2D file in a Link, NUTS assumes that the user loaded the first slice manually (with GA) immediately before executing the Link. This reads in the file header and all is well. If the same Link is embedded in a macro, NUTS can be forced to read the file header by inserting the following line just before the line containing the Link:

Set SL 1

The take-home message is that in macros always set SL to one before a Link in which GA will operate on a 2D file. When executing a Link not in a macro, always do a GA on the starting file just before executing the Link.

In Macros:

When using the Set command to specify a file name, the default path name is the current working directory. The current working directory is established each time a GA or GB command is completed. Therefore, always execute a GA after an Ask FileA command:

Ask FileA

This establishes the working directory, and subsequent Set FileX commands will use that directory.

If the user wants to specify a different path for a file in a Set command, use

Set FullFileA name

Note that if a new path is specified for file A or B, the working directory will be changed when a GA or GB command is next executed.

See also: Linked Command Lists 2D Processing, Importing data, Exporting data

GA — Get data set A

Opens the dialog box for reading a file. The last name used for File A, if any, will be the default selected name.

If the file name entered corresponds to a file which is not in the NUTS CDFF format, a dialog box asks if the file should be imported. If the user answers Yes, NUTS will attempt to detect the file type and apply the appropriate translation. This is the same operation performed by the Import ( IM ) command.

GA can be used in a Link for processing a 2D data set or a series of 1D spectra. In this case, the Link will end with an IN command, which causes the processing to loop back to the beginning of the Link and will increment either the slice number (for a 2D file) or the file extension (for 1D files) so that the next slice or spectrum is read in.

See also: Long command names, Importing data, Linked command lists, 2D Processing.

GB — Get data set B

Opens the dialog box for loading a file. The last name used for File B, if any, will be the default selected name.

SA — Save dataset A

Saves the current data set under the File A name or a different name. This command is also available from the File menu.

SB — Save dataset B

Saves the current data set, allowing the entry of a different file name. The name of the currently displayed file, designated as File A, is unchanged. This command is available from the File menu.

EF — Email File

On Windows versions only, a file can be emailed, provided an email client has been set up.  The current NUTS data file is attached to an email message, and the user specifies the email address and can optionally add a message.   The file is sent from the disk, so it is necessary to save the current file before executing the EF command.  This command is available from the File menu. 

See also:  Paperless data distribution

File Tailer

The peak list, integral list and some additional data are saved in the data file.  (Originally, this was saved in a
file "tailer", appended to the end of the data file.  With conversion to NUTS file format Type 3, this information is now stored in the file Header, but this command retains its original name.)

A flag found in the File menu determines whether or not information is automatically read from the tailer when a file is opened.  This option can also be set in the nuts.ini file.

The NUTS commands which pertain to this are:

TA — Read all information from file tailer.
TS — Save tailer information to a separate ASCII file. An example is shown below.
IF — Enter other information to be saved in tailer.
T+ — Replace the existing file tailer with the contents of a specified text file.

If integral regions have been defined at the time a file is saved, they are saved in the file tailer. Similarly, if peaks have been selected in the DP subroutine, that peak list is saved. The comment line (CO) and the path to the file are also saved in the tailer. The additional information which can be saved, using the IF command, includes 3 lines of text, a molecular formula and nucleus type(s).  

Four nuclei can be defined, for up to 4 dimensional data.  These can be entered via the IF command, or with the NU command (or the equivalent, non-2-letter command NUCLEUS).   Typing NU returns the current solvent for the direct (first) dimension.  In the non-2-letter command mode, the nucleus type can be set using 2 arguments.  The first argument is a number (from 1 to 4) corresponding to the dimension, and the second argument is the name of the solvent.  For example,

nu 1 13C<ENTER>

sets the first dimension nucleus to 13C.

Any inset plots or text notes which have been defined are also saved with the file.

One note of caution: Because integral and peak lists, inset plots and notes are not cleared when a new data set is opened, it is possible to save irrelevant information in the file tailer of that new file when it is subsequently saved. Also, some peaks or integrals previously defined may fall outside the spectral limits of the second file. In this case, the invalid peaks are reset to the closest valid data point, and invalid integral regions are not displayed.

File Header Type 3 provides for an expandable file header for parameters with a flexible format.  For Type 3 files, the "tailer" information is no longer saved in the tailer, but is instead included in the header. 

TA – Read Tailer

Reads all information from the file tailer. From within the Integration subroutine, integral regions only can be recalled from the tailer from the Edit menu, or using the keyboard command R.

TS – Tailer Save

Creates a text file containing the information which is saved in the file tailer when a Nuts file is saved. A sample of a file Tailer, as saved using TS, is:

INFORMATION Name1=data from Sam Name2=stuff Name3=CDCl3 Comment=Sample # K-47-B  Formula=C6H10N Nucleus=H1 Path=D:NUTSDATAsam$DATA END_INFORMATION PEAKLIST LINE HZ PPM INTENSITY REL INT XOFFSET YOFFSET HorV LABEL 1 2307.23 7.687 120753536 10.149 0.000 0.000 V 4 2 2097.74 6.988 111956936 9.410 0.000 0.000 V 5 END_PEAKLIST INTEGRALS REL_VALUE = 1.589616e-009 START_PT START_HZ END_PT END_HZ VALUE LABEL POSITION 6394 8.432 6514 8.281 0.986642 1 6681 8.072 6814 7.905 1.000000 1 6912 7.782 7053 7.605 2.183908 1 7499 7.045 7638 6.870 2.465544 1 7243 7.366 7433 7.127 6.768002 1 END_INTEGRALS END_TAILER

T+ — Tailer add

A text file can be used to replace the tailer information of the currently displayed data set. The file needs to be in the format of the example above. This feature can be used to edit information already in a file tailer, by first saving the tailer (TS), then editing it with any text editor, saving the changes and then using T+ to read back in the modified tailer. As soon as T+ is executed, the modified tailer is saved on disk, using the file name of the currently displayed data set.

IF — File Information

This command brings up a dialog box which allows entry of supplementary information which will be saved in the file "tailer" when the spectrum is saved. This information can be retrieved later with the TA command or from the File menu when the file is opened within Nuts. This information is also used when creating a searchable archive file.

User, date, comment and the path to the file are entered automatically from existing information for the current data set.

See also: Creating a searchable archive

DE — Delete file

Brings up a dialog box allowing the user to select a file to be deleted. It does not ask for confirmation before deleting the file.

RL – Read License File

This command reads a special encrypted text file and generates a new LICENSE.NMR file. This is an attempt to aid users who want to get a new LICENSE.NMR file by email, but who cannot handle attached binary files. Before RL is executed, any current LICENSE.NMR in the same directory as the NUTS.INI file must be erased or (better) renamed. RL will read a specially prepared file which MUST be named LICENSE.TXT and MUST be in the same directory as the NUTS.INI file. When NUTS is started and the RL command entered, a new LICENSE.NMR file will be created which will have the information from the encrypted LICENSE.TXT file. This operation needs to be performed only once.


Main Help page

Command Index


Last updated: 4/6/05.