Datasets

Dataset Format

The datasets used by NMRView must have been previously transformed to the Frequency Domain and converted to a file format compatible with NMRView. NMRView can, in theory, read many different block structured file formats, though it has only been tested extensively with those created by FELIX (BIOSYM, Inc.) and our own file converters. When NMRView opens a dataset it attempts to determine the file type automatically. It does this by checking the consistency of various parameters in the file header. First it tests for the NMRView format, next for the FELIX format and finally for the VNMR (Varian Inc.) format. If it succeeds in determining the filetype it opens attempts to open a parameter file and interpret any commands therein that set parameters such as sweepwidth or spectrometer frequency. These will override any values specified in the file header. If NMRView fails to interpret the file type it then attempts to open the parameter file. If the appropriate parameters are present describing the number of dimensions, dimension sizes and block sizes NMRView will be able to read most any block structured file.

VNMR (Varian, Inc.) phasefiles can be read directly, however, the VNMR format is not optimal for use in NMRView. It is better to convert them to a block structured format that is preferred by NMRView. Select the menu item under the Dataset Menu on the Control panel to convert files to NMRView format.

If you are using FELIX to generate the matrix you can reference the dataset and set the axis mode to ppm. Also give meaningful names to the label used for each axis as these labels determine cursor tracking and peak display. Alternatively, you can leave the matrix unreferenced and enter the referencing information in a parameter file.

If your are using the program nmrPipe to process datasets you can use the program pipe2xyz (with the -nv flag) to convert them to an NMRView compatible format. As with FELIX datasets, NMRView will recognize the reference information in the nmrPipe files.


Add a Dataset

Use the "Add" command from the "Datasets" menu on the NMRView control panel to open one or more existing dataset(s). A popup window will appear that allows for interactive file selection. The scrolling display on the left lists directories, that on the right lists files. Files may be selected and opened as described below.

Filter
Click SELECT on this button to select the directories and files that are displayed according to the entry in the Filter box. In the example, this results in only files ending in the directory "/home/johnsonb/data/mtx/mats" that end in ".nv" or ".mat" being listed in the Files list.
Open
Click SELECT on this button to open the file that is currently highlighted in the Files list. After the file is opened the panel will close.
Close
Click SELECT on this button to close this panel without opening any additional files.

Files can also be opened by double-clicking the mouse on the file name. In this case the panel will remain open so that additional files may be opened.

If any manipulations are to be done to the file with NMRView routines (e.g. phasing or baseline correction) the file must be opened with the Writable checkbutton selected.


Dataset Parameter File

When NMRView opens a spectral dataset it also attempts to open an associated parameter file. It looks for a file of the same name as the dataset, but with the extension .par. For example, if the dataset is named "noesy.mat", it will look for a parameter file named "noesy.par". If the dataset is simply named "noesy", it will also look for "noesy.par". If the dataset is in the FELIX format the parameter values in the .par file will override the parameters specified internally in the .mat file. The parameter file consists of a series of lines, each one consisting of a keyword followed by one or more parameters. The keywords are as follows.
header fileHeaderSize blockHeaderSize
The header sizes must be specified if the file is not declared to be a FELIX or VNMR file. A generic description of some NMR data files is as follows:
  fileHeader
  blockHeader1
  dataBlock1
  blockHeader2
  dataBlock2
  .
  .
  .
  blockHeaderN
  dataBlockN
The size of the fileHeader (in bytes) is specified with the fileHeaderSize parameter. The size of the blockHeader (in bytes) is specified with the blockHeaderSize parameter. One or both of these values may be 0. For example, a file may have a 16384 byte fileHeader, and no blockHeaders. This would be described as

header 16384 0

Or a file may have both, for example with a 32 byte fileHeader and a 28 byte blockHeader

header 32 28

felix
Specify that the file has the format used by the program FELIX. NMRView will attempt to extract the file attributes and referencing information from the header. The current version of NMRView should automatically determine if files are in the FELIX format so this should not be necessary.
vnmr
Specify that the file has the format used by the program VNMR. NMRView will attempt to extract the file attributes and referencing information from the header. NOTE: It is really more efficient (of memory use) to convert VNMR files to a better format. The current version of NMRView should automatically determine if files are in the VNMR format so this should command not be necessary.
dim nDim size1 blockSize1 ... sizeN blockSizeN
Specify the number of dimensions in the file (1-4). The size parameters specify the number of datapoints along each dimension. The blockSize parameters specify the number of datapoints in each block for each dimension. For example, a 2D file with 1024x1024 points and 64x64 points in each block would be specified as:

dim 2 1024 1024 64 64

sw dimNum sweepWidth
Set the sweepwidth for dimension dimNum to sweepWidth. Dimensions are specified as an integer from 1 to 4.

For example,

sw 1 6000.0

sf dimNum specFreq
Set the spectrometer frequency for dimension dimNum to specFreq. Dimensions are specified as an integer from 1 to 4.

For example,

sf 1 599.4

reference dimNum refPPM refPT
Reference dimension dimNum to a chemical shift of refPPM at dataset point refPT. Dimensions are specified as an integer from 1 to 4.

For example,

reference 2 4.73 513

label dimNum label
Set the label used for dimension dimNum to label. Dimensions are specified as an integer from 1 to 4.

For example,

label 3 15N

Manage Datasets

Use the "Manage" command from the "Datasets" menu on the NMRView control panel to display a popup window that lists all datasets that are currently opened. Datasets can be closed by selecting the desired filename and clicking SELECT on the "Delete" button. This command is useful if you want to force NMRView to reopen a particular file, perhaps after changing the reference data in the file header using an external program such as FELIX.

Reference
Select this to open a panel that can be used to change the reference information for the dataset. Note that the reference panels may be opened for more than one dataset at a time. This allows the user to compare reference information among multiple datasets.
Remove
Click SELECT on this button to delete the file from the current NMRView session. The file is not deleted from disk.
Cancel
Click SELECT on this button to close the panel.