This is the multi-page printable view of this section. Click here to print.
Reference
- 1: OVJ Commands
- 2: Pulse Programming
- 2.1: Pulse Elements
- 2.2: Phase Cycling
- 2.3: Pulse Sequence Parameters
- 2.4: ACODE
- 2.5: Hardware Control
- 3: OVJ Manuals
1 - OVJ Commands
General Command Structure
- OVJ commands are entered at the command line. Some commands require arguments or parameters, which can enclosed in parentheses.
- To change a parameter value, the parameter is entered followed by an equal sign (=), followed by the value of the parameter (real, integer, or string).
- String values are always enclosed in parentheses and surrounded by single quotes.
- Multiple command and parameter settings can be entered consecutively, separated by spaces.
Command Examples:
|
|
Example of Setting a Parameter Value:
|
|
Commonly Used OVJ Parameters
The following sections provide a list of commonly OVJ commands and parameters. For a complete list of commands see the VnmrJ Command and Parameter Reference.
Commands
Spectrometer Control and Data Acquisition Parameters
Command | Description/Example |
---|---|
aa | abort current running experiment immediately. Recommended to use in most occasions over sa except when some experiments are queued |
cexp(n) | create new experiment from current one Example: cexp(2) copy current parameters and create experiment number 2 (#2 must not exist) |
dg | display group of acquisition/processing parameters in Process→Text Output window |
dps | display pulse sequence |
ga | start experiment and autoprocess the data when data are available |
go | start experiment using acquisition parameters |
jexp(n) | join (or go to) specified experiment Example: jexp(2) join exp#2. exp#2 must exist |
movesw | move new spectral window (sw) to the area enclosed by the two red cursors |
movetof | move transmitter offset freqeuency (tof) to the cursor position |
su | setup experiment. Force hardware to changes according to current parameter settings Example: load=‘MySpectrum’ su - change shims to current values in parameter file Example: tn=‘C13’ su - change direct detection to C13 |
time | displays total experiment time with current parameters |
time(hours,minutes) | displays number of scans (nt) required for a given time of experiment Example: time(1,10) - displays number of scans needed for a one hour 10 mins experiment |
unlock(exp_number) | remove interactive lock and join an experiment. Useful to remove lockup of an experiment, sometimes due to user failure to exit vnmrJ before logging out Linux |
Data Processing and Display Commands
Command | Description/Example |
---|---|
aph | automatic phasing of both zero (constant) and first-order (linear with frequency) terms |
aph0 | automatic phasing with zero-order term only to achieve absorptive mode spectrum. Zero-order phase value (rp) is the same across the spectrum |
array | Enter this command to set an arrayed experiment where a parameter is varied and an experiment is collected with each parameter. Enter parameter name, initial value, number of steps, and stepsize. All other parameters are kept constant |
bc | 1D or 2D baseline correction with a spline or 2nd to 20th order polynomial function. Needs to define baseline regions (regions in between the integral areas covering peaks) |
centersw | With full spectrum displayed and in single cursor mode, centers moves the cursor to the center (transmitter) of the spectrum |
cz | clear integral reset points |
da | display acquisition parameter array in Plot→Text Output window |
dc | Apply a simple drift correction (with a straight line function) so that the spectrum baseline is close to zero. Level (lvl) and tilt (tlt) parameters are adjusted |
df | display a single FID (default index is 1) Example: df displays the 1st FID or df(10) displays #10 FID in the array |
dli | display list of integrals |
dll | displays line frequency and intensities (peaks have to picked) |
dpir | display integral values below spectrum |
dpf | adjust threshold and display peaks so that a maximum 20 highest peaks are found and the minimum height cutoff is 5 times above noise level |
dres | calculates peak resolution/linewidth |
ds | display processed spectrum without preprocessing |
dssa | display arrayed spectra in a stack plot Example: wft dssa |
dssh | display arrayed spectra horizontally Example: wft dssh |
dssl | Label displayed arrayed spectra with index number Example: wft dssh dssl |
dsn | measure and display signal-to-noise ratio in region enclosed by two cursor lines |
f | display the full spectrum |
fbc | apply baseline correction for each spectrum in an spectrum array |
full | display spectrum with full window size. The range of the spectrum is not changed Example: f full - display the full spectrum with full window size |
fp | find peaks in arrayed dataset according to the refrence peaks found by dll |
isadj | automatic adjustment of integral vertical display height to fit page |
mf | move FID file from one experiment to another Example: mf(1,2) move fid from exp #1 to #2 |
mp | Move all parameters from one experiment to another Example: mp(1,2) |
nl | move cursor line to nearest peak/line position |
th | set a threshold for peaks in dll command |
thadj(maxpks,noise_mult) | Adjust the threshold th so that no more than maxpks number of peaks are found with a minimum of noise_mult factor above noise level. Example: thadj(20,5) |
peak | Find tallest peak in current display region Example: peak - display tallest peak position and height in current displayed spectrum region Example: peak:$height,$freq - find tallest peak in current displayed region and save height and frequency in the variables $height and $freq. $heigt? or $freq? shows the values |
vsadj | automatic vertical scale adjustment so that the highest peak fits the window height |
setref | set reference ppm of any nucleus by the chemical shift of the deuterium signal from the solvent, according to IUPAC standard indirect referencing to TMS 1H signal |
wft | Weighted Fourier transform (FT). Weighting is applying a window function to the profile of the FID to enhance resolution or signal-to-noise and to reduce truncation artifacts from finite data collection |
Plotting Commands
Command | Description/Example |
---|---|
page | submit plot to printer and change plotter page. Usually last command in printing command chain |
pap | plot “all” parameters in table format |
pir | plot integrals below spectrum |
pl | plot spectrum |
pll | plot frequency line list in a table format |
pltext | plot user comment/notes. Not necessary if ppa command is used |
ppa | plot basic parameters in plain english format |
pps | plot pulse sequence |
ppf | plot peak frequencies over the spectrum |
Parameters
Acquisition parameters
Parameter | Description/Example |
---|---|
at | acquisition time in seconds |
bs | block size of data (number of transients) periodically read and stored on disk Example: bs=4 stores data every 4 scans |
ct | current transient (or scan) number. ct is displayed at the bottom of vnmrJ screen during a running experiment. If the experiment is stopped before all transients are done, ct (stored in the parameter file procpar) is the number of scans completed |
d1 | 1st delay period in pulse sequence. Typically this is the recycle time (in seconds) between scans |
dn | 1st decoupler nucleus |
gain | receiver gain. If gain=‘n’, auto-gain adjustment is set before data acquisition. Autogain cannot be used for arrayed experiment. Gain values go from 0 to 60. Too high a gain setting causes receiver overflow, leading to severe artifacts in the spectrum Example: gain=36 sets gain to 36 |
nt | number of transients or scans |
pad | preacquisition delay (in seconds). pad is the additional delay time set before the 1st recycle delay (d1) before the start of an experiment. If pad=60, the experiment will start after 60 secs |
rattn | receiver attenuation, the attenuation can be set from 0 to 95, a too high value will attenuate all signals. A too small value will increase noise without increasing the signal strength. |
ss | number of steady-state transients or dummy scans before start of experiment. It’s used to establish a steady-state for the spins before data collection |
sw | spectral width of direct detection dimension, in Hz be default Example: sw=6000 or sw=15p to specify 15ppm width |
sw1 | spectral width of 1st indirect detection dimension, in Hz be default |
solvent | name of solvent Example: solvent=‘cdcl3’ or solvent=‘c6d6’ |
tn | observe transmitter nucleus |
tof | observe transmitter offset (center of spectrum) |
Processing and display parameters
Parameter | Description/Example |
---|---|
axis | axis label in display and plots. Values include ‘h’ for Hz, ‘p’ for ppm Example: axis=‘p’ or axis=‘ppm’ set axis to ppm display |
cr | cursor position in direct detected dimension Example: cr=8.0p set cursor position to 8ppm |
date | date of experiment |
delta | In two-cursor (box cursor) mode, delta stores the width in Hz between the two cursors Example: delta=1000 sets the separation between two cursors to 1000 Hz, or delta? to see the cursor separation value |
ho | horizontal offset (in mm) between a set of spectra in stacked display mode for arrayed spectra |
intmod | integral display mode. Value is ‘off’, ‘full’, or ‘partial’ Example: intmod=‘off’ |
lb | line broadening amount for exponential weighting function (Hz) Example: lb=0.2 |
lp | 1st order (or linear) phase in directly detected dimension, adjusted during phasing process Example: lp=0 sets linear phase correction to zero, useful to reset linear phase to zero to correct accidental introduction of large lp value during manual phasing |
rp | zero order phase correction in degree, adjusted during phasing process Examples: rp=45 set zero-order phase to 45 degree or rp=rp+45 to change phase by 45 degree |
vo | vertical offset (in mm) between a set of spectra in stacked display mode for arrayed spectra |
vp | vertical position of spectrum, in mm Example: vp=60 sets spectrum baseline roughly in the middle of the display along Y-axis Example: vp=vp+20 moves the spectrum up by 20 mm |
vs | vertical scale of spectrum Example: vs=vs*2 - set vertical scale to double peak height Example: vs=vs*0.5 - set vertical scale to halve peak height |
2 - Pulse Programming
General Concept
Pulse sequences are written in C, a high-level programming language that allows considerable sophistication in the way pulse sequences are created and executed.
A new pulse sequence is written as a C function called pulsesequence. The file containing this function is compiled and linked with an object library that contains the definitions for all pulse-sequence statements, the PSG. A compiled C sequence is executed on the Linux workstation at the start of acquisition, so-called run-time. At run-time, the sequence reads values from a parameter table and constructs a second real-time program of acodes, whose purpose will be to run the SpinCore controller board.
The PSG library contains C code to run the pulsesequence function and to run spectra corresponding to arrays of parameter values. The user need not program these loops explicitly. At the start of the acquisition, all of the variables and statements of the compiled C program, including the C loops and conditionals, are resolved and fixed into acodes, without the possibility of further input or calculation. A complex program with many choices, using the C if-else-endifstatement, may resolve into a very few acodes, because the acodes in the non-selected branches are never created. A pulse program with multidimensional looping and/or parameter arrays will produce a separate set of acodes for every increment.
The real-time acode program is automatically looped over the number of scans for each multidimensional increment or array element. Special real-time integer tables, t1 to t10, are used to increment phases and other values that might change scan-to-scan. These tables and variables are initialized and manipulated by special pulse-sequence statements, the real-time math statements.
Writing pulse sequences
Pulse sequence text files are stored in a directory named psglib in either the system directory (/vnmr/psglib) or in a user directory (/home/vnmr1/vnmrsys/psglib for the user vnmr1). A pulse sequence file has the extension .c to indicate that it contains C language source code. Pulse sequences may also be saved in the psglib directory of an applications directory, which may have any name and path. An applications directory is made accessible through the Edit Applications tool of the Files pull down menu. A pulse sequence text file can be modified using the Linux tool vi, the standard Linux editor gedit, or by an available text editor or development package.
The template for all pulse sequences is:
|
|
Since it is a C function, any C construction may be used. The available pulse elements are described below. For examples, see the pulse sequences in /vnmr/psglib
Compiling pulse sequences
After writing a pulse sequence, the source code is compiled by one of the following methods:
- By entering
seqgen(filename<.c>)
on the OpenVnmrJ command line. - By entering
seqgen
on the OpenVnmrJ command line, with seqfil=‘filename’ - By entering
seqgen filename<.c>
from a Linux shell
For example, enter seqgen('s2pul')
to compile the s2pul.c sequence in OpenVnmrJ. A full path is not necessary from the command line. Alternatively, you can enter
|
|
in a Linux shell. The seqgen
command will first search the user, then the available applications directories, and then the system for a file with a .c extension.
During compilation, the system performs the following steps:
- Extensions are added to the pulse sequence to allow a graphical display of the sequence, using the dps command.
- The source code is checked for syntax, variable consistency, and the correct usage of functions.
- The source code is converted into compiled object code.
- If the conversion is successful, the object code is combined with the necessary system PSG object libraries (libparam.so and libpsglib.so), to be linked at run-time. If the compilation of the pulse sequence with the dps extensions fails, the pulse sequence is recompiled without the dps extensions.
The executable code is stored in the user seqlib directory (e.g. /home/vnmr1/vnmrsys/seqlib). If the user does not have a seqlib directory, it is automatically created. A copy of the source code is also saved in vnmrsys/seqlib of the user directory. If desired, you can copy the compiled sequence to /vnmr/seqlib or to the seqlib directory in an applications directory.
Standard compiled sequences are supplied in /vnmr/seqlib and the source code for each of these sequences is found in /vnmr/psglib. To recompile one of these sequences or to modify it, first copy the sequence into the user psglib, make the required modifications, and then recompile the sequence using seqgen. Sequences can only be compiled from a user directory. If you attempt to compile a system sequence, a local copy will be created. The seqgenupdate command performs a seqgen as the first step, and will then attempt to move the resulting seqlib entries back to the application directory from which they were taken.
The source files that are used to create the PSG object library are contained in the system directory /vnmr/psg. In principle, a user can customize and recompile the PSG source files, but most users do not do so. It is easier to add the user source code in a separate file using the standard C #include statement. User #include files should be stored in the ~/vnmrsys/psg directory of a user or an applications directory.
2.1 - Pulse Elements
Pulse sequences are constructed from pulse elements, which specify controls for the NMR hardware. The “C-style” signature for these elements is defined below.
Delay
|
|
Examples:
|
|
Pulse
|
|
|
|
Rgpulse
|
|
|
|
Offset
|
|
Acquire
|
|
|
|
Power
|
|
Settable
|
|
Status
|
|
|
|
Getstr
|
|
|
|
Getval
|
|
|
|
2.2 - Phase Cycling
There are several phase variables that control the phase of RF pulses and the phase of the receiver. These are:
- zero, one, two, three
- t1, t2, t3, t4, t5, t6, t7, t8, t9, and t10
- oph
The constants PH0, PH90, PH160, PH270 are used to select the 0, 90, 180,and 270 degree phase. The constants ZERO, ONE, TWO, and THREE similarly represent the 0, 90, 180, and 270 degree phase. These are present for compatibility with Varian/Agilent pulse sequences.
There are also phase tables t1-t10 and oph. These tables may contain any number of phase elements. The particular element used is determined by the current transient (CT) being acquired. The tranisients increment from 0 to (nt-1) where nt is the total number of transients.
The zero, one, two, and three phase variables are initialized to ZERO, ONE, TWO, and THREE, respectively. The oph phase table controls the phase of the receiver. It is initialized to the four values {ZERO,ONE,TWO,THREE}, which represents the “cyclops” phase cycle. The t1-t10 tables are only used if they are defined by the pulse sequence.
The cp parameter (cycle phase) is typically set to ‘y’. If it is set to ’n’, the cycling of the receiver phase (oph) is turned off. That is, only the first element of the oph table is used. This is usually only used during FID shimming and wobble.
The second argument to the pulse element is the phase. For example:
|
|
That second argument can to zero, one, two, or three. Equivalently, it can be PH0, PH90, PH180, or PH270. It can also be oph, in which case the phase of the pulse tracks the receiver phase. Phase tables t1-t10 can also be used. For example:
|
|
|
|
By setting oph to a table, one can alter the receiver phase.
|
|
2.3 - Pulse Sequence Parameters
The following parameters are used by all pulse sequences. The global parameters do not exist and the defaults are the normal values.
Parameter Name | Description |
---|---|
B12_BoardNum | global parameter specifying the SpinCore board number. default is 0 |
B12_BypassFIR | global parameter specifying whether to bypass the SpinCore FIR filter. default is 1 |
B12_ADC | global parameter specifying the SpinCore ADC frequency in MHz. default is 75.0 |
mps | set the state of the MPS when the experiment starts. At the end of the experiment, the state of the MPS will be returned to its original state. The mps parameter can be set to one of four values. manual - leave the MPS in the state it has been manually set to. off - turn the MPS off (rfstatus=0) on - turn the MPS on (wgstatus=1 rfstatus=1) ext - turn the MPS to ext state (wgstatus=1 rfstatus=2) If mps=‘manual’ and the MPS is set in the “EXT” state or if mps=‘ext’, then pulse sequences will be able to control the MPS with the status() pulse element. Also, the mpspower parameter will be active. The default value for mps is ’ext’. |
Experiment parameters used by all pulse sequences include:
Parameter Name | Description |
---|---|
exppath | the path name of the experiment where data will be stored. This is normally set when one does a “jexp” or join experiment. |
arraydim | The total number of FIDs to be acquired for this experiment. This parameter is automatically set when one arrays a parameter. |
sfrq | base frequency of the RF channel. This is normally a calculated value based on the selected nucleus (tn), the lockfreq, and any additional offset (tof). |
np | the number of points in an acquired FID (total points, sum of reals and imaginaries). Number of complex pairs is np/2. |
mpspower | the power of the MPS. Range is 0-60. If mpspower=-1, the MPS will be set to the “OFF” state. The mpspower parameter is only active if mps=‘ext’ or if mps=‘manual’ and the MPS unit has been manually set to the “EXT” state. |
nt | number of transients. |
sw | spectral width, in Hz. |
tpwrf | amplitude of an RF pulse. Values range from 100.0 (full power) to 0.0 (no power). If tpwrf does not exist, or if it is set to “Not used” (tpwrf=‘n’), full power hard pulses are used. If tpwrf is set to a number between 0 and 100, the “shaped pulse” feature of the SpinCore board is used. The shape is a rectangular shape and tpwrf controls the amplitude of this shape. This allows for less than full power pulses. |
rattn | controls the additional “Receiver attenuator” hardware. If rattn does not exist or is set to “Not used” (rattn=‘n’), then no instructions are sent to the additional attenuator. If rattn is a value between 0 and 120, then that value is sent to the attenuator. Setting rattn=0 means no attenuation of the incoming signal. Setting rattn=120 means adding 120 dBm of attenuation to the incoming signal. |
rof1 | time prior to an RF pulse to allow for the amplifier turnon time. |
rof2 | time following an RF pulse. Often reflects probe ringdown time. |
alfa | delay prior to acquiring data. Often used to account for filter group delay. |
cp | cycle phase, controls the behavior of the oph phase table. For cp=‘y’, the oph phase table uses all elements of the table. If cp=‘n’, only the first element of the table is used. |
array | used to determine what parameters, if any, are arrayed. |
ni | number of increments in the first indirect dimension. This identifies a 2D experiment. |
ix | current increment. It’s values will range from 1 to arraydim. It can be used to select alternate sequences for an arrayed experiment. For example, to acquire data where every other FID has the microwave source turned on, one could do something like the following: |
|
|
Other parameter associated with a pulse sequence are used within the pulse sequence itself. For example, the s2pul.c pulse sequence uses
Parameter Name | Description |
---|---|
d1 | relaxation delay prior to the first pulse. |
p1 | pulse width of the first pulse. |
d2 | delay between the first and second pulse. |
pw | pulse width of the second pulse. |
If custom parameters are defined for a pulse sequence, their values may be obtained with the getval() and getstr() pulse elements.
Processing parameters:
Parameter Name | Description |
---|---|
wexp | specify action to take at the completion of the data acquisition. |
werr | specify action to take if an error occurs during data acquisition. |
2.4 - ACODE
ACODE generation
When the OpenVnmrJ “go” command is executed, the parameter seqfil is used toselect the pulse sequence to execute. For example, if seqfil=‘s2pul’, then a binary file named s2pul is looked for in ~/vnmrsys/seqlib and /vnnmr/seqlib. If it is found, it is started and the parameters from the “joined” experiment, along with the global parameters are sent to the s2pul binary. The s2pul program then generates a set of acodes, based on the parameters and the details of the pulsesequence function. The acodes are keyword - value pairs. For example, running s2pul with just a single transient (nt=1) may generate a set of acodes such as
|
|
The values following each keyword are determined from the parameters that were sent to the pulse sequence program (s2pul). The acodes are reproduced below with the operative parameters noted.
|
|
Phase cycling is handled by incrementing the index used when accessing the phase tables. Note that the actual phase tables are not included in the acodes. Only the values of the indexed phase tables are in theacodes. To avoid multiple copies of the acodes where the only differences are the phase values, the PSG first scans the pulse sequence to determine the longest phase cycle used, and then uses the SpinCore looping mechanism to loop over the pulse elements the proper number of times.
To illustrate, the following are the acodes for s2pul with nt=10. The longest phase cycle used by s2pul is 4 for the receiver (oph) phase cycle. The acodes loop twice over four transients and then the remaining two transients follow. Acodes with no comments are the same as for the seqfil=‘s2pul’ and nt=1 case.
|
|
Acquiring arrayed data sets involves multiple acode sets. This is illustrated in the following acode set for seqfil=‘s2pul’ and nt=1,4
|
|
ACODE interpretation
When the go command is executed, it generates the acode file as described above and a second file used by “the procs” to handle experiment queueing and monitoring. When the controlling Expproc determines that it is time to start an experiment, it checks its queue and starts B12proc, passing the name of the acode file to use.
The B12proc program reads the acode file line by line. Each keyword causes some action. Some keywords, such as BOARD_NUMBER, BLANK_BIT, BYPASS_FIR, ADC_FREQUENCY, FILE, NUMBER_POINTS, NUMBER_OF_SCANS, SPECTRAL_WIDTH, and POWER just set parameters. Other keywords cause SpinCore elements to be executed.
The PULSEPROG_START acode causes the SpinCore initialization functions to be called. It also initializes the internal current transient (ct) counter. The PULSE_ELEMENTS acode calls the pb_start_programming(PULSE_PROGRAM) SpinCore function.
The PULSEPROG_DONE acode calls the pb_stop_programming() function and also uses the pb_get_data() function to collect the data from the SpinCore board and save it to a file defined by the FILE keyword.
Other keywords, such as DELAY, PULSE, and ACQUIRE cause appropriate pb_inst_radio_shape() functions to be called .
2.5 - Hardware Control
Triggers of the SpinCore Board
The SpinCore board has four TTL lines, named Flag0 to Flag3. They have been assigned the following functions.
Name | Usage |
---|---|
Flag0 | Trigger line to the MPS if the “mps” parameter is set to “ext” It is triggered by the status pulse element when the xm parameter for that status period is ‘y’. |
Flag1 | This controls the receiver unblanking. It goes high after the alfa delay when the SpinCore board is triggered to start data acquisition. |
Flag2 | This controls the amplifier unblanking. It goes high at the beginning of the rof1 delay prior to turning on the RF. It goes low after the RF is turned off. |
Flag3 | The controls setting the system into tune mode for RF turning. It goes high at the beginning of the “mtune” process and goes low when “mtune” completes. There is a delay of d1 duration prior to the start of the RF tuning process where Flag3 is also high. This gives the system time to switch into tune mode. |
Receiver Attenuator
The “receiver attenuator” is a USB device controlled by the /vnmr/bin/mcl_RUDAT
command. The range of values is 0 to 120 (in dB) in 0.25 steps. One can set the attenuator directly from a terminal with the command /vnmr/bin/mcl_RUDAT <value>
.
The attenuator is controlled from a pulse sequence with the rattn parameter.
3 - OVJ Manuals
Below is a collection of Open VnmrJ manuals relevant to the Bridge12 SCN spectrometer. Many more manuals are available for Open VnmrJ. You can access those through the help menu in Open VnmrJ.
Manual | Description | Link |
---|---|---|
VnmrJ 4.2 Familarization Guide G7446-90569) |
This guide provides an overview of the Open VnmrJ software and how you use it to acquire and process NMR spectra. Descriptions of the Open VnmrJ program user interface, toolbars, and menu items are included, along with general overview and description of the Open VnmrJ workflow. | Open PDF |
VnmrJ 4.2 Administration Guide G7446-90572) |
This Guide contains information on how to administer the Open VnmrJ 4.2 software, including Account administration, Printer configuration, Spectrometer calibration, and VnmrJ terminology. | Open PDF |
User Programming Reference Guide G7446-90520) |
This guide provides information about how to write pulse sequences in MAGICAL II. | Open PDF |
VnmrJ 4.2 Spectroscopy User Guide G7446-90572) |
This guide provides information on how to run experiments in Open VnmrJ. | Open PDF |
Command and Parameter Reference Guide G7446-90519b) |
VnmrJ command and programming reference guide. | Open PDF |