How to write your own data-analysis tools

April 1, 1996
Quite often, a researcher has to modify data-acquisition and analysis software to account for variations in an experiment. Coding a data-acquisition application using traditional programming languages can be a frustrating and time-consuming task for a nonprogrammer.

How to write your own data-analysis tools

Christopher Beliveau

Quite often, a researcher has to modify data-acquisition and analysis software to account for variations in an experiment. Coding a data-acquisition application using traditional programming languages can be a frustrating and time-consuming task for a nonprogrammer.

The Array Basic language (Galactic Industries Corp., Salem, NH) was designed to simplify creating scientific data-analysis tools by providing an optimized environment for processing various types of x-y (trace) data. "Array" indicates that it treats all trace-type data, including spectra and chromatograms, as arrays of data. In Array Basic an operation can be performed quickly on a data set over the entire array or subsections of the array. Single-statement operations are used to perform advanced matrix operations.

"Basic" describes the program`s similarity to the BASIC programming language. This gives Array Basic a very familiar interface because many professionals have programmed in BASIC at one time or another.

A number of trace and array processing algorithms can be written with Array Basic array-manipulation functions. When Array Basic operates on an entire array, it is much faster than loops operating on one data point at a time or equivalent point-by-point algorithms written in compiled programming languages.

Complex functions

Array Basic has been optimized and expanded over the standard implementations of BASIC to include commands specifically designed to process analytical-instrumentation data. Most of the standard data-array operations to be performed are included as primitives (standard functions) of the Array Basic command set. For example, there is no need to write a real fast-Fourier-transform routine in Array Basic. A single command "RFFT" does just that.

The language`s primitives are faster than compiled programs written to do the same operations. This is because they are written in highly optimized 32-bit assembly language. Because complex multipoint operations are performed using single operations, the speed of a compiled program is realized with the ease of an interpreted language. And complementing the array-processing speed, the language allows virtually total control over the system, including access to hardware input/output ports, interrupts, and serial ports. This simplicity in programming Windows applications eases the programming task, especially for custom applications for experiments (see figure).

To augment the built-in command set, Array Basic also allows calling any other dynamic link library (DLL) that gives access to any Windows function, as well as many of the DLLs from other developers. Thus, a function not already found in Array Basic can be called as an external procedure with a single command. Scientists also have the ability to create complex graphical displays. Other options include multiple independently controlled trace boxes, fast trace animation, and full mouse control. There are numerous view-oriented commands for GRAMS/386 (Galactic Industries), a Windows package originally developed for acquiring, processing, and managing spectral and chromatographic data but also able to handle data from other types of analytical instruments.

Table-driven extensions

In addition to Array Basic, there are several lower-level programming language extensions found in Array Basic Control (ABC), a package available for GRAMS/386, Levels 2 and 3. The extensions function similarly to low-level assembly language programming while being accessible to even the most casual user. These extensions are extensively table-driven and provide capabilities not found in the standard Array Basic command set. These functions are targeted at hardware-control applications including instrument control, interrupt handlers, simple multitasking, and quick port input/output. Other capabilities are bit-wise operations, serial communications-port support, advanced ASCII parsing and file input/output, software interrupt calling, and DOS and non-DOS memory blocks for dynamic memory addressing. n

Click here to enlarge image

Spectral-subtraction-program screen demonstrates Array Basic creation of graphical user interfaces. Users can easily design multiple independent trace boxes with overlaid spectra, tabbed dialogs, and modeless dialog technology.

CHRISTOPHER BELIVEAU is a technical support engineer with Galactic Industries Corp., 395 Main St., Salem, NH 03079-2464; email: [email protected].

Sponsored Recommendations

Optical Filter Orientation Guide

Sept. 5, 2024
Ensure optimal performance of your optical filters with our Orientation Guide. Learn the correct placement and handling techniques to maximize light transmission and filter efficiency...

Advanced Spectral Accuracy: Excitation Filters

Sept. 5, 2024
Enhance your fluorescence experiments with our Excitation Filters. These filters offer superior transmission and spectral accuracy, making them ideal for exciting specific fluorophores...

Raman Filter Sets for Accurate Spectral Data

Sept. 5, 2024
Enhance your Raman spectroscopy with our specialized Raman Filter Sets. Designed for high precision, these filters enable clear separation of Raman signals from laser excitation...

Precision-Engineered Longpass Filters

Sept. 5, 2024
Discover our precision-engineered Longpass Filters, designed for high transmission and optimal wavelength separation. Perfect for fluorescence imaging, microscopy, and more.

Voice your opinion!

To join the conversation, and become an exclusive member of Laser Focus World, create an account today!