Unix Scripts and VnmrX Macros

All of the following Unix scripts and macros are stored with a .txt extension in order to facility downloading and viewing on the web. The .txt extension can be stripped off when the file is installed in directory on your Unix path. The /usr/local/bin is a good place to put local scripts and compiled executables. If your system is being used only for NMR, they could also go in your /vnmr/bin directory. Just remember to move them when you upgrade to a new version of Vnmr! The Vnmr macros MUST have the .txt extension removed and should be placed in either /vnmr/maclib or in your personal maclib (~/vnmrsys/maclib). The other possibility is to put all local macros in something like /usr/local/maclib and define a global parameter maclibpath in Vnmr.

This vnmrplot should be installed in /vnmr/bin, replacing the existing version. It would be a good idea to simply rename the existing copy to something else so that you can return to it later if you have trouble with this version. This plot script does two different things. First, it looks for an equivalent plotter name in the file /vnmr/plotter.equiv. In this way you can define a single plotter device in Unix for a LaserJet4 for instance. The plotter.equiv file lets you define 6 or 8 different logical plotter names for Vnmr without having to define them under Unix. Second, if the plotter name starts with 'remote' or 'c_remo', the plot file is sent to the server by ftp rather than queued to a Unix plotter device. The ftp destination is determined by the DISPLAY environment variable, stripping off the :0.0 screen selection code. Device names that begin with 'c_remo' use the pclcomp to compress the PCL laserjet code before sending it. This reduces the size of the transmitted file, but requires that the laser jet printer be able to handle compressed pcl.
The tape_dir script will read all of the tar files from a give tape drive, reformat the directory output to show size, file name, and modification date, and maintain a running total of file size, both for the individual tar files and for the tape as a whole. These summaries are printed at the end of each tar file and at the end of the tape, respectively. The script will look for a TAPE environment variable and use that tape device if it is defined. If TAPE is not defined, it has an internal default that should be set for your system. It is currently set to /dev/rmt/0mn. It should be set to the non-rewind device so that the system will read multiple tar file on a single volume.
The du_summary script simply gives an abbreviated list of the space used in the highest level subdirectories of a given directory. It is more information than you get from the du -s command but much less than you get from the just the du command.
The wft2da macro is a modification of the Varian macro of the same name. In conjunction with the wft1da macro, it is possible to automatically process data from the tndqcosyX and tntocsyX pulse sequences. These data sets use an xpulse array in addition to a phase array, resulting in 4 data tables instead of two. These macros can generate the necessary list of 16 coefficients to process these data sets. The addition of the wft1d macro permits interactive use of the step-by-step processing menus with interactive weighting adjustment in both dimensions.
The plcosy2 macro was written as a replacement for the Varian plcosy macro. It functions in much the same way, except that it uses the command name to pass additional information regarding plot options. The main difference is that plcosy2 will plot a square 2D plot with a 1D spectrum along only one axis. This permits a larger 2D plot since space is not used for a 1D plot along the top of the spectrum. It is also possible to append either x or d to the command in order to plot grid lines (d) or points at the intersection of the grid lines (x). The x and d options requires two other macros: drawdiamond, and plgrid. Once these three macros (drawdiamond, plgrid, and plcosy2) are installed in a directory, you need to make addition links for the alternate names. plgrid should be linked to plgridx and plcosy2 should be linked to 5 other names: plcosy, plcosyd, plcosyx, plcosy2d, and plcosy2x. These links can be either hard or symbolic, either will work. Using a symbolic link will permit editing the file without the need to remake the links, however.
The fixSS macro is used to calculate the linear prediction values necessary to remove the large, negative left phase correction, and resulting baseline roll, from spectra using SS or other shaped pulses for signal excitation. Since the signal precession effectively begins during the pulse, the data acquisition is delayed by several data points from time 'zero'. fixSS calculates the number of data points missed, right shifts the fid, and sets the linear prediction to calculate the missing points.