Changeset 12969 for trunk/DataCheck
- Timestamp:
- 02/29/12 12:30:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/FillAuxData.sh
r12935 r12969 20 20 # trigger rate has as first value -1, but with using the median it should be fine 21 21 22 errlog=/home/fact/SW.automatic.processing/DataCheck/log/error.log 22 # option 23 doupdate="yes" # update all entries (needed when new fields have been added) 24 doupdate="no" # fill only entries which are not yet existing (default) 25 26 source `dirname $0`/Sourcefile.sh 27 printprocesslog "INFO starting $0 with option doupdate="$doupdate 28 29 logfile=$runlogpath"/FillAuxLP-"$datetime".log" 30 date >> $logfile 23 31 24 32 function getfitsstatistics() … … 34 42 max= 35 43 tmpfile=`dirname $0`/`basename $1`.tmp 36 echo "ftcopy $1'[col Time]' - | ftstat - | grep 'mean' | grep -E -o [0-9]+[.] | sed -e 's/[.]//g'" >> $ errlog37 timefromfile=`ftcopy $1'[col Time]' - 2>>$ errlog | ftstat - 2>>$errlog| grep 'mean' | grep -E -o [0-9]+[.] | sed -e 's/[.]//g'`44 echo "ftcopy $1'[col Time]' - | ftstat - | grep 'mean' | grep -E -o [0-9]+[.] | sed -e 's/[.]//g'" >> $logfile 45 timefromfile=`ftcopy $1'[col Time]' - 2>>$logfile | ftstat - 2>>$logfile | grep 'mean' | grep -E -o [0-9]+[.] | sed -e 's/[.]//g'` 38 46 if [ $timefromfile -gt 30000 ] 39 47 then 40 echo "ftcopy $1'[Time - 40587> '${3}' && Time - 40587< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat -" >> $ errlog48 echo "ftcopy $1'[Time - 40587> '${3}' && Time - 40587< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat -" >> $logfile 41 49 #ftcopy $1'[Time - 40587> '${3}' && Time - 40587< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat - 42 ftcopy $1'[Time - 40587> '${3}' && Time - 40587< '${4}' ][col '${2}';Time]' - 2>>$ errlog | ftcopy -'[col '${2}']' - 2>>$errlog | ftstat - 2>>$errlog> $tmpfile43 else 44 echo "ftcopy $1'[Time> '${3}' && Time< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat -" >> $ errlog50 ftcopy $1'[Time - 40587> '${3}' && Time - 40587< '${4}' ][col '${2}';Time]' - 2>>$logfile | ftcopy -'[col '${2}']' - 2>>$logfile | ftstat - 2>>$logfile > $tmpfile 51 else 52 echo "ftcopy $1'[Time> '${3}' && Time< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat -" >> $logfile 45 53 #ftcopy $1'[Time> '${3}' && Time< '${4}' ][col '${2}';Time]' - | ftcopy -'[col '${2}']' - | ftstat - 46 ftcopy $1'[Time> '${3}' && Time< '${4}' ][col '${2}';Time]' - 2>>$ errlog | ftcopy -'[col '${2}']' - 2>>$errlog | ftstat - 2>>$errlog> $tmpfile54 ftcopy $1'[Time> '${3}' && Time< '${4}' ][col '${2}';Time]' - 2>>$logfile | ftcopy -'[col '${2}']' - 2>>$logfile | ftstat - 2>>$logfile > $tmpfile 47 55 fi 48 56 good=`cat $tmpfile | grep 'good' | grep -E -o '[-]?[0-9]+[.]?[0-9]*'` … … 65 73 } 66 74 67 # option68 doupdate="yes" # update all entries (needed when new fields have been added)69 doupdate="no" # fill only entries which are not yet existing (default)70 71 source `dirname $0`/Sourcefile.sh72 printprocesslog "INFO starting $0 with option doupdate="$doupdate73 74 75 # setup to use ftools 75 76 source $HEADAS/headas-init.sh … … 93 94 94 95 # get last 2 nights 95 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"`)96 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` ) 96 97 #dates=( `find $ziprawdata -mindepth 3 -type d | sort | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw 97 98 #echo ${dates[@]} 98 dates=( "2012/02/21" "2012/02/20" "2012/02/19" "2012/02/18" )99 #dates=( "2012/02/21" "2012/02/20" "2012/02/19" "2012/02/18" ) 99 100 printprocesslog "INFO processing the following night(s): "${dates[@]} 101 echo `date`": processing the following night(s): "${dates[@]} 100 102 101 103 # do filling of aux data … … 178 180 do 179 181 printprocesslog "INFO processing file number "$runnumber"_"`printf %03d $filenum` 182 echo `date`": processing file number "$runnumber"_"`printf %03d $filenum` 180 183 # get information from rawfile 181 184 rawfile=$ziprawdata/$date/$runnumber"_"`printf %03d $filenum`.fits.gz
Note:
See TracChangeset
for help on using the changeset viewer.