Test F3F Procedures Block-2A - INGEST IMAGES - TEST-SPECIFIC

############################################################################ #### BLOCK 2A #### INGEST IMAGES - TEST-SPECIFIC #### ############################################################################## This block additionally populates the F3 orig directory's IMAGEFILES/## NOMINALS/ and SUMFILES/ sub-directories with Detailed Survey image files ## which are consistent across sub-tests in readiness for registering## Detailed Survey 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/## base/## IMAGEFILES/## SHAPEFILES/## lsupport/## PICTLIST.TXT## orig/## results/## test/## User has completed the processing steps comprising Block 1A - TEST DIRECTORY ## SET-UP - ORIG## User inputs:## testID: Name of the F3 test directory (for example, F3E-Limbs)## blockID: User-specified identifier for typescript textfile name ## (for example, Block-2A-IngestImages-TestSpecific)# User inputs:export testID=F3F-Photoexport blockID=Block-2A-IngestImages-TestSpecific# Set-Upcd /SPC_Test/$testIDscript# Display user inputsecho $testIDecho $blockIDdatepwdls -l## VARIANCE-F3F:# Populate base/IMAGEFILES/ with symbolic links to Detailed Survey image filesls /SPC_Test/F3-source/G2-DS-MapCam/IMAGEFILES/M60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesG2MapCamwhile read line; doln -s /SPC_Test/F3-source/G2-DS-MapCam/IMAGEFILES/${line}.DAT base/IMAGEFILES/${line}.DATdone < lsupport/listImagesG2MapCamls /SPC_Test/F3-source/H2-DS-PolyCam-Nadir/IMAGEFILES/P60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesH2PolyCamwhile read line; doln -s /SPC_Test/F3-source/H2-DS-PolyCam-Nadir/IMAGEFILES/${line}.DAT base/IMAGEFILES/${line}.DATdone < lsupport/listImagesH2PolyCamls /SPC_Test/F3-source/H3-DS-PolyCam-Stereo-v5/IMAGEFILES/P60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesH3PolyCamwhile read line; doln -s /SPC_Test/F3-source/H3-DS-PolyCam-Stereo-v5/IMAGEFILES/${line}.DAT base/IMAGEFILES/${line}.DATdone < lsupport/listImagesH3PolyCamls -l base/IMAGEFILES/echo "This directory also contains the .DAT files for Detailed Survey MapCam and PolyCam images." >> base/IMAGEFILES/READMEecho "Detailed Survey MapCam images filenames begin M60" >> base/IMAGEFILES/READMEecho "Detailed Survey PolyCam images filenames begin P60" >> base/IMAGEFILES/READMEecho "Baseball Diamond Nadir PolyCam image filenames end H2" >> base/IMAGEFILES/READMEecho "Baseball Diamond Off-Nadir (Stereo) image filenames end H3" >> base/IMAGEFILES/READMEcat base/IMAGEFILES/README# Populate orig/NOMINALS/ with Detailed Survey image nominalsrsync -ha /SPC_Test/F3-source/G2-DS-MapCam/perturbed-NOMINALS/ orig/NOMINALS/rsync -ha /SPC_Test/F3-source/H2-DS-PolyCam-Nadir/perturbed-NOMINALS/ orig/NOMINALS/rsync -ha /SPC_Test/F3-source/H3-DS-PolyCam-Stereo-v5/perturbed-NOMINALS/ orig/NOMINALS/ls -l orig/NOMINALS# Populate orig/SUMFILES/ with Detailed Survey image sumfilesrsync -ha /SPC_Test/F3-source/G2-DS-MapCam/perturbed-SUMFILES/ orig/SUMFILES/rsync -ha /SPC_Test/F3-source/H2-DS-PolyCam-Nadir/perturbed-SUMFILES/ orig/SUMFILES/rsync -ha /SPC_Test/F3-source/H3-DS-PolyCam-Stereo-v5/perturbed-SUMFILES/ orig/SUMFILES/ls -l orig/SUMFILES## END OF VARIANCE# Update orig/PICTLIST.TXTls base/IMAGEFILES/M* | cut -d '/' -f 3 | cut -d '.' -f 1 > orig/PICTLIST.TXTls base/IMAGEFILES/P* | cut -d '/' -f 3 | cut -d '.' -f 1 >> orig/PICTLIST.TXTsed -i -e 's/^/ /' orig/PICTLIST.TXT echo END >> orig/PICTLIST.TXTcat orig/PICTLIST.TXT# Generate list of images which require registering/autoregistering## VARIANCE-F3F:# Images which require registering:# DS MapCam images within the region-of-interest only;# DS PolyCam Nadir images within the region-of-interest only;# DS PolyCam Stereo images within the region-of-interest only.awk '/M60/ { print $1 }' lsupport/listG2MapCamImagesIn100mRegionCenteredOnTAG1 > lsupport/listImagesForRegisteringawk '/P60/ { print $1 }' lsupport/listH2PolyCamImagesIn100mRegionCenteredOnTAG1 >> lsupport/listImagesForRegisteringawk '/P60/ { print $1 }' lsupport/listH3PolyCamImagesIn100mRegionCenteredOnTAG1 >> lsupport/listImagesForRegisteringsed -i -e 's/^/ /' lsupport/listImagesForRegisteringecho END >> lsupport/listImagesForRegistering# Images which require autoregistering:# DS MapCam images within the region-of-interest only.awk '/M60/ { print $1 }' lsupport/listG2MapCamImagesIn100mRegionCenteredOnTAG1 > lsupport/listImagesForAutoRegisteringsed -i -e 's/^/ /' lsupport/listImagesForAutoRegisteringecho END >> lsupport/listImagesForAutoRegistering## END OF VARIANCEcat lsupport/listImagesForRegisteringcat lsupport/listImagesForAutoRegistering# 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