Skip to main content

NILoadWave XOP

NILoadWave is an external operation that loads data from Nicolet Instruments files into Igor waves. At present, NILoadWave supports Nicolet WFT files only. This version of NILoadWave requires Igor Pro 6.38 or later.

NILoadWave adds the following to Igor:

A menu item, Load Nicolet File, in the Load Waves submenu.

A command line operation, NILoadWave.

NILoadWave sets the standard Igor file-loader output variables:

S_pathSet to the path leading to the folder containing the loaded file. This is a system file path (e.g., "hd:FolderA:FolderB:"), not an Igor symbolic path. The path uses Macintosh path syntax, even on Windows, and has a trailing colon.
S_fileNameSet to the name of the loaded file.
V_flagSet to the number of waves loaded.
S_waveNamesSet to a semicolon-separated list of the loaded waves.

When NILoadWave loads a file that contains multiple zones (timebases), it also creates an X wave against which the multi-zone data wave can be plotted. The V_flag variable does not take this X wave into account.

Revision Notes

1.20Ported to Windows. This version requires Igor Pro 3.13 or later on Macintosh and Windows.
1.21Added creation of the S_path file loader variable.
1.30Revamped to allow NILoadWave to be called directly from a user function.
1.31Fixed bug in Windows version that sometimes caused the Open File dialog to return error 12290 (invalid filename).
1.32Supported long file names on Macintosh.
1.50This version requires Igor Pro 6.38 or later.
Ported to 64 bits on Macintosh and Windows.
1.51Recompiled with XOP Toolkit 7.01 to support Igor Pro 8 on 64-bit Macintosh.

NILoadWave [/P=pathName /D /A[=baseName] /N[=baseName] /O /I /Q] fileNameStr

The NILoadWave operation loads data from the Nicolet WFT file into one or more waves.

Parameters

If the file to be loaded is not fully specified by fileNameStr and /P=pathName, or if the /I flag is used, NILoadWave displays an open file dialog.

Flags

/P = pathNameSpecifies the folder to look in for fileNameStr. pathName is the name of an Igor symbolic path that you create using the NewPath operation or the New Path dialog (Misc menu).
/DCreates double precision waves. If you omit /D, NILoadWave creates single precision waves.
/AAutomatically assigns wave names of the form wave0, wave1. Skips names already in use.
/A = baseNameAutomatically assigns wave names of the form baseName0, baseName1. Skips names already in use.
/NAutomatically assigns wave names of the form wave0, wave1. Overwrites existing waves.
/N = baseNameAutomatically assigns wave names of the form baseName0, baseName1. Overwrites existing waves.
/OOverwrites existing waves.
/IForces NILoadWave to display a open file dialog that allows the user to interactively choose the file to be loaded.
/QSuppresses the normal messages in the history area.

Details

If you fully specify the file, NILoadWave will load the file without displaying an open file dialog. You can fully specify the file using a symbolic path (/P flag) and a file name or using a full path for the file name.

NILoadWave will display an open file dialog if you use the /I flag or if you don't provide enough information to fully identify the file. For example, if the specified file does not exist or does not exist in the specified folder, NILoadWave will display an open file dialog.

Use /D to create double-precision waves. Otherwise, NILoadWave will create single-precision waves.

The /N flag instructs NILoadWave to automatically name new waves “wave” (or baseName if /N=baseName is used) plus a number. The number starts from zero and increments by one for each wave loaded from the file. If the resulting name conflicts with an existing wave, the existing wave is overwritten.

The /A flag is like /N except that Igor skips names already in use.

If you use neither the /A nor the /N flag, NILoadWave will attempt to use the waveform title, as stored in the Nicolet file, as a wave name. If necessary, NILoadWave will clean the title up and truncate it. If the resulting name is not suitable (e.g., it conflicts with the name of an Igor operation or function), or if the file contains no waveform title, NILoadWave will substitute a default name like wave0.

NILoadWave sets the standard Igor file-loader output variables:

S_pathSet to the path leading to the folder containing the loaded file. This is a system file path (e.g., "hd:FolderA:FolderB:"), not an Igor symbolic path. The path uses Macintosh path syntax, even on Windows, and has a trailing colon.
S_fileNameSet to the name of the loaded file.
V_flagSet to the number of waves loaded.
S_waveNamesSet to a semicolon-separated list of the loaded waves.

When NILoadWave loads a file that contains multiple zones (timebases), it also creates an X wave against which the multi-zone data wave can be plotted. The V_flag variable does not take this X wave into account. The name of the X wave is the base name plus "_X".

Examples

This example loads a wave from a test file into a wave named wave0, overwriting wave0 if it already exists, and then displays the wave:

NewPath/O Nicolet, "Howard2:Nicolet Files"
NILoadWave/O/N=wave/P=Nicolet "1000 Point Waveform.wft"
Display wave0

This example does the same thing as the preceding example. However, in this case, the Nicolet file contains 3 zones (timebases). Therefore, NILoadWave automatically creates an X wave against which the data wave can be plotted. Also, this example uses a full path to identify the file rather than a symbolic path and file name.

NILoadWave/O/N=wave/P=Nicolet "Howard2:Nicolet Files:Three Zones.wft"
Display wave0 vs wave_X