![]() |
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.
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, XP, Vista, and Windows 7, 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 7 (a similar method probably works in Vista), click on Start then select Control Panel, then in the search control panel box at the top of the window type "environment" and in the results click on "edit the system's environment variables" and then click on the "Environment Variables" button at the bottom of the window. Then select the PATH command in the top window and click n 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 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.
1c. 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.
1d. 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.
2. Next you need to be able to open a command window within the folder that has your data files. This can be done directly in Windows 7 (and Vista?) or with a bit more trouble in earlier operating systems.
2a. In Windows 7 (and probably Vista) this is easy. Using Windows Explorer (Start>All Programs>Accessories) navigate through the file tree to the folder with your data files. Find the folder name in the file tree (on the left--not in the list of files that reside in the folder). Then while holding down the shift key, right click on the folder name. You then get a context menu, in which one of the options is "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).
2b. If you are running Windows XP, 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.
2c. Or in XP and earlier Windows you can set up shortcuts to the command prompt on your desktop, or in some other convenient place:
2c1. To do this, copy the shortcut to the "Command Prompt" or "MS-DOS Prompt" icon from the Start menu Accesories Folder 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.
2c2. 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\Your User Name\My Documents\Site Data\Ceramics" for Windows XP or "C:\Users\Your User Name\My Documents\Site Data\Ceramics"for Windows 7)
), 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").
2c3. Start a Command Prompt window by double-clicking on the appropriate "MS-DOS Prompt" or "Command Prompt" icon now on your desktop.
3. 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.
4. 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.
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 that produce graphics (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, 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.
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 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+ or Editpad Lite (both freeware) 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.
In most cases you won't be able to directly print the graphics directly from the TFQA graphics programs (KMPLT, DIVPLT, LDPLT, BAYES, SCAT, and FORD). Note that these programs do not run directly under Windows Windows 7 or Vista but they do run under all earlier Windows versions back to Windows 95. However, they can be run and and results printed using PrintScreen using a freeware DOS emulator: see Running TFQA Graphics Programs under Windows 7 and Vista.
Saving Graphical Output and Printing from Another Program
Generally you will either want to use Print Screen (see below)or will want to run the plotting programs and view the output on the screen to decide which ones you want to print and then rerun those particular plots saving output to a file (one graphic per file). You can then import these files and then print them from another application. That is, you want to say yes,you want to 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, Corel Draw and many other graphics programs 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 2003 but makes one available through their web site that works with Word 2003 and all 32 bit versions earlier versions of Word--see http://support.microsoft.com:80/support/kb/articles/Q196/5/06.asp. However, this filter does not work with Word 2007 and Microsoft has offered no replacement. Neither the Corel nor the Word conversions are perfect but they produce quite acceptable plots. To be safe you should check the printed results against what appears on the screen.
ViewCompanion Standard (http://www.softwarecompanions.com/viewcomp.html; free trial; education users may wish to inquire about educational pricing) will allow you to view the HGPGL files, to convert them to a great variety of other formats including JPG, and to print them directly. When you open the file, the default line style may be very thin, but you can modify these settings. If you want to print it with thicker lines:
Start ViewCompanion
Click on Tools>Pen Table
Click on pen 1 in the small window that opens, making sure that it is highlighted (if it isn't highlighted nothing happens)
Change the width below the box, e.g., to .02
Click the Apply button
Make sure the box that says "Use Pen Table" is checked (it should be checked automatically)
Click the OK button
The PrintScreen Approach
PrintScreen will produce lower quality graphics than printing the HPGL files from another application but will be handier most of the time.
If you use DOSBOX (see Running TFQA Graphics Programs under Windows 7 and Vista) you can use PrintScreen very nicely from Windows XP, Vista, and Windows 7.
Iin Windows 2000 and earlier (but not Windows XP or Vista or Windows 7), 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.
Printing Directly to a HP Laserjet Printer or Plotter
Graphics can only be directly printed from TFQA programs that produce full screen graphics (KMPLT, DIVPLT, LDPLT, BAYES, SCAT, and FORD) 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). Usually, 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).
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.
Creating Graphics from the Data
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
| Home | Top | Overview | Ordering | Documentation |
Page Last Updated - 01-May-2010