Test F3G Procedures Block-9 - CAPTURE SCOBJ

############################################################################ #### BLOCK 9 #### CAPTURE SCOBJ ## ## ############################################################################## This block records the current S/C position (SCOBJ) for every Detailed ## Survey PolyCam SUMFILE## 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 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)## stateID: Current state of model, for SCOBJ tracking purposes ## (for example, 0_truth)## blockID: User-specified identifier for typescript textfile name ## (for example, Block-9-CaptureSCOBJ-0_truth)# 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=test#export stateID=0_truth#export stateID=1_nominal#export stateID=2_registeredexport stateID=3_post5cmTile#export stateID=4_post5cmIteration#export stateID=5_finalexport blockID=Block-9-CaptureSCOBJ-${subTestID}-${stateID}# Set-Upcd /SPC_Test/$testID/$dirIDscript# Display user inputsecho $testIDecho $subTestIDecho $dirIDecho $stateIDecho $blockIDdatepwdls -lls -l SUMFILES/P60* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > listSUM# Capture SCOBJecho "`date`: `pwd` SCOBJ_${subTestID}_${stateID}" > scobj_${subTestID}_${stateID}bashwhile read line; do echo -n $line >> scobj_${subTestID}_${stateID} grep SCOBJ SUMFILES/${line}.SUM >> scobj_${subTestID}_${stateID}done < listSUMexitcat scobj_${subTestID}_${stateID}# Capture CZecho "`date`: `pwd` CZ_${subTestID}_${stateID}" > cz_${subTestID}_${stateID}bashwhile read line; do echo -n $line >> cz_${subTestID}_${stateID} grep CZ SUMFILES/${line}.SUM >> cz_${subTestID}_${stateID}done < listSUMexitcat cz_${subTestID}_${stateID}# Log SCOBJ and CZif [ ! -d /SPC_Test/$testID/log ]; then mkdir /SPC_Test/$testID/logfimv scobj_${subTestID}_${stateID} /SPC_Test/$testID/log/mv cz_${subTestID}_${stateID} /SPC_Test/$testID/log/# Block Completedateexit# Save block log# 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