The FELIX Command Language (FCL) is a powerful combination of spectroscopic data-processing commands and a computer programming language, joined to a graphical user interface protocol. This blend of tools comes together to give FELIX its flexibility and adaptability as an NMR data-processing environment.
The FELIX User Guide gives a detailed description of how to use the standard user interface to do virtually all of your NMR processing. The vast majority of users will never require more functionality than that provided by the standard user interface
This FELIX Command Language Reference Guide is written for advanced users who want to enhance, modify, and extend the abilities of FELIX for their special requirements. This guide contains complete descriptions of all the elements that comprise FCL. FCL commands are two or three letters long, and in this documentation are presented in boldface type. Commands are case sensitive, although command arguments are not (See "Case sensitivity" on page 9.). Symbols are also boldfaced, while parameters are italicized.
This chapter gives a brief introduction to the major components of FCL. Chapter 2, FCL Basics, explains the syntax of FELIX command lines and the behavior of the FELIX command interpreter. Chapter 3, Symbols and Expressions, discusses the use of symbols and arithmetic expressions. Chapter 4, Macros, details writing macros and introduces the directives that control macro execution. Chapter 5, Real-Time Displays, illustrates the building of real-time display macros that generate animated graphics, showing the effect of changing command parameter values in real time. Chapter 7, The Database, presents a detailed explanation of the database commands and explains how to store and extract information. Appendix A, Command Reference, lists the FCL commands and gives short descriptions of how they are used. Appendix B, Symbol Reference, lists the symbols used by FCL and gives descriptions of how they interact with FCL commands. Appendix C, Macro Examples gives a few examples to get you started writing your own macros. Please note that all references cited in this guide are listed in Appendix A, References, in the FELIX User Guide.
This section introduces some of the basics of FCL and the conventions used here to describe the command syntax. Throughout the manual, the system prompt (>) is displayed on example lines. Do not enter this symbol when using the program. When a command is shown in its general form, each parameter is indicated by an_italicized_word. For example, the descriptive explicit forms of the command that defines the width of a spectrum (swidth) are shown below.
def swidth spectrum_width (as described in the manual)
def swidth 4386 (as you would enter it)
To execute an FCL command, press <Enter> after you have finished typing it.
The commands within FCL consist of two- and three-letter acronyms that symbolize the action of the command. Each command performs some function or changes the state of the program in some way. For example, the following commands:
> ft > hcp
represent two simple examples of FCL commands. ft causes FELIX to perform a Fourier transform on the data in the workspace, and hcp generates a hardcopy output of the current spectrum display. A list of the FCL commands along with a detailed description of their functions is found in Appendix A, Command Reference.
One of FELIX's most useful capabilities is that it allows you to use symbols to represent any value or parameter you want. This symbolic substitution allows flexibility within the program and within the macros, which in turn allows automatic processing within FELIX. There are two distinct types of symbols within the program, reserved symbols and user symbols.
Reserved symbols report the current status of the program or workspace. For example, when you read an FID or spectrum, the reserved symbol datfil is defined automatically as the name of that file. At a later point in time (usually within a macro), that same file may be read by using the reserved symbol datfil instead of entering the filename explicitly. In addition, reserved symbols are used to define items such as the spectrum width (swidth), the number of contour levels (nlevel), and the datatype (datype). The quantity and names of reserved symbols are constant. They are initialized by FELIX when the program begins and cannot be deleted
User symbols are any other symbols that are named and initialized by you or a macro while FELIX is running. Examples include the loop counter defined by the for command and the result of the eva command. You can initially define as many user symbols as you want, and you can delete them at any time.
Another of FELIX's powerful capabilities is that it can evaluate complex mathematical expressions. Sometimes you may want to express a number or a symbol value arithmetically in terms of other numbers or symbols. FELIX performs expression evaluation, where an expression may contain numbers, symbols, and the arithmetic operators plus (+), minus (-), multiply (*), and divide (/). Expressions may also contain trigonometric, logarithmic, and datatype functions like sin, cos, log, int, etc. Expressions must be enclosed in parentheses and may contain internal parentheses defining the order of evaluation. The expressions used in FELIX are similar to those found in the BASIC and FORTRAN programming languages.
See Appendix B, Symbol Reference, for more detailed information on individual reserved symbols. See Chapter 3, Symbols and Expressions, for more information on general symbol use and expression evaluation.
Macros are an essential feature of the FELIX data-processing approach. A macro is simply a text file containing a series of FELIX commands, which together perform a specific task. You can edit a macro file using most text editors. In addition to direct commands, a macro can contain symbol substitution, arithmetic expressions, and flow-control statements (i.e., for loops, if/then/else statements, goto's, and subroutine calls). In effect, macros combine the capabilities of a programming language with the standard capabilities of FELIX, allowing you to design customized processing procedures.
FELIX comes with a library of macros capable of many common processing tasks. You can modify these macros to fit your specific needs. For example, the apodization function in the example macros will probably be customized by each user. In addition to using macros for custom data-processing and -analysis tasks, macros are also used to implement the FELIX graphical user interface. In fact, advanced users will find it easy to create menus and control panels to design a custom environment.
The graphical user interface of FELIX contains a variety of menubars, pulldown menus, icons, and control panels that interact with the user to simplify data analysis and processing. Within FELIX, you can customize the program's interface to meet the needs of your laboratory by simply editing the menu interface macros provided or by writing your own.
The menu interface covers most aspects of NMR data processing, display, and analysis. While we have tried to include and place related processing and applications conveniently near each other within the graphical user interface, it is extremely difficult to predict the needs of specific users. For this reason, we encourage you to make any modifications to the menu interface that will speed and simplify your NMR data processing and analysis. For example, you can easily add a menu item to execute one of your own macros from within the interface. While this minor change to the menu system will not affect other aspects of the interface, it will greatly enhance the power of the program for your specific application. For users whose applications require repeated access to the certain pulldowns, the menu can be removed from the top menu bar and placed elsewhere on the screen for easy access. Modifications to the menu interface are very simple to make (10 minutes for someone experienced in writing FELIX macros) and do not require any access to source code. We fully expect that some laboratories will totally redesign the interface so that it is more directly applicable to their ongoing research. However, we have found that the standard graphical user interface provided exceeds the needs of most research groups.
An NMR data-processing program is only as good as its ability to store and retrieve the spectrum information that it produces. In this regard, FELIX again combines power and flexibility. The FELIX database provides fast and efficient sorted access to large sets of spectrum data. Many FCL commands directly generate or read whole datasets, like ND peakpicking and volume integration. Generating baseline points creates a dataset in the database, and the commands for baseline correction read that same dataset of baseline points to flatten the spectrum's baseline.
At the same time, FCL includes an extensive set of core database commands that provide explicit access to every primitive function the database was designed to perform. This means that you can have complete read and write access to any information stored in the database, whether it was generated by an FCL command or by a macro you wrote. This provides almost unlimited functionality with respect to storing, retrieving, and manipulating datasets of any type whatsoever.
One of these core database functions is the entity editor. It functions like a spreadsheet, giving you a graphical way to edit, add, and delete information in a dataset.
Please see Chapter 7, The Database, for more detailed information about the FELIX database.
When FELIX is running in command mode it is possible to access the UNIX operating system without exiting the program or opening a separate graphics window. To do this, enter the command sys from the command interface. When in system mode (characterized by the "sys>" prompt), almost all the normal operating system commands are functional. It is possible to edit and print any file just as you would if you were not running FELIX. You may not, however, change directories while in system mode. To return to FELIX from the system mode prompt, enter quit or press <Ctrl>-d.