Skip to content

Commit

Permalink
script optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Mar 19, 2021
1 parent 3aec554 commit c404bed
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions CTA.runAnalysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ echo "Telescope multiplicities: LST ${LST} MST ${MST} SST ${SST} SCMST ${SCMST}"
#####################################
# qsub options (priorities)
# _M_ = -; _X_ = " "
QSUBOPT="_M_P_X_cta_high_X__M_js_X_1"
QSUBOPT="_M_P_X_cta_high_X__M_js_X_9"

#####################################
# output directory for script parameter files
Expand Down Expand Up @@ -81,6 +81,8 @@ fi
#
# _180deg = south
# _0deg = north
# (note that not all steps are executed for
# the average AZ bin)
MCAZ=( "" "_180deg" "_0deg" )

##########################################################
Expand Down Expand Up @@ -230,13 +232,10 @@ then
SITE="${SITE}-NSB5x"
fi
EDM="-sq10-LL"
ARRAY=( "subArray.prod5.South.list" )
ARRAY=( "subArray.prod5.South-XST.list" )
# QC
ARRAY=( "subArray.prod5.South-Opt-GArrays.list" )
###
ARRAY=( "subArray.prod5.South-Opt-13MSTsN0SSTs-MX.list" )

if [[ $P2 == *"sub"* ]]; then
ARRAY=( "subArray.prod5.South-Opt-SubArray.list" )
fi
if [[ $P2 == *"moon"* ]]; then
ARRAY=( "subArray.prod5.South-Opt-Top4.list" )
fi
Expand Down Expand Up @@ -283,10 +282,9 @@ NIMAGESMIN=$((SCMST<NIMAGESMIN ? SCMST : NIMAGESMIN))

#####################################
# observing time [h]
# (note that all steps except CUTS and PHYS are done only for 50h)
OBSTIME=( "50h" "5h" "30m" "10m" "10h" "20h" "100h" "500h" "5m" "1m" "2h" )
OBSTIME=( "50h" "5h" "30m" "100s" )
OBSTIME=( "5h" "30m" "100s" )
OBSTIME=( "30m" )
OBSTIME=( "50h" "30m" )

echo "$RUN" "$SITE"
Expand Down Expand Up @@ -399,7 +397,15 @@ do
# loop over all observation times
for ((o = 0; o < ${#OBSTIME[@]}; o++ ))
do
OOTIME=${OBSTIME[$o]}
OOTIME=${OBSTIME[$o]}

# Only the last two steps are run for all observation times
if [[ ${RUN} != "CUTS" ]] && [[ ${OOTIME} != "50h" ]]; then
continue
fi
if [[ ${RUN} != "PHYS" ]] && [[ ${OOTIME} != "50h" ]]; then
continue
fi

##########################################
# loop over all shower directions
Expand Down Expand Up @@ -435,8 +441,11 @@ do
echo "OBSERVINGTIME_H $OOTIME" >> "$PARA"
echo "GETXOFFYOFFAFTERCUTS yes" >> "$PARA"
echo "OFFAXISFINEBINNING $BFINEBINNING" >> "$PARA"
if [[ $RUN == "CUTS" ]] && [[ $OOTIME == "50h" ]]; then
echo "DL2FILLING TRUE" >> "$PARA"
if [[ ${RUN} == "CUTS" ]] && [[ ${OOTIME} == "50h" ]]; then
# echo "DL2FILLING DL2" >> "$PARA"
echo "DL2FILLING FALSE" >> "$PARA"
else
echo "DL2FILLING FALSE" >> "$PARA"
fi

cd ./analysis/
Expand Down

0 comments on commit c404bed

Please sign in to comment.