= make_scriptF = == Description == This program generates the run script and .INN files required for batch processing using [[lithos]]. You must also generate a seed file containing the required [[lithos]] commands. [[make_scriptF]] is a generic script maker for batch lithos processing tasks. You specify the set of landmarks to process in [[make_script.in]] and the sequence of commands to process in [[make_scriptF.seed]]. [[make_scriptF]] generates the .INN files and run scripts to batch process the landmarks, and generates .OOT files and saves display files during processing for user inspection. /!\ You should test the command sequence in [[lithos]] before running the script generated by [[make_scriptF]]. === Required Files === '''input file''': * [[make_script.in]] - Text file containing the names of landmarks to be processed. '''seed file''': * [[make_scriptF.seed]] - Text file containing the [[lithos]] option commands intended during batch processing. '''processed files''': * [[TESTFILES]]/ - Directory in which to store copies of LMRK_DISPLAY1.pgm (output by [[lithos]]) for each landmark. * [[TESTFILES1]]/ - Directory in which to store copies of tmpl.pgm (output by [[lithos]]) for each landmark. /!\ [[lithos]] requires a number of directories and files. Refer to [[lithos]] for more information. === Output Files === '''make_scriptF outputs''': * run_script.b - Run script for batch processing. * .INN files - [[lithos]] command seed file for each landmark. * rem_script.b - Script for removal of temporary files (working directory clean-up). '''run_script.b outputs''': * .OOT files - standard output from [[lithos]] for each landmark. '''processed files outputs''': * [[TESTFILES]]/ - A copy of LMRK_DISPLAY1.pgm (output by [[lithos]]) is saved for each landmark. * [[TESTFILES1]]/ - A copy of tmpl.pgm (output by [[lithos]]) is saved for each landmark. * [[SUMFILES]]/ - S/C and camera information are updated by [[lithos]] if image shifts occur. * [[LMKFILES]]/ - LMKFILES for each landmark are updated by [[lithos]]. * [[MAPFILES]]/ - MAPFILES for each landmark are updated by [[lithos]]. * a number of information text and display files in the working directory are modified by [[lithos]]; please refer to the relevant guide for details. == Using make_scriptF == === Create Input Files - make_script.in === Example '''make_script.in''' file (see [[make_script.in]] for further details): {{{ EE0001 EE0002 EE0003 END }}} === Create Input Files - make_scriptF.seed === [[lithos]] expects a sequence of start and end commands which must be contained in the seed file, as follows. '''Start Commands''' The .INN file will start with the command '''i''': input landmark, and the landmark name, in the above example EE0001. [[lithos]] asks the user whether more images should be checked for - there follow two sequences of commands depending on the user input, as follows: {{{ Check for more images? y[n] n Include a single image? y[n] n }}} {{{ Check for more images? y[n] y Enter fractional width (0=center). .5 Reject invisibles? y[n] n }}} The seed file must therefore start with a sequence that deals with this option set. '''End Commands''' make_scriptF expects the user to quit [[lithos]] on completion of each landmark, therefore the seed file must contain the quit command '''q''' on the second-to-last-line. '''End-Of-File''' make_scriptF expects the seed file to end with the end-of-file identifier, '''END'''. Any commands following this will not be appended to the .INN file. '''Comments''' make_scriptF does not append to the .INN file any line beginning with '''#''', the user may therefore use this special character for comment lines. Example '''make_scriptF.seed''' file: {{{ # Seed file to attach map to overlapping maps #start commands n <- don't check for more images n <- don't include a single image #processing commands o RECENT y 1 o RECENT n 3 y 1, 3, 5 w i RECENT n n v 1 u 1 o RECENT n 1 #end command q <- quit #end-of-file identifier END <- end-of-file }}} == Run make_scriptF == make_scriptF generates a .INN file for each landmark listed in [[make_script.in]]. The first two lines of the .INN file (see below) load the next landmark into [[lithos]]. The remainder of the .INN file comprises a copy of the [[lithos]] commands contained in [[make_scriptF.seed]]. Example '''EE0001.INN''' file: {{{ i EE0001 n n o RECENT y 1 o RECENT n 3 y 1, 3, 5 w i RECENT n n v 1 u 1 o RECENT n 1 q }}} make_scriptF also generates the run script - '''run_script.b''': {{{ rm -f EE0001.OOT /usr/local/bin/LITHOS < EE0001.INN > EE0001.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/EE0001.pgm cp tmpl.pgm ./TESTFILES1/EE0001.pgm rm -f EE0002.OOT /usr/local/bin/LITHOS < EE0002.INN > EE0002.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/EE0002.pgm cp tmpl.pgm ./TESTFILES1/EE0002.pgm rm -f EE0003.OOT /usr/local/bin/LITHOS < EE0003.INN > EE0003.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/EE0003.pgm cp tmpl.pgm ./TESTFILES1/EE0003.pgm }}} == Execute Run Script == {{{ sh run_script.b }}} or in the background: {{{ nohup sh run_script.b & }}} The [[lithos]] standard output for each image is captured in the .OOT files, and the LMRKDISPLAY1.pgm and tmpl.pgm files output by [[lithos]] are copied once a landmark has been processed, these are stored under the landmark's name in [[TESTFILES]]/ and [[TESTFILES1]]/ respectively. == Quality Check New Maplets == The user must review the .OOT files to ascertain the success of the tiling process. == Clean Working Directory == rem_script.b can be used to clean out the directory of make_scriptF working files once tiling is complete and user has quality checked the resulting suite of maplets: {{{ rm -f *.INN rm -f *.OOT rm -f run_script* }}} == User Warnings == * The [[make_scriptF.seed]] file must start with a set of commands which deal with the [[lithos]] ''Check for more images? y[n]'' option sequence. * The [[make_scriptF.seed]] file must end with the [[lithos]] quit command, '''q''', and the end-of-file identifier, '''END'''. * The user should test the [[make_scriptF.seed]] [[lithos]] command sequence before running the make_scriptF-generated run script. ----------- ''(Compiled by DL)'' CategoryPrograms