From ebd93e89db0723107d3bc7f6a0fc1dff3badac29 Mon Sep 17 00:00:00 2001 From: Yousuke Utsumi Date: Mon, 28 Sep 2020 14:13:42 -0700 Subject: [PATCH] add plotCryoSummary --- bin/plotCryoSummary.sh | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 bin/plotCryoSummary.sh diff --git a/bin/plotCryoSummary.sh b/bin/plotCryoSummary.sh new file mode 100755 index 0000000..aed6950 --- /dev/null +++ b/bin/plotCryoSummary.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# +#------------------------------------------------------------------------ +function usage { + cat <<-EOM + Usage ${0##*/} [stopTime] + stopTime ~ 2020-06-19T11:00:41-07:00 + quote time if it contains spaces + Options: + -h (print help msg) + -d [default is 10m] +EOM +exit 1 +} +#-- process commandline options +# +duration= +while getopts "htd:" Option +do + case $Option in + h ) usage;; + d ) duration=$OPTARG;; + t ) timebins="yes";; + * ) ${ECHO} "Unimplemented option chosen.";; # Default. + esac +done +shift $((OPTIND - 1)) + +if [ $# -gt 1 ]; then + usage +fi + +if [ $1"XXX" == "XXX" ] ; then + st="--stop "$(date --iso-8601=s) +else + st="--stop ${1}" +fi + +declare -a regexes +regexes+=('hex/Cryo1/.*Tmp') +regexes+=('hex/Cryo2/.*Tmp') +regexes+=('hex/Cryo3/.*Tmp') +regexes+=('hex/Cryo4/.*Tmp') +regexes+=('hex/Cryo5/.*Tmp') +regexes+=('hex/Cryo6/.*Tmp') + +if [ $duration"XXX" == "XXX" ] ; then + duration=10m +fi + +if [ $timebins ] ; then + timebins='--timebins' +fi + +trender.py ${st} --dur ${duration} ${timebins} --title "Cryo Summary" --plot --layout 3x2 --outside --overlayregex -- "${regexes[@]}"