9 # ------------------------------------------------------------------------------------------
 
   11 #                         Utility script to test darkroom time calibration.
 
   13 # ------------------------------------------------------------------------------------------
 
   14 # all data related to interdom time calibration have to be set in the same directory
 
   17 if [ -z $JPP_DIR ]; then
 
   18     echo "Variable JPP_DIR undefined."
 
   22 source $JPP_DIR/setenv.sh $JPP_DIR
 
   27     usage "$script <working directory> <detector file> <inter data directory> <refPMT>"
 
   31         4)      set_variable    PMT             $4;
 
   32                 set_variable    INTERDIR        $3;
 
   34                 set_variable    WORKDIR         $1;;
 
   35         *) fatal "wrong number of arguments!";;
 
   38 set_variable    BASENAME        ${DETX%.detx}
 
   41         cp ${WORKDIR}/${DETX} ${WORKDIR}/${BASENAME}_darkroomCalibration_pmt${PMT}.detx 
 
   45 for FILEPATH in $(ls ${WORKDIR}/${INTERDIR}/); do
 
   46         FILELISTINTER1+=("${WORKDIR}/${INTERDIR}/${FILEPATH}")
 
   48 set_variable   FILELISTINTER2       ${FILELISTINTER1}
 
   53                 -f ${FILELISTINTER2} \
 
   54                 -a ${WORKDIR}/${BASENAME}_darkroomCalibration_pmt${PMT}.detx \