![]() |
Tools for Quantitative Archaeology |
Running TFQA under Windows
Running the Tools for Quantitative Archaeology under Windows is a bit unusual because these programs are all either DOS programs or true Windows console mode programs that do not (yet) have sophisticated file navigation capabilities. The essential thing is that the programs look in the proper folder for the data files you need and that they output files to the same place. Because of this, you need to do the setup described below.
Running TFQA Under Windows
There are two ways to run the Tools for Quantitative Archaeology under Windows.
Running TFQA Method 1
The first (and easiest) method is to copy the programs (.exe files) that you need into the folder in which your data files reside. At that point you can just double-click on the .exe files and everything works as desired. For any version of Windows, to copy (rather than move) the programs in Windows Explorer (or My Computer) to highlight the necessary .exe files in c:\program files\TFQA, right click on them, and the select copy. Then navigate to the folder with your data files, highlight it, right click and select paste.
(Note that if drag and drop the programs from the TFQA directory, in Windows NT, 2000, and XP the program files are actually moved and they will no longer be there when you look later, which isn't fatal but will likely be an annoyance for you. If you do this in Windows 95 or 98 you end up moving shortcuts to the programs, not the programs themselves. In this case, the programs stay where they were, but the shortcuts do not have the desired effects.)
From that point, you can double click on the program name within the folder with the data files (from Windows Explorer or whatever) and it will start in a command window and will find the data files in that same directory. If you find that the program closes mysteriously, seemingly without doing what it is supposed to do, the program may have just finished quickly and closed the window. Alternately, you may be making some mistake and the program is closing the window, probably after giving you a message that disappears before you even see it. In either case, you'll need to use method 2.
Running TFQA Method 2
The second method involves more setup but is cleaner in the long run.
1. In the second method, you run the programs from a Command Prompt (MS-DOS Prompt) window. To use this method, the folder (directory) containing the programs must be in the system's current PATH command.
1a. To permanently change the path in Windows XP (a similar method probably works for Windows 2000), click on Start, then select Control Panel, then double-click on System, click the Advanced tab and then click on the Environment Variables button. Then select the PATH command in the top window and click on Edit. Click anywhere in the Variable Value text and hit the End key to go to the end of the string and add the text ";C:/PROGRAM FILES/TFQA" without the quote marks. Click on OK three times and then close the Control Panel.
1b. To permanently change the path in Windows 95 or Windows 98, simply add ";C:/Progra~1/TFQA" to the PATH command in the computer's AUTOEXEC.BAT file.
1c. To temporarily change the path you will need to run the TFQAPath batch command each time you open a Command Prompt window. In order for this to work, you need to copy the TFQAPath.bat file from the \TFQA\Setup folder to your Windows directory, ordinarily, C:\Windows or C:\WINNT.
Next you either need to use the Microsoft CmdHere utility (step 2) or you need to set up one or more shortcuts to the command prompt (step 3).
2. The free Microsoft CmdHere utility can be installed (run) or downloaded (save) from the Microsoft Powertoys web site. Once it is installed (double click on CmdHere.exe if you downloaded it), it is available on your computer all the time. Use Windows explorer to navigate to the folder with your data files, and then, with the folder (not a data file) highlighted, you right click and select "Open Command Window Here". You can then run the programs in the command window that is automatically opened pointing to this folder (meaning the program will find the data files contained in that folder).
Or use shortcut method provided in step 3.
3. To set up shortcuts to the command prompt on your desktop, or in some other convenient place:
3a. To do this, copy the shortcut to the "Command Prompt" or "MS-DOS Prompt" icon from the Start menu to your desktop. If one of these icons is not in the Start menu, try the Accessories submenu. To copy the shortcut, highlight the command name on the menu then right click and select Copy. Then click on an empty spot on the desktop. Then right click and select Paste. If it isn't there, you can create a shortcut to c:\windows\command.com (Windows 95 or 98) or c:\winnt\system32\cmd.exe (Windows NT or 2000) or c:\windows\system32\cmd.exe (Windows XP) using Windows Explorer. Navigate to the proper folder for your operating system and highlight the appropriate .exe file, right click, and select "Create Shortcut." This creates a shortcut called something like "Shortcut to cmd.exe" within that same folder. Then drag that shortcut file (renamed if you like) to your desktop.
3b. Once you have a Command Prompt shortcut on your desktop, highlight the command promt icon, right click, and select Properties. Change the properties of the icon so that the "start in" (Windows 2000 or XP) folder or "working" folder (Windows 95/98) is folder with your data files, (e.g. c:\Documents and Settings\User Name\My Documents\Site Data\Ceramics), then say OK and save your changes. You can have multiple shortcuts on your desktop pointing to different analysis folders, just make several copies of the Command Prompt shortcut icon and rename them to reflect the folders to which they point (e.g. "Ceramic Analysis").
3c. Start a Command Prompt window by double-clicking on the appropriate "MS-DOS Prompt" or "Command Prompt" icon now on your desktop.
4. If you permanently modified the Path environment variable in step 1,then you run a program simply by typing its name, (e.g., kmeans) and then pressing enter. In this mode you can run any number of analyses from a single window. You can go back and forth between other Windows programs (such as Notepad and the Command windows, either using the tab buttons across the bottom of your screen or by holding down Alt and pressing Tab. If you did not permanent modify the path in Step 1, type TFQAPath to get access to the programs (you need to do this each time you open a command promptwindow, but only once per window (not each time you run a program within the window). Then, you can type the program name, press Enter, and it will start.
5. To exit the Command window type EXIT then press Enter at the > prompt. If that doesn't work just click on the X at the top right of the window and reply OK to the warning message.
If you are working on a networked system and don't have write access to the folder (directory) with the data files, you will find it easiest to copy the program and data files to a folder to which you have both read and write access and then follow the above instructions.
File Names in TFQA
With the exception of the programs that directly produce graphics, the programs are all Windows Console Mode programs that accept long Windows file names. However, the remaining DOS programs ( DIVPLT, FORD, KMPLT, LDPLT, BAYES, SCAT, STP, COYOTE; those for which the .EXE file names are ALL CAPS in the TFQA directory), do not deal with ordinary Windows file names. File names used by these DOS programs are restricted to, at most, 8 character file names (with no embedded spaces or special characters allowed except "_") followed, optionally, by a period and a 3 character extension (e.g., MY_DTA1.ADF). If you have files you want these graphics programs to read that don't meet these DOS conventions, you must rename them so that they do. Because the program interface always prompts for file names that you have to type (rather than selecting them from a menu) and because several key programs (divers, kmeans, and lden) interact with plotting program counterparts (notably DIVPLT, KMPLT, and LDPLT), you will want to stick with relatively short file names with 3 character extensions. Better yet, just use the DOS conventions of up 8 character file names(with no embedded blanks or special characters except underscore), followed by a 3 character extension.
Printing from TFQA
Many TFQA programs provide both screen and "printed" output. Usually, you will want to send the "printed" output from the programs to a file. By default the output file extension for most programs is is .LST but for Windows an extension of .TXT works best. Then you can look at it using a text editor (like Windows Notepad or one of the substitutes, such as Notepad+ (free on the Internet) or Textpad before you print it so that you can delete the pieces of output you don't want printed and then print the result from within the Windows application. You can also bring the output into a word processor such as Word or Word Perfect. However, in most word processors the default font is proportional. you will want to Edit>Select All and change the font for this document to a fixed font such as Courier.
Halting Program Execution in Windows
To stop a program running in a Command Prompt window hold down the <Ctrl> key and press <Break>. <Break> is the same key as <Pause> and is usually on the top row of the keyboard to the right of the function keys.
Printing Graphics from TFQA
It appears that graphics can only be directly printed from TFQA programs if all three of the following conditions are met: (1) programs are running under Windows 95, 98, or 2000; (2) the printer is connected directly to the computer on which the programs are run; and (3) the printer implements HPGL (most HP Laserjet printers do). Otherwise, you must save each graphical output you want printed to a file (use a .hpg extension) and print the files from another program (more on printing from these files below).
Printing Directly to a HP Laserjet Printer or Plotter
If all of the above conditions apply, you may be able to print graphics directly on a printer from the toolkit to a HP Laserjet. Many newer Laserjet models can work both in PCL and Postscript mode and you can have the same printer set up both ways on your computer simultaneously. You want to print to the PCL printer. To print the graphics directly, you will need to send the output directly to the printer. However, under Windows 95 or Windows 98, you will need to tell the printer to capture the DOS printer port output. This has to be done only once, do Start>Settings>Printers. Then right click on the (networked or otherwise) HP PCL (not Postscript) printer. Click on the Details Tab, then click on Capture Printer Port. Make sure the scroll bar is at the top. If LPT1 is associated with this printer, it is already set up. Otherwise type in, below LPT1, the printer address shown on the previous screen, e.g., \\networknode\HPPrinterName\. Check the box that says "Reconnect at Logon". Then click OK until you get back to the desktop. With some networked printers, this approach may not be possible. If not, you will need to print the output from a Windows application.
If the printers are set up properly, all you have to do is run the program from a Command Prompt window as described above. Tell the program, Yes you want to Plot the results to a plotter or Laserjet printer, that the HPGL output should go to PRN, and that the HP Laserjet or Plotter Paper Size is L for Laserjet. Then, just before it produces the plot, it asks you if you want to Plot the output, reply Yes. This sends the output to the printer.
Saving Graphical Output and Printing from Another Program
If you can't get the direct output to work or if you want to edit the graph, then send the Toolkit graphics output to a File and then import it and print it from the other application.That is, you want to say yes, plot the results to a plotter or printer and that the output should go to a [F]ile. When prompted, supply a file name with an .HPG extension. This file can then be imported into word processing or graphics programs. The graphic output of the programs is an ASCII file in HPGL (Hewlett Packard Graphics Language). That language is turned into graphics by a plotter or an HP PCL printer. Word Perfect, Corel Presentations, and many other graphics programs including Corel Draw will import HPGL files very nicely. If Word Perfect does not give the option of importing HPGL files you need to rerun the install program and install the HPG conversion filters (you should not need to reinstall the whole program). Microsoft does not supply an HPGL graphics filter with Word, but makes one available through their web site that works with all 32 bit versions of Word, which is to say all recent versions, see http://support.microsoft.com:80/support/kb/articles/Q196/5/06.asp.
Finally, one user has located a shareware utility, ViewCompanion Pro, that pulls in HPGL files and allows one to view them, print them and save them in other formats, such as JPG, BMP, and TIF. When you open the file, the default line style may be gray and very thin, but you can modify these settings by playing around with Tools | Pen Table on the main menu. (Be sure to click on the check box called "Use Pen Table", otherwise the modified settings won't appear in the drawing.) See http://www.softwarecompanions.com/viewcomp.html; also available through ZDNet at http://www.zdnet.com/downloads/stories/info/0,10615,58182,00.html.
Not all of these conversions work perfectly so you should check the printed results against what appears on the screen.
It is a lot more trouble, but you can extract the data necessary to create the plot from the PLT file. For example, if you look at the .PLT file produced by Divers (not the .HPG file produced by DivPlt that actually contains the plot) you will see that it contains all the data needed to create the plots. You can read that data into a statistics or graphing program and use it to create plots. For Divers, the composition of the .plt file is as follows. (You won't need all of this information):
title date no of elements, min ss, max ss, increment, no of intervals, no of points, conf.level, iproginc, ipointtrial, iinctrial, disteven,hmax,avlevpct (you don't need these)
for each element, the element proportion
for each sample size interval: ss, mean richness, std of richness, richness conf. interval low, richness conf. interval high, minimum richness, maximum richness, mean evenness, std of evenness, evenness conf. interval low, evenness conf. interval high, minimum evenness, maximum evenness.
for each data point: symbol, label sample size, number of trials, richness evenness, (and depending on the computations, richness lower percentile, richness percentile, richness upper percentile, evenness lower percentile, evenness percentile, evenness upper percentile
The PrintScreen Approach
There is one other--less good--approach that may work in Windows 2000 and earlier (but not Windows XP) but will yield lower resolution graphics. While a plot is displayed, you can press <Shift><PrintScreen>. This sends the screen image (which is at a much lower resolution that the HPGL generated plot) to the clipboard. You can then Paste the clipboard into a graphics application or a graphics box of a word processing program. You may have to Invert the image to make it Black-on-White rather than White-on-Black. You can then save it in another form and bring it into other applications or print it from the one you are using.
| Home | Top | Overview | Ordering | Documentation |
Page Last Updated - 22-Jul-2007