- Timestamp:
- 09/05/13 14:14:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/Step2a.sh
r16987 r17078 4 4 printprocesslog "INFO starting $0" 5 5 6 if [ "$1" = "" ] 7 then 8 hour=`date +%k` 9 # get date (before 18h there is no new data to be processed) 10 if [ $hour -le 7 ] || [ $hour -ge 19 ] 11 then 12 datepaths=( `date --date="-19HOUR" +%Y/%m/%d` ) 6 # get dates 7 if [ "$certaindate" != "" ] 8 then 9 getdates $certaindate 10 else 11 if [ "$1" = "" ] 12 then 13 # get all night 14 #getdates "all" 15 # get last 6 nights 16 getdates 6 13 17 else 14 datepaths=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \ 15 `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \ 16 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \ 17 ) 18 getdates $1 18 19 fi 19 #datepaths=( `find -L $datapath/star -mindepth 3 -type d | sort -r | sed "s/\${datapath_for_sed}\/star//g" | sed -e 's/^\///'` ) #all available dates in star-directory20 else21 datepaths=( $1 )22 20 fi 23 21 24 for datepath in ${datepaths[@]} 22 23 24 for date in ${dates[@]} 25 25 do 26 printprocesslog "INFO processing "$date path27 #echo "INFO processing "$date path28 night=`echo $date path| sed -e 's/\///g'`26 printprocesslog "INFO processing "$date 27 #echo "INFO processing "$date 28 night=`echo $date | sed -e 's/\///g'` 29 29 30 30 numganymeds=0 31 31 32 32 # getting all image files for this night 33 printprocesslog "INFO get file list for night "$date path34 files=( `find $anapath/star/$date path-type f -name '*_I.root' 2>/dev/null | sort` )33 printprocesslog "INFO get file list for night "$date 34 files=( `find $anapath/star/$date -type f -name '*_I.root' 2>/dev/null | sort` ) 35 35 if [ ${#files[@]} -eq 0 ] 36 36 then 37 printprocesslog "INFO no image files available for night "$date path37 printprocesslog "INFO no image files available for night "$date 38 38 continue 39 39 fi 40 40 # write data set file 41 #dspath=$anapath/$source/datasets`printf %03d $min`min/$date path42 #dspath=$anapath/$source/datasets_run/$date path43 dspath=$anapath/datasets_run/$date path41 #dspath=$anapath/$source/datasets`printf %03d $min`min/$date 42 #dspath=$anapath/$source/datasets_run/$date 43 dspath=$anapath/datasets_run/$date 44 44 makedir $dspath 45 45 … … 76 76 night=`basename ${files[$i-1]} | cut -d_ -f1` 77 77 runid=`basename ${files[$i-1]} | cut -d_ -f2 | cut -d. -f1` 78 drivefile=$auxdata"/"$date path"/"`basename ${files[$i-1]} | cut -d_ -f1`".DRIVE_CONTROL_SOURCE_POSITION.fits"79 rawfilepath=$rawdata"/"$date path"/"78 drivefile=$auxdata"/"$date"/"`basename ${files[$i-1]} | cut -d_ -f1`".DRIVE_CONTROL_SOURCE_POSITION.fits" 79 rawfilepath=$rawdata"/"$date"/" 80 80 rawfilename=`basename ${files[$i-1]} | sed -e 's/_I.root/.fits/'` 81 81 rawfile=`find $rawfilepath -name $rawfilename* 2>/dev/null`
Note:
See TracChangeset
for help on using the changeset viewer.