Changeset 19038
- Timestamp:
- 06/29/18 11:54:09 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Tools/get_data.sh
r19037 r19038 37 37 # - use get_data.sh for download*.php instead of Send_Data*.sh 38 38 # -> add policy 39 # -> make datacheck switchable 40 # - no datacheck for external 39 41 # - update function for correction 40 42 # - update CU for QLA … … 179 181 # details see https://www.fact-project.org/logbook/showthread.php?tid=5790 180 182 #dch=" AND fR750Cor/fR750Ref >0.93 " 181 dch =" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 "183 dchstd=" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 " 182 184 183 185 # put together where-clause of query … … 191 193 # th cut 192 194 where=$where" AND fThresholdMedian < "$thmax 193 where=$where" "$dch 195 querybase=$from$where 196 197 if [ "$usedch" == "yes" ] 198 then 199 if [ "$dch" == "" ] 200 then 201 querydch=$dchstd 202 else 203 echo "you are using for datacheck: "$dch 204 querydch=$dch 205 fi 206 fi 207 194 208 195 209 if [ $bin -le 0 ] … … 207 221 208 222 # final part of the query 209 querybase=$from$where 210 querybase=$querybase" GROUP BY num " 223 queryend=" GROUP BY num " 211 224 if [ "$ontimelimit" = "" ] 212 225 then 213 query base=$querybase" HAVING SUM("$ontimeif")>1200 ORDER BY num " # 20 min226 queryend=$queryend" HAVING SUM("$ontimeif")>1200 ORDER BY num " # 20 min 214 227 else 215 query base=$querybase" HAVING SUM("$ontimeif")>"$ontimelimit" ORDER BY num "228 queryend=$queryend" HAVING SUM("$ontimeif")>"$ontimelimit" ORDER BY num " 216 229 fi 217 230 … … 227 240 queryint=$queryint" MIN("$thresh") AS thmin, MAX("$thresh") AS thmax, " 228 241 queryint=$queryint" ROUND(AVG("$cufactor"), 1) AS cufactor, ROUND(AVG(fR750Cor), 2) AS R750cor, ROUND(AVG(fR750Ref), 2) AS R750ref " 229 queryint=$queryint" "$querybase 242 queryint=$queryint" "$querybase" "$querydch" "$queryend 230 243 231 244 # for collaborators … … 235 248 querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cuerr", "$fluxerr", " 236 249 querycol=$querycol" "$significance 237 querycol=$querycol" "$querybase 250 querycol=$querycol" "$querybase" "$querydch" "$queryend 238 251 239 252 # external 240 queryext=$querystart" "$excrate", "$deltat", "$excrateerr" "$querybase 253 # no datacheck applied for external files 254 queryext=$querystart" "$excrate", "$deltat", "$excrateerr" "$querybase" "$queryend 241 255 242 256 else … … 248 262 # final part of the query 249 263 querybase=" FROM (SELECT fNight, fZenithDistanceMin AS zdmin, fZenithDistanceMax AS zdmax, "$thresh" AS th, " 250 querybase=$querybase" fR750Cor as R750cor, fR750Ref asR750ref, "$cufactor" AS cufactor, "264 querybase=$querybase" fR750Cor AS R750cor, fR750Ref AS R750ref, "$cufactor" AS cufactor, " 251 265 querybase=$querybase" @ot:="$ontimeif" AS ot, fRunStart AS start, fRunStop AS stop, " 252 266 querybase=$querybase" fNumSigEvts AS sigevts, fNumBgEvts AS bgevts, "$correvts" AS corevts, " … … 287 301 echo "creating "$fileint" ..." 288 302 echo "# This file was created at "`date` > $fileint 289 # add query and policy here 303 echo "# The following query was used: " >> $fileint 304 echo "# "$queryint >> $fileint 305 # add policy here 290 306 fi 291 307 headerint="# "$num" time["$timeunit"] start["$timeunit"] stop["$timeunit"] excrate[evts/h] corr.excrate[evts/h] flux[CU] flux[e-11/cm2/s] delta_time["$timeunit"] ontime[min]" … … 302 318 echo "creating "$filecol" ..." 303 319 echo "# This file was created at "`date` > $filecol 304 # add query and policy here 320 echo "# The following query was used: " >> $filecol 321 echo "# "$querycol >> $filecol 322 # add policy here 305 323 fi 306 324 headercol="# "$num" time["$timeunit"] start["$timeunit"] stop["$timeunit"] excrate[evts/h] corr.excrate[evts/h] flux[CU] flux[e-11/cm2/s] delta_time["$timeunit"] ontime[min]" … … 319 337 echo "creating "$fileext" ..." 320 338 echo "# This file was created at "`date` > $fileext 321 # add query andpolicy here339 # add policy here 322 340 fi 323 341 headerext="# "$num" time["$timeunit"] start["$timeunit"] stop["$timeunit"] excrate[evts/h] delta_time["$timeunit"] excrate_err[evts/h] " … … 391 409 #ontimelimit=30 # 30 min 392 410 ontimelimit= # default 20 min 411 # data quality selection 412 # if you explicitely don't want a datacheck, you can comment the following line 413 usedch="yes" 414 # use your own datacheck instead 415 # use a line like the following defining your own data quality selection cut 416 #dch=" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 " 393 417 394 418 # -------------------------------------------------------------------------------------- #
Note:
See TracChangeset
for help on using the changeset viewer.