Block-2B - INGEST IMAGES - SUB-TEST-SPECIFIC

############################################################################ #### BLOCK 2B #### INGEST IMAGES - SUB-TEST-SPECIFIC #### ############################################################################## This block additionally populates the F3 test directory's IMAGEFILES/## NOMINALS/ and SUMFILES/ sub-directories with Detailed Survey image files ## which are specific to a sub-test in readiness for registering the images## 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/## ORex/## DATA/## base/## IMAGEFILES/## SHAPEFILES/## lsupport/## orig/## results/## test/## User has completed the processing steps comprising Block 1A - TEST DIRECTORY ## SET-UP - ORIG## User has set up the test sub-directory, as per Block 1B - TEST DIRECTORY ## SET-UP - TEST## User inputs:## testID: Name of the F3 test directory (for example, F3E-Limbs)## subTestID: (if required) Identifier for sub-test work (for example, F3G1)## 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-2B-IngestImages-SubTestSpecific-F3G1)# User inputs:export testID=F3G-Nav#export subTestID=F3G1export subTestID=F3G2#export subTestID=F3G3#export subTestID=F3G4#export subTestID=F3G5#export subTestID=F3G6#export subTestID=F3G7export dirID=testexport blockID=Block-2B-IngestImages-SubTestSpecific-${subTestID}# Set-Upcd /SPC_Test/$testIDscript# Display user inputsecho $testIDecho $subTestIDecho $dirIDecho $blockIDdatepwdls -l## VARIANCE-F3G:# Populate base/IMAGEFILES/ with sub-test Detailed Survey test image files# Step completed in Block 2A - Ingest Images - Test-Specificls -l base/IMAGEFILES/# Populate test/NOMINALS/ with sub-test Detailed Survey test image nominalsls /SPC_Test/$testID/base/$subTestID/NOMINALS/P60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesG2andG3PolyCamcat lsupport/listImagesG2andG3PolyCamcat base/$subTestID/NOMINALS/READMEwhile read line; doln -s ../../base/$subTestID/NOMINALS/${line}.NOM $dirID/NOMINALS/${line}.NOMdone < lsupport/listImagesG2andG3PolyCamls -l $dirID/NOMINALS# Populate orig/SUMFILES/ with Detailed Survey test image sumfilescat base/$subTestID/SUMFILES/READMEwhile read line; doln -s ../../base/$subTestID/SUMFILES/${line}.SUM $dirID/SUMFILES/${line}.SUMdone < lsupport/listImagesG2andG3PolyCamls -l $dirID/SUMFILES## END OF VARIANCE# Update test/PICTLIST.TXTsed '$d' test/PICTLIST.TXT > TEMP1.TXTls base/IMAGEFILES/P60* | cut -d '/' -f 3 | cut -d '.' -f 1 > TEMP2.TXTsed -i -e 's/^/ /' TEMP2.TXTcat TEMP1.TXT > test/PICTLIST.TXTcat TEMP2.TXT >> test/PICTLIST.TXTecho END >> test/PICTLIST.TXTrm TEMP1.TXT TEMP2.TXTcat test/PICTLIST.TXT# Generate list of images which require registering/autoregistering# VARIANCE-F3G:# DS PolyCam images within the region-of-interest only.awk '/P60/ { print $1 }' lsupport/listG2PolyCamImagesIn100mRegionCenteredOnTAG1 > lsupport/listImagesForRegisteringawk '/P60/ { print $1 }' lsupport/listG3PolyCamImagesIn100mRegionCenteredOnTAG1 >> lsupport/listImagesForRegisteringsed -i -e 's/^/ /' lsupport/listImagesForRegisteringecho END >> lsupport/listImagesForRegistering## END OF VARIANCEcat lsupport/listImagesForRegistering# 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