Test F3F Procedures Block-3A - REGISTER IMAGES - BATCH

############################################################################ #### BLOCK 3A #### REGISTER IMAGES - BATCH #### ############################################################################## This block batch registers images contained in lsupport/listImagesForRegistering## Assumptions:## User has invoked a Bourne-Again Shell (bash) on ormacsrv1.lpl.arizona.edu## User is a member of the group OREX\spc## User has set up a skeleton directory in the following format:## /SPC_Test/F3G-Nav/## base/## IMAGEFILES/## SHAPEFILES/## lsupport/## PICTLIST.TXT## orig/## results/## test/## User has completed the processing steps comprising Block 1A - TEST DIRECTORY## SET-UP - ORIG## User has additionally populated the orig/ dircteory with test-specific images as per ## Block 2A / 2B## User has populated lsupport/listImagesForRegistering with the correct subset of ## images to register ## User inputs:## testID: Name of the F3 test directory (for example, F3E-Limbs)## dirID: Name of sub-directory in which to work (e.g. orig, or test)## blockID: User-specified identifier for typescript textfile name ## (for example, Block-3A-Register-Images-F3G-GenericImages)# User inputs:export testID=F3F-Photoexport dirID=origexport blockID=Block-3A-Register-Images-F3F-DSImages# Set-Upcd /SPC_Test/$testID/$dirID/script# Display user inputsecho $testIDecho $dirIDecho $blockIDdatepwdls -l## VARIANCE: F3F - pre-registered images, replace original sumfilescp ../base/registeredSUMFILES_G2MapCam/M60* SUMFILES/ls -l SUMFILES/M60*cp ../base/registeredSUMFILES_H2PolyCam/P60* SUMFILES/cp ../base/registeredSUMFILES_H3PolyCam/P60* SUMFILES/ls -l SUMFILES/P60*## END OF VARIANCE# set-up batch register filescp lsupport/listImagesForRegistering make_script.incat make_script.incp scripts/make_scriptR.SEED make_scriptR.seedcat make_scriptR.seedmake_scriptRls -l# Batch register imagesregister -vnohup sh run_script.b &# Monitor progressls -l *.INN *.OOT# Check resultsls -l *.OOT | grep -v 7478sh support/registerEval.shcat evalOut.txtcat evalBad.txt cat evalGood.txt# Inspect display outputs## DECISION:## OPTION 1: Inspect display outputs on cloudls -l TESTFILES | cut -d '.' -f 1 | rev | cut -d \ -f 1 | rev > listTESTwhile read line; doecho "Displaying TESTFILES/$line"/opt/local/bin/display TESTFILES/$linedone < listTEST rm listTEST## END OF OPTION 1##OPTION 2: Inspect display output on a different machinerm ~/send/*ls -l TESTFILES | cut -d '.' -f 1 | rev | cut -d \ -f 1 | rev > listTESTwhile read line; doecho $line/opt/local/bin/convert TESTFILES/${line}.pgm ~/send/${line}.jpgdone < listTESTrm listTEST# images inspected on different machine## END OF OPTION 2# Fix unregistered images# Manually register images and inspect output displays as required# Save register log filesmkdir -p /SPC_Test/$testID/$dirID/log/log-${blockID}mv make_script.in make_scriptR.seed /SPC_Test/$testID/$dirID/log/log-${blockID}/mv *.INN *.OOT run* /SPC_Test/$testID/$dirID/log/log-${blockID}/mv eval* /SPC_Test/$testID/$dirID/log/log-${blockID}/# Clean directorysh rem_script.brm TESTFILES/*rm nohup.out## VARIANCE: F3F DRY RUN - save registered sumfilesrsync -ha SUMFILES/M60* ../base/registeredSUMFILES_G2MapCam/rsync -ha SUMFILES/P60*H2.SUM ../base/registeredSUMFILES_H2PolyCam/rsync -ha SUMFILES/P60*H3.SUM ../base/registeredSUMFILES_H3PolyCam/## END OF VARIANCE# Block Completedateexit# Save block logif [ ! -d /SPC_Test/$testID/log ]; then mkdir /SPC_Test/$testID/logfi# OPTION 1: OVERWRITE TYPESCRIPT LOGmv typescript /SPC_Test/$testID/log/log-typescript-${blockID}# END OF OPTION 1# OPTION 2: APPEND TYPESCRIPT LOGcat typescript >> /SPC_Test/$testID/log/log-typescript-${blockID}# END OF OPTION 2