Strabon

changeset 791:c7afd12bf80f DiffDateTime

add parameters to instansiate.sh for query discoverFires.rq
author George Garbis <ggarbis@di.uoa.gr>
date Fri Dec 07 22:26:33 2012 +0200 (2012-12-07)
parents ed62904f3a18
children 5431f2fccf07
files examples/teleios/instantiate.sh
line diff
     1.1 --- a/examples/teleios/instantiate.sh	Fri Dec 07 22:26:01 2012 +0200
     1.2 +++ b/examples/teleios/instantiate.sh	Fri Dec 07 22:26:33 2012 +0200
     1.3 @@ -36,6 +36,8 @@
     1.4  	echo "	-t, --timestamp		: the timestamp to use, e.g., \`2010-08-21T19:50:00'"
     1.5  	echo "	-m, --min_acq_time	: the minimum acquisition time (used in a persistence query only)"
     1.6  	echo "	-M, --max_acq_time	: the maximum acquisition time (used in a discovery query only)"
     1.7 +	echo "	-p, --persistence	: "
     1.8 +	echo "	-r, --repeat_in_persistence	: "
     1.9  	echo
    1.10  	echo "Example run:"
    1.11  	echo "	./instantiate.sh -s MSG1 -t '2010-08-21T19:50:00' -c "DynamicThresholds" -m '2010-08-21T19:50:00' -M '2010-08-21T19:50:00' *.rq"
    1.12 @@ -45,9 +47,12 @@
    1.13  CHAIN=
    1.14  SAT=
    1.15  N_ACQUISITIONS=
    1.16 +N_ACQUISITIONS_PER_HOUR=
    1.17  TIMESTAMP=
    1.18  MIN_ACQ_TIME=
    1.19  MAX_ACQ_TIME=
    1.20 +PERSISTENCE=
    1.21 +REPEAT_IN_PERS= 
    1.22  
    1.23  if test $# -eq 0; then
    1.24  	help
    1.25 @@ -69,10 +74,12 @@
    1.26  			if test "${SENSOR}" = "MSG2"; then
    1.27  				SAT="METEOSAT9"
    1.28  				N_ACQUISITIONS=3.0
    1.29 +				N_ACQUISITIONS_PER_HOUR=5.0
    1.30  			else
    1.31  				SAT="METEOSAT8"
    1.32  				N_ACQUISITIONS=7.0
    1.33 -
    1.34 +				N_ACQUISITIONS_PER_HOUR=13.0 
    1.35 +				
    1.36  				# change MSG1 to MSG1_RSS (for whatever reason NOA uses it :-))
    1.37  				SENSOR="MSG1_RSS"
    1.38  			fi
    1.39 @@ -98,6 +105,16 @@
    1.40  			MAX_ACQ_TIME="${1}"
    1.41  			shift
    1.42  			;;
    1.43 +		-p|--persistence)
    1.44 +			shift
    1.45 +			PERSISTENCE="${1}"
    1.46 +			shift
    1.47 +			;;
    1.48 +		-r|--repeat_in_persistence)
    1.49 +			shift
    1.50 +			REPEAT_IN_PERS="${1}"
    1.51 +			shift
    1.52 +			;;
    1.53  		-*)
    1.54  			echo "${CMD}: unknown option \"${1}\""
    1.55  			help
    1.56 @@ -125,6 +142,10 @@
    1.57  	ARGS="${ARGS} -e 's/ACQUISITIONS_IN_HALF_AN_HOUR/${N_ACQUISITIONS}/g'"
    1.58  fi
    1.59  
    1.60 +if test ! -z "${N_ACQUISITIONS_PER_HOUR}"; then
    1.61 +	ARGS="${ARGS} -e 's/ACQUISITIONS_IN_AN_HOUR/${N_ACQUISITIONS_PER_HOUR}/g'"
    1.62 +fi
    1.63 +
    1.64  if test ! -z "${TIMESTAMP}"; then
    1.65  	ARGS="${ARGS} -e 's/TIMESTAMP/${TIMESTAMP}/g'"
    1.66  fi
    1.67 @@ -137,6 +158,14 @@
    1.68  	ARGS="${ARGS} -e 's/MAX_ACQUISITION_TIME/${MAX_ACQ_TIME}/g'"
    1.69  fi
    1.70  
    1.71 +if test ! -z "${PERSISTENCE}"; then
    1.72 +	ARGS="${ARGS} -e 's/PERSISTENCE/${PERSISTENCE}/g'"
    1.73 +fi
    1.74 +
    1.75 +if test ! -z "${REPEAT_IN_PERS}"; then
    1.76 +	ARGS="${ARGS} -e 's/REPEAT_IN_PERS/${REPEAT_IN_PERS}/g'"
    1.77 +fi
    1.78 +
    1.79  if test -z "${ARGS}"; then
    1.80  	echo "${CMD}: You would be so kind to provide at least one OPTION."
    1.81  	help
    1.82 @@ -148,10 +177,10 @@
    1.83  #echo eval sed ${ARGS} ${@}
    1.84  
    1.85  # check for unbounded variables
    1.86 -GREP_RESULT=`echo "${QUERY}" | egrep -o 'PROCESSING_CHAIN|SENSOR|"SAT"|ACQUISITIONS_IN_HALF_AN_HOUR|TIMESTAMP|MIN_ACQUISITION_TIME|MAX_ACQUISITION_TIME'`
    1.87 +GREP_RESULT=`echo "${QUERY}" | egrep -o 'PROCESSING_CHAIN|SENSOR|"SAT"|ACQUISITIONS_IN_HALF_AN_HOUR|TIMESTAMP|MIN_ACQUISITION_TIME|MAX_ACQUISITION_TIME|PERSISTENCE|REPEAT_IN_PERS'`
    1.88 +
    1.89  if ! test $? -eq 0; then
    1.90  	echo "${QUERY}"
    1.91 -
    1.92  else
    1.93  	echo -e "${CMD}: WARNING: found unbounded variables "$(echo "${GREP_RESULT}"|sort -u)""
    1.94  	echo