Extra-Unit Programs

June 2010 - G. Buccellati
[August 2022 - M. De Pietri]
A Digital Monograph
The home for this page is GRAMMAR

23.1 Overview
23.2 TP: typology of pottery
23.3 TZ-KN: produces Excel file from KNOCOD
23.4 VWX: produces indices from V and W books and input .J files for unit books (white on black)
23.5 VWH: produces HTML for photos and drawings
23.6 M: produces Y01\O\.O files in Y01\O\M
23.7 MOD: produces Y01\D\.HTM files from O\M
23.8 CerPhaS: produces .HTM files from O

23.1     Overview

     These programs are run outside the excavation units. The results are utilized in different ways.
     The first two programs generate J-files that are used by the individual units (the J-files are placed in their EXOGEN folder). They also generate files that are for general use, both on an ad hoc basis (e.g., the photographer can check whether the photo of a given item has already been taken) and for use within the MZ sitewide book.
     The other programs generate files that are for use outside the individual excavation units.

Back to top

23.2     TP: typology of pottery

     The program takes as a starting point an Excel file that follows the exact format of the pottery encoding sheets, for either body or shape sherds. This file must first exported as a text file, and given a different extension.
     The J-file it generates allows the individual unit books to integrate into the record the full details of pottery analysis.

     See under Secondary Input (5.9) for input.
     The input file must contain data belonging to only a single book (e.g., J3).
     Save the Excel file as a text file (tab delimited, answer YES to the question about incompatible features). Change the filename to a name of the type J03PQ3A1.TP.

book (for Outer City books it will not be possible to have a sequential index
entry, since prefix consist of two letters)




date: for day 1-9 enter the digit, for later days, enter a letter as follows: A=10, B=11, C=12, etc. (hence Q3A stands for Q310, or March 10, 2006)


sequential index (used when more than one file is processed for the same book in the same day)

     The .TP file must be placed in a folder of the type TP\TP-INPUT\J03.

     The TP program converts the file to a.J format, with extension.TP2 and places the new file (e.g.,J03PQ3A1.TP2)in the same directory (TP\TP-INPUT\J03). It changes the extension of the original file from.TP to.-TP.
     Move the newly created.TP2 file to the exogen folder of the pertinent book. The unit will change the extension to.J and process it as a normal.J file.

Back to top

23.3     TZ-KN: produces Excel file from KNOCOD

     The program produces a single Excel file from a .SKE (and eventually other) files as outputted by KNOCOD program.
     It is tied to KNOCOD unit numbers, that have to be translated to qb lot numbers. It is best to have lot numbers (rather than features) because then one can have photos of individual bones as components tied to numbering system.

Back to top

23.4     VWX: produces indices from V and W books and input .J files for unit books (white on black)

     The program produces overall indices by photo and by view/item for any given V or W book, and new J-files for individual books within its own subfolder UNITBKS.
     The program is run by the photo registrar, who then sends the resulting J-files to the EXOGEN folder of the pertinent book.
     It also produces the filelists within the individual V or W books, which are required by the JD suite.
     It further produces two HTML files for the sitewide index of photographs and drawings (within the book XVW): VWX-TOC.HTM and VWX-TOT.HTM. These are stored within the book XVW.
     The indices are kept by the photo registrar for general use and for integration in the MZ sitewide book.

     To run the program, it must be started with batch file VWX.BAT.
     First, the program produces filelists (VWX1.TXT) for each individual folder within a given V or W book.
     The program uses file ...\G\LoRes\VWX1.TXT as input. It is created by the batch file VWX.BAT within directory of type V13\G\LoRes (see above, 16.4.4).
     The program uses the file \MZ\A\XVW\VWX\VWX-ALL.PRU as a starting point for the cumulative index of all photos and drawings.
     The program accepts only a path of the type \MZ\A\V14\G\LoRes\L_V14d40 and a filename of the type L_V14d4002 A16v89a M903 gg x x.JPG (x x are optional fields).

     The program asks for a cut-off date. This is the date after the one when the previous program has been run. If no cut-off date is specified, all files are processed.
     \MZ\A\XVW\VWX\VWX-ALL.PRU must be available to the local computer (for photos or for drawings) in order to update it.
     The file \MZ\A\XVW\VWX\VWX-ALL.PRU plus the entire XVW\VWX folder must be copied to the server from the

     The program creates files of the following type:
Index file by photo: \MZ\A\V18\G\LoRes\V18-Q419.TXT
Index file by view/item: \MZ\A\V18\G\LoRes\V18-Q419.TXT
Cumulative index: \MZ\A\XVW\VXW-ALL.PRU
ToC for Mozan Sitewide \MZ\A\XVW\VWX\VXW-TOC.HTM
Totals for Mozan Sitewide \MZ\A\XVW\VWX\VXW-TOT.HTM
Discards: \MZ\A\V18\G\LoRes\V18-Q419.DIS
Errors: \MZ\A\V18\G\LoRes\V18-Q419.ERR
J-files for other books: \MZ\A\V18\G\LoRes\UNITBKS
Filelists: \MZ\A\V18\G\LoRes\FILELIST
     Sample output for file in Unitbooks:

.bk J03
.fl J03VQ7A.J
.fd photos for views and items from V directory V18
.fn Cut-off date: none
.rd Q710
.ri !!!

.rd P801
.ri dm
v 0010a
B1 L_V18d3002 J3v10a P801 dM.jpg
B2 0010a L_V18d3002 J3v10a P801 dM.jpg

     The J-files in the UNITBOOKS folder are to be entered in the EXOGEN folder of the pertinent book for processing within that book.

Back to top

23.5     VWH: produces HTML for photos and drawings




Back to top

23.6     M: produces Y01\O\.O files in Y01\O\M

     The program uses the input of the .M files (above, 4.4.8)

     No special condition.

     The program creates a set of individual .O files in the Y01\O\M directory, and updates a cumulative index of markers as Y01\O\M\-M.X. The individual marker files are used by the JD suite to calculate the coordinates taken through relays, and by the MOD program to create individual marker files for display.
     Sample output for .O file:

m 2527
B01 Rebar on grid 10m W.2517
D04 41128
D05 36811
D06 8756

     Sample output for M.X file:


















NWS A16 Nblk K1









NWS A16 Eblk K1









NWS A16 Eblk K4

Back to top

23.7     MOD: produces Y01\D\.HTM files from O\M




Back to top

23.8     CerPhaS: produces CERAMICS\TEXTS\C2\.HTM files from O

     The program produces ceramics overall indices by phase/stratum/shape, a spreadsheet of the data and information of each phase/stratum/shape.
     To run the program execute \PA\CerPhaS\CerPhaS.py.

     All files in EXOGEN\STRATA\ as the input list of sherds.
     For each sherd, data O files are read (from \MZ\A\..).
     Abbreviation conversion from \PA\UGR_lexica.txt and \MZ\A\MZ\TEXTS\A2\mza-lexicon.txt.

     No special condition.

     HTML files: \MZ\A\CERAMICS\TEXTS\C2\index.htm, \MZ\A\CERAMICS\TEXTS\C2\index_vessel.htm, for each phase/stratum/shape a file in \MZ\A\CERAMICS\TEXTS\C2\strata\.
     Tab separated spreadsheet: \MZ\A\CERAMICS\TEXTS\C2\database\spreadsheet.txt.
     Lists of errors found: \MZ\A\CERAMICS\- non-canonical\to be checked - CerPhaS\.
     Console log: \PA\CerPhaS\CerPhaS.log.

Back to top