TextPad is used as an editor for forming a programming environment for FORTRAN as well as handling input files for the IMAGE program. TextPad should be downloaded and installed. The "Tools" keys are used to set up single-key command sequences as follows: 1=Compile, 2=Link, 3=Run FORTRAN, 4=Compile+Array Check. The Tools keys are set up by clicking on Configure, Preferences. An existing implementation of these shortcut keys should be consulted for the exact command sequences to input into the Tools keys.
IMPORTANT POINT FOR DEBUGGING: In the "usual" configuation, the Cntl-3 key for "Run FORTRAN" will send the output to a separate window. If an error occurs during program execution, then oftentimes this window will simply disappear, so that the error message cannot be seen. To avoid this situation, change the setup for this key so that the "Capture Output" box is checked (i.e. using Configure, Preferences, etc.). Then, the output will appear in the Textpad editor window attached below the main editing window, and any error messages that are issued will be clearly visible.
Gnu FORTRAN is used. This should be downloaded and installed. Special attention to properly link to the libraries might be needed. A variable should be added to SYSTEM VARIABLES called GFORTRAN_UNBUFFERED_ALL with value Y (to accomplish this right click on COMPUTER on the START panel, click on Properties, Advanced System Settings, Environment Variables, and add to the SYSTEM VARIABLES).
Perform the following steps to set up your computer to run IMAGE:
c:\image\ei.exe %1 copy c:\image\eisav.rec ei.recwhich sets a standard window size for IM analysis and invokes the EI editor. This standard window size is specified in eisav.rec, which by default contains "eiw.geo 55 46 561 11 "Fixedsys" 15 400 : 512 512 10 10". The first four values here refer to the size and position of the ei editor window, the next two are the fonts in the display of that editor, and the final four (following the colon) refer to the size and position of the graphics window. These values work well for a small size monitor, although for a larger monitor revised values such as "eiw.geo 55 46 761 11 "Fixedsys" 15 400 : 712 712 10 10" might be preferable.
Before the "Windows Classic Theme" solution for Windows 7 specified above was found, there were a few other partial solutions developed for running VP under Windows 7. These are included here, in case they're needed for a future operating system:
For using IM: Associate the filetype .im with the TextPad editor, and similarly for the filetypes .im1, .im2, .im3, .... Within TextPad, an input file is executed by IMAGE via a TextPad Tools key 5.
For using VP: A good, partial fix for the VP windowsing problem can be achieved by noting that the windowing works reasonably well if the following line is always listed at the top of the ei.rec file that's present in the same folder containing the EXG file that's being executed:
eiw.geo 90 100 930 26 "Fixedsys" 15 400 : 1200 1000 0 0The first four values here refer to the size and position of the ei editor window, the next two are the fonts in the display of that editor, and the final four (following the colon) refer to the size and position of the graphics window. After the user exits VP, then a new line is written into the ei.rec file; under Windows 7 this new line contains values that are scaled relative to the original ones, so the ei and graphics windows gradually shrink. To avoid this problem, the ei.rec file listed above must be rewritten prior to each execution of VP. To achieve this, and to successfully view your plots in the graphics window, do the following:
copy c:\eisav.rec ei.rec vp %1and associate this vp.bat file (rather than vp.exe) with your EXG files.
set left=0 right=6 top=1 bottom=0 axis inv v mixedw.ugh view erase page(the line "view mixedw.ugh" is present here only for a white background on the plot, and is not needed for a black background). The final line uses the "page" option (rather than "fill" as previously generally used). This option is meant to force a display of the entire page, but under Windows 7 the entire page is not seen. Rather, you must adjust the parameters for the right and top values; increasing 'right' causes the image to scale down in size, whereas adjusting 'top' (using positive or negative values) changes the vertical position of the image on the viewing window. It is not necessary to vary 'left' or 'bottom' from their values of 0. It's quite easy to find values for right and top that produce a good view of the plot, and once found then the same values will always work for a given EXG file.
(This solution for VP is not the only possibility, and other solutions may be better to use in the future. For example, one could associate the EXG files with TextPad, and add a Tools key in TextPad to invoke vp.bat. That would avoid use of the EI editor completely, in which case the line in the eisav.rec file could be changed to "eiw.geo 30 30 0 0 "Fixedsys" 15 400 : 1200 1000 0 0". An alternative method, that avoids the use of VP windows entirely, is to run VP with the "nographics quit" options, so that it just acts as a processor and it generates a UGH file. That file could then be converted to Postscript using U-PS, with the latter invokes in a script or by the EXG file itself using a SYS command (see \vp\demopage.exg for an example). That Postscript file could be viewed using GSVIEW, or alternatively, one could convert it to JPG (using a command line of GSVIEW or GSWIN) and then view that using Irfanview).
The instructions below are old ones, relevant to running IMAGE on a Windows PC. Perform the following steps to set up your computer to run IMAGE:
ei.* eiuser.pro eiwhite.col eicolor.mnu(the eiuser.pro file has been modified here in order to run IM using the F5 and F6 keys, by adding the following lines to the end of the eiuser.pro file:
F5={SAVE ^ SY > image < %N } F6={SAVE ^ SY image < %N }Also, in the top part of this file, the line starting with 'HELP' has been modified to include '5=IM 6=IM+'. In this way, you can simply press the F5 key and IM will run on the batch file which you're currently editing. If you press F6 then IM will also run on that batch file, and the output from IM is directed to the EI window (terminate that with F3).
ei.exe %1 copy c:\image\eisav.rec ei.recand you'll also need the file eisav.rec, containing:
eiw.geo 55 46 561 11 "fixedsys" 15 400 : 512 512 10 10
bare hershey fill 0.9 repl
start /b i_view32 %1
Historically the IM program for image analysis ran on a Unix system. Currently it is generally run on a Windows PC, using the file setup described below.
cp ~feenstra/public/image.exe .Place the image.exe file into your main Windows directory, which below is assumed to be named WINNT.
ei.* eiuser.pro eiwhite.col eicolor.mnuNote that the eiuser.pro file has been modified here in order to run IM using the F5 and F6 keys, by adding the following lines to the end of the eiuser.pro file:
F5={SAVE ^ SY > image < %N } F6={SAVE ^ SY image < %N }Also, in the top part of this file, the line starting with 'HELP' has been modified to include '5=IM 6=IM+'. In this way, you can simply press the F5 key and IM will run on the batch file which you're currently editing. If you press F6 then IM will also run on that batch file, and the output from IM is directed to the EI window (terminate that with F3).
ei.exe %1 copy c:\WINNT\eisav.rec ei.recand you'll also need the following file eisav.rec, also placed in the WINNT directory:
eiw.geo 55 46 561 11 "fixedsys" 15 400 : 512 512 10 10Then, ASSOCIATE the .im file type with the im.cmd command. Note also that there's an ICON defined, tip1.ico or tip2.ico, which you can also associate with the .im filetype.
start /b i_view32 %1
vp.* vpugh*.* *.pro *.fnt *.ini profile.exg userprof.exg
In Unix, the record length for sequential direct access files can be set to 1, and the program uses whatever length is necessary. On the PC an explicit value must be set for this parameter. Also, to ensure compatibility between Unix and PC this parameter must be set to byte units. This can be accomplished in the compiler options by the switch: /assume:byterecl (default is 4-byte units).
Additional notes:
1. be sure to place file DEFAULT.UGH in the WINNT directory, since this is needed to produce a viewable color lookup table within VP. (NOTE: the colors are wrong, but at least they're viewable. To achieve proper colors probably a different file than DEFAULT.UGH is needed, and input in the first 'restart' command in an .exg file. Also, for ugh-ps, by default images are rended in a gray scale. To achieve some other lookup table, a .vlt file must be constructed with that lookup table (see GIFTOUIM reference file for details)).
2. When using .exg files, the folders they reside in should NOT have any blank spaces in their names.
3. For automatic output of spectra, the file utops.cmd (and utops_color.cmd) must be in the WINNT directory. Also, in the VP directory, the file U-PS.PRO should have the following lines at the end:
bare hershey fill 0.9 repl