| 1 | #!/bin/bash
|
|---|
| 2 |
|
|---|
| 3 | # ---------------------------------------------------------------- #
|
|---|
| 4 | # README README README README README README README README README #
|
|---|
| 5 | # ---------------------------------------------------------------- #
|
|---|
| 6 | # #
|
|---|
| 7 | # To use this script, you need #
|
|---|
| 8 | # - a computer with access to the FACT database in La Palma #
|
|---|
| 9 | # - a file with the password of a valid mysql-user #
|
|---|
| 10 | # - to define the setup below for #
|
|---|
| 11 | # a) the DB access #
|
|---|
| 12 | # b) the data you want to have #
|
|---|
| 13 | # #
|
|---|
| 14 | # To define the setup, search for SETUP in this script and #
|
|---|
| 15 | # read the details there #
|
|---|
| 16 | # #
|
|---|
| 17 | # Per data request, you get up to 3 files: #
|
|---|
| 18 | # *_internal.dat #
|
|---|
| 19 | # *_collaborators.dat #
|
|---|
| 20 | # *_external.dat (only if binning is 20min or nightly) #
|
|---|
| 21 | # #
|
|---|
| 22 | # Please have in mind that this started as a tool for myself, then #
|
|---|
| 23 | # others started using it. Also the script is not yet finalized. #
|
|---|
| 24 | # In case you find problems and/or have a feature request, please #
|
|---|
| 25 | # send and email to dorner@astro.uni-wuerzburg.de #
|
|---|
| 26 | # #
|
|---|
| 27 | # ---------------------------------------------------------------- #
|
|---|
| 28 | # README README README README README README README README README #
|
|---|
| 29 | # ---------------------------------------------------------------- #
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | # ToDo (notes DD):
|
|---|
| 34 | # ----------------
|
|---|
| 35 | # - do conversion to fluxes using FACT Crab spectrum
|
|---|
| 36 | # - add < 20121212 data for QLA
|
|---|
| 37 | # - new version of zd/th-correction and CU from Aachen when ready
|
|---|
| 38 | # nice-to-have
|
|---|
| 39 | # - add E2dNdE
|
|---|
| 40 | # - functionality to determine start time for seaon-binning
|
|---|
| 41 | # - file as attachment to email for download.php
|
|---|
| 42 |
|
|---|
| 43 | #
|
|---|
| 44 | # content of files (wish list):
|
|---|
| 45 | # -----------------------------
|
|---|
| 46 | # REMARK: keep order of columns to allow for reading with TGraph directly from file: X Y EX EY
|
|---|
| 47 | #
|
|---|
| 48 | # internal
|
|---|
| 49 | # --------
|
|---|
| 50 | # time: time, delta time, start, stop, ontime
|
|---|
| 51 | # flux: excrate, excerr, CU, CUerr, flux, fluxerr corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorerr,
|
|---|
| 52 | # other info on flux: signif, cu-factor, num exc, num sig, num bg
|
|---|
| 53 | # other info: zd th R750cor R750ref
|
|---|
| 54 | #
|
|---|
| 55 | # external (allow only 20min and nightly binning)
|
|---|
| 56 | # --------
|
|---|
| 57 | # time: time, delta time, start, stop
|
|---|
| 58 | # flux: excrate, excerr
|
|---|
| 59 | #
|
|---|
| 60 | # collaborators
|
|---|
| 61 | # -------------
|
|---|
| 62 | # time: time, delta time, start, stop, ontime
|
|---|
| 63 | # flux: excrate, excerr, corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorrerr, significance
|
|---|
| 64 | #
|
|---|
| 65 | # additional information to put:
|
|---|
| 66 | # ------------------------------
|
|---|
| 67 | # timestamp of creation
|
|---|
| 68 | # query (for debugging / answering questions)
|
|---|
| 69 | # policy (adapted for internal/collaborators/external) [define in files to be used also by Send_Data*.sh
|
|---|
| 70 | #
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 | function print_policy()
|
|---|
| 74 | {
|
|---|
| 75 | echo "#"
|
|---|
| 76 | echo "# Data Usage Policy: "
|
|---|
| 77 | if [ "$expert" == "no" ]
|
|---|
| 78 | then
|
|---|
| 79 | echo "# Using data from the FACT Quick Look Analysis, you agree to cite the FACT design"
|
|---|
| 80 | echo "# paper (H. Anderhub et al. JINST 8 P6008) and the quick look analysis website "
|
|---|
| 81 | echo "# (https://fact-project.org/monitoring)."
|
|---|
| 82 | echo "#"
|
|---|
| 83 | echo "# References: "
|
|---|
| 84 | echo "# FACT design paper: http://adsabs.harvard.edu/abs/2013JInst...8P6008A"
|
|---|
| 85 | echo "# http://iopscience.iop.org/1748-0221/8/06/P06008 "
|
|---|
| 86 | echo "# FACT Performance Paper: http://adsabs.harvard.edu/abs/2014JInst...9P0012B"
|
|---|
| 87 | echo "# http://iopscience.iop.org/1748-0221/9/10/P10012"
|
|---|
| 88 | echo "# FACT quick look analysis: https://fact-project.org/monitoring"
|
|---|
| 89 | echo "# http://adsabs.harvard.edu/abs/2015arXiv150202582D"
|
|---|
| 90 | echo "# If you intend to use data or information from this website, please let us know for reference."
|
|---|
| 91 | else
|
|---|
| 92 | echo "# As a member, associated member or collaborator of the FACT Collaboration, you have access to internal information."
|
|---|
| 93 | echo "# Any publication using FACT internal information has to have the full FACT author list."
|
|---|
| 94 | fi
|
|---|
| 95 | echo "#"
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | print_selection()
|
|---|
| 99 | {
|
|---|
| 100 | echo "#"
|
|---|
| 101 | echo "# Your Selection: "
|
|---|
| 102 | sourcename=`mysql --defaults-file=$sqlpw -s -e "SELECT fSourceName FROM Source WHERE fSourceKey="$source`
|
|---|
| 103 | echo "# Source: "$sourcename
|
|---|
| 104 | echo "# Time range: "$nightmin"-"$nightmax
|
|---|
| 105 | echo "# Time format: "$timeunit
|
|---|
| 106 | if [ $bin -lt 0 ]
|
|---|
| 107 | then
|
|---|
| 108 | unit="night(s)"
|
|---|
| 109 | else
|
|---|
| 110 | if [ $bin -eq 0 ]
|
|---|
| 111 | then
|
|---|
| 112 | unit="periods"
|
|---|
| 113 | else
|
|---|
| 114 | unit="minutes"
|
|---|
| 115 | fi
|
|---|
| 116 | fi
|
|---|
| 117 | binning=`echo $bin | sed -e 's/-//'`" "$unit
|
|---|
| 118 | echo "# Binning: "$binning
|
|---|
| 119 | if [ "$expert" != "no" ]
|
|---|
| 120 | then
|
|---|
| 121 | echo "# Additional Internal Selection: "
|
|---|
| 122 | echo "# "`echo $table | sed -e 's/AnalysisResultsRun//'`"-Analysis was used."
|
|---|
| 123 | if [ "$zdmax" != "" ]
|
|---|
| 124 | then
|
|---|
| 125 | echo "# Maximum Zenith Distance: "$zdmax" degree"
|
|---|
| 126 | fi
|
|---|
| 127 | if [ "$thmax" != "" ]
|
|---|
| 128 | then
|
|---|
| 129 | echo "# Maximum Trigger Threshold: "$thmax" DAC counts"
|
|---|
| 130 | fi
|
|---|
| 131 | if [ "$light" != "" ]
|
|---|
| 132 | then
|
|---|
| 133 | echo "# Light Condition Cut: "$lightcut
|
|---|
| 134 | fi
|
|---|
| 135 | if [ "$dust" != "" ]
|
|---|
| 136 | then
|
|---|
| 137 | echo "# Calima Cut: dust < "$dust" ug/cm3"
|
|---|
| 138 | fi
|
|---|
| 139 | if [ "$factorcut" != "" ]
|
|---|
| 140 | then
|
|---|
| 141 | echo "# Factor Cut: zdfactor*thfactor > "$factorcut
|
|---|
| 142 | fi
|
|---|
| 143 | if [ "$usedch" == "yes" ]
|
|---|
| 144 | then
|
|---|
| 145 | echo "# Data quality selection was applied. "
|
|---|
| 146 | if [ "$dch" == "" ]
|
|---|
| 147 | then
|
|---|
| 148 | echo "# Standard data check based on cosmic-ray rate: "$dchstd
|
|---|
| 149 | else
|
|---|
| 150 | echo "# You selected a custom datacheck: "$dch
|
|---|
| 151 | fi
|
|---|
| 152 | fi
|
|---|
| 153 | fi
|
|---|
| 154 | echo "#"
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | function get_results()
|
|---|
| 158 | {
|
|---|
| 159 | # some query parts
|
|---|
| 160 |
|
|---|
| 161 | # these values use the Crab spectrum from HESS 2006
|
|---|
| 162 | # hess 2006 http://www.aanda.org/articles/aa/pdf/2006/39/aa5351-06.pdf
|
|---|
| 163 | # PL.SetParameter(1,-2.63);
|
|---|
| 164 | # PL.SetParameter(0, 3.45e-11);
|
|---|
| 165 | case "$table" in
|
|---|
| 166 | "AnalysisResultsRunISDC")
|
|---|
| 167 | zdfactor="pow(cos(fZenithDistanceMean*PI()/180)*exp(1-cos(fZenithDistanceMean*PI()/180)),4.2)"
|
|---|
| 168 | thfactor="(1.18-IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)*0.00062)"
|
|---|
| 169 | # ETh: 1070 GeV
|
|---|
| 170 | crabflux="1.89"
|
|---|
| 171 | ;;
|
|---|
| 172 | "AnalysisResultsRunCutsLC")
|
|---|
| 173 | zdfactor="pow(cos(fZenithDistanceMean*PI()/180)*exp(1-cos(fZenithDistanceMean*PI()/180)),4.5)"
|
|---|
| 174 | thfactor="(1.37-IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)*0.00118)"
|
|---|
| 175 | # ETh: 785 GeV
|
|---|
| 176 | crabflux="3.14"
|
|---|
| 177 | ;;
|
|---|
| 178 | "AnalysisResultsRunLP")
|
|---|
| 179 | zdfactor="(pow(cos(fZenithDistanceMean*PI()/180),3)+14.8/21.9*pow(sin(2*fZenithDistanceMean*PI()/180),5))"
|
|---|
| 180 | #zdfactor="(1/(pow(cos(fZenithDistanceMean*PI()/180),3)+14.8/21.9*pow(sin(2*fZenithDistanceMean*PI()/180),5)))"
|
|---|
| 181 | thfactor="(1-0.00124/1.21*(fThresholdMinSet-500)*(fThresholdMinSet>=500))"
|
|---|
| 182 | # ETh: 1100 GeV
|
|---|
| 183 | crabflux="1.81"
|
|---|
| 184 | ;;
|
|---|
| 185 | "*")
|
|---|
| 186 | zdfactor="0"
|
|---|
| 187 | thfactor="0"
|
|---|
| 188 | crabflux="0"
|
|---|
| 189 | ;;
|
|---|
| 190 | esac
|
|---|
| 191 |
|
|---|
| 192 | # conversion from crab units to fluxes (if a different value is given in setup
|
|---|
| 193 | if [ "$crabfluxconv" != "" ]
|
|---|
| 194 | then
|
|---|
| 195 | crabflux=$crabfluxconv #e-11
|
|---|
| 196 | fi
|
|---|
| 197 | #echo "crabflux: "$crabflux
|
|---|
| 198 | fluxprec=2
|
|---|
| 199 |
|
|---|
| 200 | # some names and definitions needed several times below
|
|---|
| 201 | # ontime
|
|---|
| 202 | ontime1=" TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn "
|
|---|
| 203 | ontime2=" fOnTimeAfterCuts "
|
|---|
| 204 | ontimeif=" IF(ISNULL(fEffectiveOn), "$ontime2", "$ontime1") "
|
|---|
| 205 | # zd and threshold
|
|---|
| 206 | zenith="fZenithDistance"
|
|---|
| 207 | thresh="IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)"
|
|---|
| 208 | # correction for zd- and th-dependence
|
|---|
| 209 | correvts=" fNumExcEvts/"$zdfactor"/"$thfactor
|
|---|
| 210 | # conversion to CU - stored in each result-table (determined by DD Feb 2019)
|
|---|
| 211 | cufactor="fCU"
|
|---|
| 212 | # some calculations
|
|---|
| 213 | #excerr="ExcErr(SUM(fNumSigEvts), SUM(fNumBgEvts))"
|
|---|
| 214 | excerr="ExcErr(fNumSigEvts, fNumBgEvts)"
|
|---|
| 215 | CU="SUM(fNumExcEvts/"$cufactor")/SUM("$ontimeif")*3600"
|
|---|
| 216 | #CUerr=$excerr"/SUM("$ontimeif")*3600*SUM(fNumExcEvts/"$cufactor")/SUM(fNumExcEvts)"
|
|---|
| 217 | CUerr="SQRT(SUM(POW("$excerr"/"$cufactor",2)))/SUM("$ontimeif")*3600"
|
|---|
| 218 | CUcor="SUM("$correvts"/"$cufactor")/SUM("$ontimeif")*3600"
|
|---|
| 219 | #CUcorerr=$excerr"/SUM("$ontimeif")*3600*SUM("$correvts"/"$cufactor")/SUM(fNumExcEvts)"
|
|---|
| 220 | CUcorerr="SQRT(SUM(POW("$excerr"/"$cufactor"/"$zdfactor"/"$thfactor",2)))/SUM("$ontimeif")*3600"
|
|---|
| 221 | #excerr2="ExcErr(SUM(o.sigevts),SUM(o.bgevts))"
|
|---|
| 222 | excerr2="ExcErr(o.sigevts,o.bgevts)"
|
|---|
| 223 | CU2="SUM((o.sigevts-o.bgevts)/o.cufactor)/SUM(o.ot)*3600"
|
|---|
| 224 | #CUerr2=$excerr2"/SUM(o.ot)*3600*SUM((o.sigevts-o.bgevts)/o.cufactor)/(SUM(o.sigevts)-SUM(o.bgevts))"
|
|---|
| 225 | CUerr2="SQRT(SUM(POW("$excerr2"/o.cufactor,2)))/SUM(o.ot)*3600"
|
|---|
| 226 | #CUcor2="SUM(o.corevts/o.cufactor)/SUM(o.ot)*3600"
|
|---|
| 227 | CUcor2="SUM(o.excevts/o.zdfactor/o.thfactor/o.cufactor)/SUM(o.ot)*3600"
|
|---|
| 228 | #CUcorerr2=$excerr2"/SUM(o.ot)*3600*SUM(o.corevts/o.cufactor)/(SUM(o.sigevts)-SUM(o.bgevts))"
|
|---|
| 229 | CUcorerr2="SQRT(SUM(POW("$excerr2"/o.cufactor/o.zdfactor/o.thfactor,2)))/SUM(o.ot)*3600"
|
|---|
| 230 |
|
|---|
| 231 | #"ROUND(SQRT(SUM(POW(ExcErr(fNumSigEvts, fNumBgEvts)/pow(cos(fZenithDistanceMean*PI()/180)*exp(1-cos(fZenithDistanceMean*PI()/180)),4.5)/(1.37-IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)*0.00118), 2)))/SUM( IF(ISNULL(fEffectiveOn), fOnTimeAfterCuts , TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))*fEffectiveOn ) )*3600, 1)"
|
|---|
| 232 |
|
|---|
| 233 | # columns to be selected
|
|---|
| 234 | # for night-binning
|
|---|
| 235 | ontime=" ROUND(SUM("$ontimeif")/60., 1) AS ontime"
|
|---|
| 236 | excrate=" ROUND(SUM(fNumExcEvts)/SUM("$ontimeif")*3600, 1) AS excrate"
|
|---|
| 237 | significance="ROUND(LiMa(Sum(fNumSigEvts), SUM(fNumBgEvts)), 1) AS significance"
|
|---|
| 238 | numexc="SUM(fNumExcEvts) AS numexc"
|
|---|
| 239 | numsig="SUM(fNumSigEvts) AS numsig"
|
|---|
| 240 | numbg="SUM(fNumBgEvts) AS numbg"
|
|---|
| 241 | #excrateerr=" ROUND("$excerr"/SUM("$ontimeif")*3600, 1) AS excrateerr"
|
|---|
| 242 | excrateerr=" ROUND(ExcErr(SUM(fNumSigEvts), SUM(fNumBgEvts))/SUM("$ontimeif")*3600, 1) AS excrateerr"
|
|---|
| 243 | correxcrate=" ROUND(SUM("$correvts")/SUM("$ontimeif")*3600, 1) AS correxcrate"
|
|---|
| 244 | #correxcrateerr=" ROUND("$excerr"/SUM("$ontimeif")*3600*SUM("$correvts")/SUM(fNumExcEvts), 1) AS correxcrateerr"
|
|---|
| 245 | correxcrateerr=" ROUND(SQRT(SUM(POW("$excerr"/"$zdfactor"/"$thfactor", 2)))/SUM("$ontimeif")*3600, 1) AS correxcrateerr"
|
|---|
| 246 | cu=" ROUND("$CU", 2) AS cu"
|
|---|
| 247 | cuerr=" ROUND("$CUerr", 2) AS cuerr"
|
|---|
| 248 | cucor=" ROUND("$CUcor", 2) AS cucor"
|
|---|
| 249 | cucorerr=" ROUND("$CUcorerr", 2) AS 'cucorerr'"
|
|---|
| 250 | flux="ROUND("$CU" * "$crabflux", 2) AS flux"
|
|---|
| 251 | fluxerr="ROUND("$CUerr" * "$crabflux", 2) AS fluxerr"
|
|---|
| 252 | fluxcor="ROUND("$CUcor" * "$crabflux", 2) AS fluxcor"
|
|---|
| 253 | fluxcorerr="ROUND("$CUcorerr" * "$crabflux", 2) AS fluxcorerr"
|
|---|
| 254 | # for minute binning
|
|---|
| 255 | ontime2=" ROUND(SUM(o.ot)/60., 1) AS ontime"
|
|---|
| 256 | #excrate2=" ROUND((SUM(o.sigevts)-SUM(o.bgevts))/SUM(o.ot)*3600, 1) AS excrate"
|
|---|
| 257 | excrate2=" ROUND((SUM(o.excevts))/SUM(o.ot)*3600, 1) AS excrate"
|
|---|
| 258 | significance2=" ROUND(LiMa(SUM(o.sigevts),SUM(o.bgevts)), 1) AS significance"
|
|---|
| 259 | #numexc2="Sum(o.sigevts-o.bgevts) AS numexc"
|
|---|
| 260 | numexc2="SUM(o.excevts) AS numexc"
|
|---|
| 261 | numsig2="SUM(o.sigevts) AS numsig"
|
|---|
| 262 | numbg2="SUM(o.bgevts) AS numbg"
|
|---|
| 263 | excrateerr2=" ROUND(ExcErr(SUM(o.sigevts),SUM(o.bgevts))/SUM(o.ot)*3600, 1) AS excrateerr"
|
|---|
| 264 | correxcrate2=" ROUND(SUM(o.excevts/o.zdfactor/o.thfactor)/SUM(o.ot)*3600, 1) AS correxcrate"
|
|---|
| 265 | #correxcrateerr2=" ROUND("$excerr2"/SUM(o.ot)*3600*SUM(o.corevts)/(SUM(o.sigevts)-SUM(o.bgevts)), 1) AS correxcrateerr"
|
|---|
| 266 | correxcrateerr2=" ROUND(SQRT(SUM(POW("$excerr2"/o.zdfactor/o.thfactor,2)))/SUM(o.ot)*3600,1) AS correxcrateerr"
|
|---|
| 267 | cu2=" ROUND("$CU2", 2) AS cu"
|
|---|
| 268 | cuerr2=" ROUND("$CUerr2", 2) AS cuerr"
|
|---|
| 269 | cucor2=" ROUND("$CUcor2", 2) AS cucor"
|
|---|
| 270 | cucorerr2=" ROUND("$CUcorerr2", 2) AS 'cucorerr'"
|
|---|
| 271 | flux2="ROUND("$CU2" * "$crabflux", "$fluxprec") AS flux"
|
|---|
| 272 | fluxerr2="ROUND("$CUerr2" *"$crabflux", "$fluxprec") AS fluxerr"
|
|---|
| 273 | fluxcor2="ROUND("$CUcor2" * "$crabflux", "$fluxprec") AS fluxcor"
|
|---|
| 274 | fluxcorerr2="ROUND("$CUcorerr2" *"$crabflux", "$fluxprec") AS fluxcorerr"
|
|---|
| 275 |
|
|---|
| 276 | case $timeunit in
|
|---|
| 277 | mjd) delta="(Mjd(MAX(fRunStop))-Mjd(MIN(fRunStart)))/2"
|
|---|
| 278 | start=" Mjd(MIN(fRunStart)) AS start"
|
|---|
| 279 | stop=" Mjd(MAX(fRunStop)) AS stop"
|
|---|
| 280 | deltat=$delta" AS deltat"
|
|---|
| 281 | time=" Mjd(MIN(fRunStart))+"$delta" AS time"
|
|---|
| 282 | delta2="(Mjd(MAX(o.stop))-Mjd(MIN(o.start)))/2"
|
|---|
| 283 | start2=" Mjd(MIN(o.start)) AS start"
|
|---|
| 284 | stop2=" Mjd(MAX(o.stop)) AS stop"
|
|---|
| 285 | deltat2=$delta2" AS deltat"
|
|---|
| 286 | time2=" Mjd(MIN(o.start))+"$delta2" AS time"
|
|---|
| 287 | ;;
|
|---|
| 288 | unix) delta="(Unix_timestamp(CONVERT_TZ(MAX(fRunStop), '+00:00', 'SYSTEM')) - Unix_timestamp(CONVERT_TZ(MIN(fRunStart), '+00:00', 'SYSTEM')))/2"
|
|---|
| 289 | start="Unix_timestamp(CONVERT_TZ(MIN(fRunStart), '+00:00', 'SYSTEM')) AS start"
|
|---|
| 290 | stop="Unix_timestamp(CONVERT_TZ(MAX(fRunStop), '+00:00', 'SYSTEM')) AS stop"
|
|---|
| 291 | deltat=$delta" AS deltat"
|
|---|
| 292 | time=" Unix_timestamp(CONVERT_TZ(MIN(fRunStart), '+00:00', 'SYSTEM'))+"$delta" AS time"
|
|---|
| 293 | delta2="(Unix_timestamp(CONVERT_TZ(MAX(o.stop), '+00:00', 'SYSTEM')) - Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM')))/2"
|
|---|
| 294 | start2=" Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM')) AS start"
|
|---|
| 295 | stop2=" Unix_timestamp(CONVERT_TZ(MAX(o.stop), '+00:00', 'SYSTEM')) AS stop"
|
|---|
| 296 | deltat2=$delta2" AS deltat"
|
|---|
| 297 | time2=" Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM'))+"$delta2" AS time"
|
|---|
| 298 | ;;
|
|---|
| 299 | *) delta="sec_to_time(time_to_sec(timediff(MAX(fRunStop), MIN(fRunStart)))/2)"
|
|---|
| 300 | start=" MIN(fRunStart) AS start"
|
|---|
| 301 | stop=" MAX(fRunStop) AS stop"
|
|---|
| 302 | deltat=$delta" AS deltat"
|
|---|
| 303 | time=" addtime(MIN(fRunStart), "$delta") AS time"
|
|---|
| 304 | delta2="sec_to_time(time_to_sec(timediff(MAX(o.stop), MIN(o.start)))/2)"
|
|---|
| 305 | start2=" MIN(o.start) AS start"
|
|---|
| 306 | stop2=" MAX(o.stop) AS stop"
|
|---|
| 307 | deltat2=$delta2" AS deltat"
|
|---|
| 308 | time2=" addtime(MIN(o.start), "$delta2") AS time"
|
|---|
| 309 | ;;
|
|---|
| 310 | esac
|
|---|
| 311 |
|
|---|
| 312 | # from and join of query
|
|---|
| 313 | from=" FROM RunInfo LEFT JOIN "$table" USING (fNight, fRunID) "
|
|---|
| 314 |
|
|---|
| 315 | # data check based on artificial trigger rate
|
|---|
| 316 | # details see https://www.fact-project.org/logbook/showthread.php?tid=5790
|
|---|
| 317 | #dch=" AND fR750Cor/fR750Ref >0.93 "
|
|---|
| 318 | dchstd=" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 "
|
|---|
| 319 |
|
|---|
| 320 | # put together where-clause of query
|
|---|
| 321 | # time range and source
|
|---|
| 322 | where=" WHERE fSourceKey="$source" AND fNight BETWEEN "$nightmin" AND "$nightmax
|
|---|
| 323 | where=$where" AND NOT ISNULL(fNumExcEvts) "
|
|---|
| 324 | # some sanity checks
|
|---|
| 325 | where=$where" AND fRunTypeKey=1 "
|
|---|
| 326 | # remove empty rows
|
|---|
| 327 | if [ "$rmemptyrows" == "yes" ]
|
|---|
| 328 | then
|
|---|
| 329 | where=$where" AND NOT ISNULL(fZenithDistanceMean) AND (NOT ISNULL(fThresholdMinSet) OR NOT ISNULL(fThresholdMedian)) AND NOT ISNULL(fCU) "
|
|---|
| 330 | fi
|
|---|
| 331 | # zd cut
|
|---|
| 332 | if [ "$zdmax" != "" ]
|
|---|
| 333 | then
|
|---|
| 334 | where=$where" AND fZenithDistanceMax < "$zdmax
|
|---|
| 335 | fi
|
|---|
| 336 | # th cut
|
|---|
| 337 | if [ "$thmax" != "" ]
|
|---|
| 338 | then
|
|---|
| 339 | where=$where" AND "$thresh" < "$thmax
|
|---|
| 340 | fi
|
|---|
| 341 | # dust cut
|
|---|
| 342 | if [ "$dust" != "" ]
|
|---|
| 343 | then
|
|---|
| 344 | where=$where" AND fTNGDust<"$dust
|
|---|
| 345 | fi
|
|---|
| 346 | # light condition cut
|
|---|
| 347 | if [ "$light" == "nomoon" ]
|
|---|
| 348 | then
|
|---|
| 349 | lightcut=" fZenithDistanceMoon>90"
|
|---|
| 350 | fi
|
|---|
| 351 | if [ "$light" == "dark" ]
|
|---|
| 352 | then
|
|---|
| 353 | lightcut=" fMoonZenithDistance>90 AND fSunZenithDistance>108 "
|
|---|
| 354 | fi
|
|---|
| 355 | if [ "$light" != "" ]
|
|---|
| 356 | then
|
|---|
| 357 | where=$where" AND "$lightcut
|
|---|
| 358 | fi
|
|---|
| 359 | # if [ "$factorcut" != "" ]
|
|---|
| 360 | # then
|
|---|
| 361 | # where=$where" AND ( ("$zdfactor") * ("$thfactor")) > "$factorcut" "
|
|---|
| 362 | # fi
|
|---|
| 363 | querybase=$from$where
|
|---|
| 364 |
|
|---|
| 365 | if [ "$usedch" == "yes" ]
|
|---|
| 366 | then
|
|---|
| 367 | if [ "$dch" == "" ]
|
|---|
| 368 | then
|
|---|
| 369 | querydch=$dchstd
|
|---|
| 370 | else
|
|---|
| 371 | echo "you are using for datacheck: "$dch
|
|---|
| 372 | querydch=$dch
|
|---|
| 373 | fi
|
|---|
| 374 | else
|
|---|
| 375 | querydch=
|
|---|
| 376 | fi
|
|---|
| 377 |
|
|---|
| 378 |
|
|---|
| 379 | if [ $bin -le 0 ]
|
|---|
| 380 | then
|
|---|
| 381 | # first part of the query
|
|---|
| 382 | querystart="SELECT "
|
|---|
| 383 | querystart=$querystart" "$time", "$start", "$stop", "
|
|---|
| 384 | # final part of the query
|
|---|
| 385 | if [ $bin -eq 0 ]
|
|---|
| 386 | then
|
|---|
| 387 | orderby=" ORDER BY fPeriod "
|
|---|
| 388 | #querystart=$querystart" fPeriod AS num, "
|
|---|
| 389 | queryend=" GROUP BY fPeriod "
|
|---|
| 390 | else
|
|---|
| 391 | num=" FLOOR((Mjd(fRunStart)-Mjd("$nightmin")-0.5)/"`echo $bin | sed -e 's/-//'`".) "
|
|---|
| 392 | orderby=" ORDER BY "$num
|
|---|
| 393 | #querystart=$querystart" FLOOR((Mjd(fRunStart)-Mjd("$nightmin")-0.5)/"`echo $bin | sed -e 's/-//'`".) AS num, "
|
|---|
| 394 | queryend=" GROUP BY "$num
|
|---|
| 395 | fi
|
|---|
| 396 | #queryend=" GROUP BY num "
|
|---|
| 397 | if [ "$ontimelimit" = "" ]
|
|---|
| 398 | then
|
|---|
| 399 | queryend=$queryend" HAVING SUM("$ontimeif")>1200 "
|
|---|
| 400 | else
|
|---|
| 401 | queryend=$queryend" HAVING SUM("$ontimeif")>"$ontimelimit
|
|---|
| 402 | fi
|
|---|
| 403 | # if [ "$ontimelimit" = "" ]
|
|---|
| 404 | # then
|
|---|
| 405 | # queryend=$queryend" HAVING abs(cucorerr) < 1 AND SUM("$ontimeif")>1200 ORDER BY "$orderby
|
|---|
| 406 | # else
|
|---|
| 407 | # queryend=$queryend" HAVING abs(cucorerr) < 1 AND SUM("$ontimeif")>"$ontimelimit" ORDER BY "$orderby
|
|---|
| 408 | # fi
|
|---|
| 409 |
|
|---|
| 410 | # internal
|
|---|
| 411 | queryint=$querystart
|
|---|
| 412 | queryint=$queryint" "$excrate", "$cu", "$flux", "$correxcrate", "$cucor", "$fluxcor", "
|
|---|
| 413 | queryint=$queryint" "$deltat", "$ontime", "
|
|---|
| 414 | queryint=$queryint" "$excrateerr", "$cuerr", "$fluxerr", "$correxcrateerr", "$cucorerr", "$fluxcorerr", "
|
|---|
| 415 | queryint=$queryint" "$significance", "
|
|---|
| 416 | queryint=$queryint" MIN(fNight) AS nightmin, MAX(fNight) AS nightmax, "
|
|---|
| 417 | queryint=$queryint" "$numexc", "$numsig", "$numbg", "
|
|---|
| 418 | queryint=$queryint" MIN("$zenith"Min) AS zdmin, MAX("$zenith"Max) AS zdmax, "
|
|---|
| 419 | queryint=$queryint" MIN("$thresh") AS thmin, MAX("$thresh") AS thmax, "
|
|---|
| 420 | queryint=$queryint" ROUND(AVG("$cufactor"), 1) AS cufactor, ROUND(AVG("$zdfactor"), 1) AS zdfactor, ROUND(AVG("$thfactor"), 1) AS thfactor, "
|
|---|
| 421 | queryint=$queryint" ROUND(AVG(fR750Cor), 2) AS R750cor, ROUND(AVG(fR750Ref), 2) AS R750ref "
|
|---|
| 422 | if [ "$factorcut" == "" ]
|
|---|
| 423 | then
|
|---|
| 424 | queryint=$queryint" "$querybase" "$querydch" "$queryend" "$orderby
|
|---|
| 425 | else
|
|---|
| 426 | # queryint=$queryint" "$querybase" "$querydch" "$queryend" "$orderby
|
|---|
| 427 | queryint=$queryint" "$querybase" "$querydch" "$queryend" AND ( zdfactor * thfactor > "$factorcut") "$orderby
|
|---|
| 428 | fi
|
|---|
| 429 |
|
|---|
| 430 | # for collaborators
|
|---|
| 431 | querycol=$querystart
|
|---|
| 432 | querycol=$querycol" "$excrate", "$correxcrate", "$cucor", "$fluxcor", "
|
|---|
| 433 | querycol=$querycol" "$deltat", "$ontime", "
|
|---|
| 434 | querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cucorerr", "$fluxcorerr", "
|
|---|
| 435 | querycol=$querycol" "$significance
|
|---|
| 436 | if [ "$factorcut" == "" ]
|
|---|
| 437 | then
|
|---|
| 438 | querycol=$querycol" "$querybase" "$querydch" "$queryend" "$orderby
|
|---|
| 439 | else
|
|---|
| 440 | # querycol=$querycol" "$querybase" "$querydch" "$queryend" "$orderby
|
|---|
| 441 | querycol=$querycol" "$querybase" "$querydch" "$queryend" AND (AVG("$zdfactor") * AVG("$thfactor") > "$factorcut") "$orderby
|
|---|
| 442 | fi
|
|---|
| 443 |
|
|---|
| 444 | # external
|
|---|
| 445 | # no datacheck applied for external files
|
|---|
| 446 | # no cut on factors
|
|---|
| 447 | queryext=$querystart" "$excrate", "$deltat", "$excrateerr" "$querybase" "$queryend" "$orderby
|
|---|
| 448 |
|
|---|
| 449 | else
|
|---|
| 450 | # first part of the query
|
|---|
| 451 | querystart="SELECT "
|
|---|
| 452 | querystart=$querystart" "$time2", "$start2", "$stop2", "
|
|---|
| 453 |
|
|---|
| 454 | # final part of the query
|
|---|
| 455 | querybase=" FROM (SELECT fNight, fZenithDistanceMin AS zdmin, fZenithDistanceMax AS zdmax, "$thresh" AS th, "
|
|---|
| 456 | querybase=$querybase" fR750Cor AS R750cor, fR750Ref AS R750ref, "$cufactor" AS cufactor, "
|
|---|
| 457 | querybase=$querybase" "$zdfactor" AS zdfactor, "$thfactor" AS thfactor, "
|
|---|
| 458 | querybase=$querybase" @ot:="$ontimeif" AS ot, fRunStart AS start, fRunStop AS stop, "
|
|---|
| 459 | #querybase=$querybase" fNumSigEvts AS sigevts, fNumBgEvts AS bgevts, "$correvts" AS corevts, "
|
|---|
| 460 | querybase=$querybase" fNumSigEvts AS sigevts, fNumBgEvts AS bgevts, fNumExcEvts AS excevts, "
|
|---|
| 461 | querybase=$querybase" IF (@night=fNight AND FLOOR((@os+@ot)/"$bin"./60.)<1, @bl, @bl := @bl + 1) AS block, "
|
|---|
| 462 | querybase=$querybase" IF (@night=fNight AND FLOOR((@os+@ot)/"$bin"./60.)<1, @os:=@os + @ot, @os := @ot) AS os, @night :=fNight AS night "
|
|---|
| 463 | querybase=$querybase$from" CROSS JOIN (SELECT @night :=0, @ot :=0, @os :=0, @bl:=0) PARAMS "
|
|---|
| 464 | querybase=$querybase$where" ORDER BY fRunStart) o GROUP BY block HAVING ontime>0.75*"$bin" ORDER BY 'time'"
|
|---|
| 465 |
|
|---|
| 466 | # internal
|
|---|
| 467 | queryint=$querystart
|
|---|
| 468 | queryint=$queryint" "$excrate2", "$cu2", "$flux2", "$correxcrate2", "$cucor2", "$fluxcor2", "
|
|---|
| 469 | queryint=$queryint" "$deltat2", "$ontime2", "
|
|---|
| 470 | queryint=$queryint" "$excrateerr2", "$cuerr2", "$fluxerr2", "$correxcrateerr2", "$cucorerr2", "$fluxcorerr2", "
|
|---|
| 471 | queryint=$queryint" "$significance2", "
|
|---|
| 472 | #queryint=$queryint" avg(o.night) AS night, "
|
|---|
| 473 | queryint=$queryint" min(o.night) AS nightmin, max(o.night) AS nightmax, "
|
|---|
| 474 | queryint=$queryint" "$numexc2", "$numsig2", "$numbg2", "
|
|---|
| 475 | queryint=$queryint" MIN(o.zdmin) AS zdmin, MAX(o.zdmax) AS zdmax, MIN(o.th) AS thmin, MAX(o.th) AS thmax, "
|
|---|
| 476 | queryint=$queryint" ROUND(AVG(o.cufactor), 1) AS cufactor, ROUND(AVG(o.R750cor), 2) AS R750cor, ROUND(AVG(o.R750ref), 2) AS R750ref "
|
|---|
| 477 | queryint=$queryint" "$querybase
|
|---|
| 478 |
|
|---|
| 479 | # for collaborators
|
|---|
| 480 | querycol=$querystart
|
|---|
| 481 | querycol=$querycol" "$excrate2", "$correxcrate2", "$cu2", "$fluxcor2", "
|
|---|
| 482 | querycol=$querycol" "$deltat2", "$ontime2", "
|
|---|
| 483 | querycol=$querycol" "$excrateerr2", "$correxcrateerr2", "$cuerr2", "$fluxcorerr2", "
|
|---|
| 484 | querycol=$querycol" "$significance2
|
|---|
| 485 | querycol=$querycol" "$querybase
|
|---|
| 486 |
|
|---|
| 487 | # external
|
|---|
| 488 | queryext=$querystart" "$excrate2", "$deltat2", "$ontime2", "$excrateerr2" "$querybase
|
|---|
| 489 |
|
|---|
| 490 | fi
|
|---|
| 491 |
|
|---|
| 492 | # write file for externals only for allowed binnings
|
|---|
| 493 | if [ $bin -eq 20 ] || [ $bin -eq -1 ]
|
|---|
| 494 | then
|
|---|
| 495 | fileext=$datapath"/FACT_preliminary_"$name"_external.dat"
|
|---|
| 496 | if [ "$overwrite" = "yes" ]
|
|---|
| 497 | then
|
|---|
| 498 | if [ "$mode" != "auto" ]
|
|---|
| 499 | then
|
|---|
| 500 | echo "creating "$fileext" ..."
|
|---|
| 501 | fi
|
|---|
| 502 | echo "# This file was created at "`date` > $fileext
|
|---|
| 503 | print_policy >> $fileext
|
|---|
| 504 | fi
|
|---|
| 505 | print_selection >> $fileext
|
|---|
| 506 | headerext="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] (stop-start)/2["$timeunit"] excess-rate_error[evts/h] "
|
|---|
| 507 | echo $headerext >> $fileext
|
|---|
| 508 | #echo "$queryext"
|
|---|
| 509 | mysql --defaults-file=$sqlpw -s -e "$queryext" >> $fileext
|
|---|
| 510 | #mysql --defaults-file=$sqlpw -e "$queryext"
|
|---|
| 511 | fi
|
|---|
| 512 | if [ "$mode" == "auto" ] && [ "$expert" == "no" ]
|
|---|
| 513 | then
|
|---|
| 514 | return
|
|---|
| 515 | fi
|
|---|
| 516 |
|
|---|
| 517 | fileint=$datapath"/FACT_preliminary_"$name"_internal.dat"
|
|---|
| 518 | if [ "$overwrite" = "yes" ]
|
|---|
| 519 | then
|
|---|
| 520 | if [ "$mode" != "auto" ]
|
|---|
| 521 | then
|
|---|
| 522 | echo "creating "$fileint" ..."
|
|---|
| 523 | fi
|
|---|
| 524 | echo "# This file was created at "`date` > $fileint
|
|---|
| 525 | print_policy >> $fileint
|
|---|
| 526 | fi
|
|---|
| 527 | print_selection >> $fileint
|
|---|
| 528 | echo "# The following query was used: " >> $fileint
|
|---|
| 529 | echo "# $queryint" >> $fileint
|
|---|
| 530 | echo "#" >> $fileint
|
|---|
| 531 | headerint="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] flux[CU] flux[e-11ph/cm2/s] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11ph/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
|
|---|
| 532 | headerint=$headerint" excess-rate_error[evts/h] flux_error[CU] flux_error[e-11ph/cm2/s] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11/cm2/s] significance nightmin nightmax num_exc num_sig num_bg "
|
|---|
| 533 | headerint=$headerint" zdmin zdmax thmin thmax avg(cufactor) avg(zdfactor) avg(thfactor) avg(R750cor) avg(R750ref) "
|
|---|
| 534 | echo $headerint >> $fileint
|
|---|
| 535 | #echo "$queryint"
|
|---|
| 536 | mysql --defaults-file=$sqlpw -s -e "$queryint" >> $fileint
|
|---|
| 537 | #mysql --defaults-file=$sqlpw -e "$queryint"
|
|---|
| 538 | if [ "$mode" == "auto" ]
|
|---|
| 539 | then
|
|---|
| 540 | return
|
|---|
| 541 | fi
|
|---|
| 542 |
|
|---|
| 543 | filecol=$datapath"/FACT_preliminary_"$name"_collaborators.dat"
|
|---|
| 544 | if [ "$overwrite" = "yes" ]
|
|---|
| 545 | then
|
|---|
| 546 | echo "creating "$filecol" ..."
|
|---|
| 547 | echo "# This file was created at "`date` > $filecol
|
|---|
| 548 | print_policy >> $filecol
|
|---|
| 549 | fi
|
|---|
| 550 | print_selection >> $filecol
|
|---|
| 551 | #echo "# The following query was used: " >> $filecol
|
|---|
| 552 | #echo "# $querycol" >> $filecol
|
|---|
| 553 | #echo "#" >> $filecol
|
|---|
| 554 | headercol="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11ph/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
|
|---|
| 555 | headercol=$headercol" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11ph/cm2/s] significance "
|
|---|
| 556 | echo $headercol >> $filecol
|
|---|
| 557 | #echo "$querycol"
|
|---|
| 558 | mysql --defaults-file=$sqlpw -s -e "$querycol" >> $filecol
|
|---|
| 559 | #mysql --defaults-file=$sqlpw -e "$querycol
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | # evaluation of command line options (for usage with download.php)
|
|---|
| 563 |
|
|---|
| 564 | if [ ${#@} -eq 15 ]
|
|---|
| 565 | then
|
|---|
| 566 | #get_data.sh $start $stop $source $timebin $email $table $time $expert $dch $zd $th $light $dust $rmemptyrows $factorcut
|
|---|
| 567 | mode="auto"
|
|---|
| 568 | overwrite="yes"
|
|---|
| 569 | # setup for usage with download.php
|
|---|
| 570 | datapath="/home/factwww/dch/data"
|
|---|
| 571 | #datapath="./data"
|
|---|
| 572 | sqlpw=/home/fact/.mysql.pw
|
|---|
| 573 | #sqlpw=/home/fact/.mysql.pw2
|
|---|
| 574 | #host=10.0.100.21
|
|---|
| 575 | #dbname=factdata
|
|---|
| 576 | nightmin=$1
|
|---|
| 577 | nightmax=$2
|
|---|
| 578 | source=$3
|
|---|
| 579 | bin=$4
|
|---|
| 580 | if [ "$bin" == "00" ]
|
|---|
| 581 | then
|
|---|
| 582 | bin=0
|
|---|
| 583 | fi
|
|---|
| 584 | email=$5
|
|---|
| 585 | table=$6
|
|---|
| 586 | timeunit=$7
|
|---|
| 587 | expert=$8
|
|---|
| 588 | usedch=$9 # novalue gives same result as no
|
|---|
| 589 | if [ "${10}" != "novalue" ] && [ "${10}" != "all" ]
|
|---|
| 590 | then
|
|---|
| 591 | zdmax=${10}
|
|---|
| 592 | fi
|
|---|
| 593 | if [ "${11}" != "novalue" ] && [ "${11}" != "all" ]
|
|---|
| 594 | then
|
|---|
| 595 | thmax=${11}
|
|---|
| 596 | fi
|
|---|
| 597 | if [ "${12}" != "novalue" ] && [ "${12}" != "all" ]
|
|---|
| 598 | then
|
|---|
| 599 | light=${12}
|
|---|
| 600 | fi
|
|---|
| 601 | if [ "${13}" != "novalue" ] && [ "${13}" != "all" ]
|
|---|
| 602 | then
|
|---|
| 603 | dust=${13}
|
|---|
| 604 | fi
|
|---|
| 605 | rmemptyrows=${14}
|
|---|
| 606 | if [ "${15}" != "novalue" ] && [ "${15}" != "all" ]
|
|---|
| 607 | then
|
|---|
| 608 | factorcut=${15}
|
|---|
| 609 | fi
|
|---|
| 610 | name=`echo $email | sed -e 's/@/-at-/'`
|
|---|
| 611 | get_results
|
|---|
| 612 |
|
|---|
| 613 | # sending email
|
|---|
| 614 | if [ "$expert" == "yes" ]
|
|---|
| 615 | then
|
|---|
| 616 | cat $fileint | mail -s 'FACT internal data download' -b qla@fact-project.org -r qla@fact-project.org $email
|
|---|
| 617 | else
|
|---|
| 618 | cat $fileext | mail -s 'FACT data download' -b qla@fact-project.org -r qla@fact-project.org $email
|
|---|
| 619 | fi
|
|---|
| 620 |
|
|---|
| 621 | exit
|
|---|
| 622 | fi
|
|---|
| 623 |
|
|---|
| 624 |
|
|---|
| 625 |
|
|---|
| 626 | # -------------------------------------------------------------------------------------- #
|
|---|
| 627 | # SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP SETUP #
|
|---|
| 628 | # -------------------------------------------------------------------------------------- #
|
|---|
| 629 | # #
|
|---|
| 630 | # The lines below define the basic setup for the database and give examples and #
|
|---|
| 631 | # explanations for the various options available. #
|
|---|
| 632 | # The request of the data itself is done with a smaller setup further down. #
|
|---|
| 633 | # #
|
|---|
| 634 | # -------------------------------------------------------------------------------------- #
|
|---|
| 635 | #
|
|---|
| 636 | # ----------
|
|---|
| 637 | # DB SETUP
|
|---|
| 638 | # ----------
|
|---|
| 639 | # path to file with mysql setup (user, password, host, db-name)
|
|---|
| 640 | sqlpw=/home/$USER/.mysql.pw.local
|
|---|
| 641 | sqlpw=/home/$USER/.mysql.pw.ethz.fact
|
|---|
| 642 | #
|
|---|
| 643 | # -------------
|
|---|
| 644 | # BASIC SETUP
|
|---|
| 645 | # -------------
|
|---|
| 646 | # output path
|
|---|
| 647 | path=`dirname $0`
|
|---|
| 648 | datapath=$path"/data"
|
|---|
| 649 | # create directory for data files
|
|---|
| 650 | if ! [ -e $datapath ]
|
|---|
| 651 | then
|
|---|
| 652 | mkdir $datapath
|
|---|
| 653 | fi
|
|---|
| 654 | # time unit
|
|---|
| 655 | #timeunit=timestamp # default
|
|---|
| 656 | #timeunit=unix
|
|---|
| 657 | timeunit=mjd
|
|---|
| 658 | # time binning
|
|---|
| 659 | # positive values: minutes
|
|---|
| 660 | # negative values: days
|
|---|
| 661 | # special case 0: period
|
|---|
| 662 | # for season binning choose -365 and according start date
|
|---|
| 663 | #bin=20 # minutes
|
|---|
| 664 | #bin=0 # period
|
|---|
| 665 | bin=-1 # nightly
|
|---|
| 666 | #bin=-365 # yearly
|
|---|
| 667 | # choose analysis
|
|---|
| 668 | #table="AnalysisResultsAllQLA" # N/A
|
|---|
| 669 | #table="AnalysisResultsRunLP" # QLA
|
|---|
| 670 | #table="AnalysisResultsRunISDC" # ISDC
|
|---|
| 671 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 672 | # time range
|
|---|
| 673 | nightmin=20111115
|
|---|
| 674 | nightmax=20201231
|
|---|
| 675 | # overwrite dataset file?
|
|---|
| 676 | # (useful to combine different binnings in one file -> set to "no")
|
|---|
| 677 | overwrite="yes"
|
|---|
| 678 | # optional: require minimal ontime per bin (default 20 min)
|
|---|
| 679 | #ontimelimit=30 # 30 min
|
|---|
| 680 | ontimelimit= # default 20 min
|
|---|
| 681 | # data quality selection
|
|---|
| 682 | # if you explicitely don't want a datacheck, you can comment the following line
|
|---|
| 683 | usedch="yes"
|
|---|
| 684 | # use your own datacheck instead
|
|---|
| 685 | # use a line like the following defining your own data quality selection cut
|
|---|
| 686 | #dch=" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.3 "
|
|---|
| 687 | # apply additional predefined cuts
|
|---|
| 688 | # light conditions
|
|---|
| 689 | #light="nomoon" # only data with no moon (but twilight allowed)
|
|---|
| 690 | #light="dark" # only dark night data
|
|---|
| 691 | # TNG dust - cut away data with calima
|
|---|
| 692 | #dust=1
|
|---|
| 693 | #dust=10
|
|---|
| 694 | # use different conversion from CU to fluxes
|
|---|
| 695 | #crabfluxconv="2.5"
|
|---|
| 696 | # remove lines which contain NULL (e.g. zd-corrected flux when zd=NULL)
|
|---|
| 697 | rmemptyrows="yes"
|
|---|
| 698 | # remove lines with zdfactor * thfactor > value
|
|---|
| 699 | factorcut=0.3
|
|---|
| 700 |
|
|---|
| 701 |
|
|---|
| 702 | # -------------------------------------------------------------------------------------- #
|
|---|
| 703 | # SETUP - GET YOUR DATA HERE - SETUP - GET YOUR DATA HERE - SETUP - GET YOUR DATA HERE #
|
|---|
| 704 | # -------------------------------------------------------------------------------------- #
|
|---|
| 705 | # #
|
|---|
| 706 | # Adapt the lines below to your needs. #
|
|---|
| 707 | # Overwrite default settings above. #
|
|---|
| 708 | # The data-request is sent with the line 'get_results'. #
|
|---|
| 709 | # Minumum setup: Define source key and name for file. #
|
|---|
| 710 | # The list of source keys can be found at #
|
|---|
| 711 | # https://fact-project.org/run_db/db/printtable.php?fTable=Source&fSortBy=fSourceKEY+ #
|
|---|
| 712 | # More examples can be found further down. #
|
|---|
| 713 | # #
|
|---|
| 714 | # -------------------------------------------------------------------------------------- #
|
|---|
| 715 |
|
|---|
| 716 |
|
|---|
| 717 | datapath=/home/dorner/FACT.analysis/corrected.lcs.for.collaborators/lcs
|
|---|
| 718 |
|
|---|
| 719 | # put your data request here, examples below
|
|---|
| 720 |
|
|---|
| 721 | # LCs for 421 campaign with Astrosat Jan 2019
|
|---|
| 722 | table="AnalysisResultsRunLP"
|
|---|
| 723 | # Mrk 421
|
|---|
| 724 | source=1
|
|---|
| 725 | # nightly
|
|---|
| 726 | bin=-1
|
|---|
| 727 | nightmin=20190109
|
|---|
| 728 | nightmax=20190113
|
|---|
| 729 | name="QLA_Mrk421_nightly_Astrosat-Jan-2019"
|
|---|
| 730 | get_results
|
|---|
| 731 | # 20min
|
|---|
| 732 | bin=20
|
|---|
| 733 | name="QLA_Mrk421_20min_Astrosat-Jan-2019"
|
|---|
| 734 | get_results
|
|---|
| 735 | # 30min
|
|---|
| 736 | bin=30
|
|---|
| 737 | name="QLA_Mrk421_30min_Astrosat-Jan-2019"
|
|---|
| 738 | get_results
|
|---|
| 739 | # 40min
|
|---|
| 740 | bin=40
|
|---|
| 741 | name="QLA_Mrk421_40min_Astrosat-Jan-2019"
|
|---|
| 742 | get_results
|
|---|
| 743 | # 60min
|
|---|
| 744 | bin=60
|
|---|
| 745 | name="QLA_Mrk421_60min_Astrosat-Jan-2019"
|
|---|
| 746 | get_results
|
|---|
| 747 | # 80min
|
|---|
| 748 | bin=80
|
|---|
| 749 | name="QLA_Mrk421_80min_Astrosat-Jan-2019"
|
|---|
| 750 | get_results
|
|---|
| 751 | # 90min
|
|---|
| 752 | bin=90
|
|---|
| 753 | name="QLA_Mrk421_90min_Astrosat-Jan-2019"
|
|---|
| 754 | get_results
|
|---|
| 755 |
|
|---|
| 756 |
|
|---|
| 757 |
|
|---|
| 758 |
|
|---|
| 759 | exit
|
|---|
| 760 |
|
|---|
| 761 | # LCs for SED project 2013
|
|---|
| 762 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 763 | # Mrk 421
|
|---|
| 764 | source=1
|
|---|
| 765 | # nightly
|
|---|
| 766 | bin=-1
|
|---|
| 767 | nightmin=20120901
|
|---|
| 768 | nightmax=20130516
|
|---|
| 769 | name="Mrk421_nightly_SED-project-2013"
|
|---|
| 770 | get_results
|
|---|
| 771 |
|
|---|
| 772 |
|
|---|
| 773 |
|
|---|
| 774 | # LCs for XMM proposal
|
|---|
| 775 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 776 | # Mrk 421
|
|---|
| 777 | source=1
|
|---|
| 778 | # nightly
|
|---|
| 779 | bin=-1
|
|---|
| 780 | nightmin=20111115
|
|---|
| 781 | nightmax=20201231
|
|---|
| 782 | name="Mrk421_nightly_XMM-proposal-2019"
|
|---|
| 783 | get_results
|
|---|
| 784 | # Mrk 501
|
|---|
| 785 | source=2
|
|---|
| 786 | name="Mrk501_nightly_XMM-proposal-2019"
|
|---|
| 787 | get_results
|
|---|
| 788 | # 1959
|
|---|
| 789 | source=7
|
|---|
| 790 | name="1959_nightly_XMM-proposal-2019"
|
|---|
| 791 | get_results
|
|---|
| 792 |
|
|---|
| 793 |
|
|---|
| 794 |
|
|---|
| 795 | # LCs for 421 campaign with Astrosat Jan 2019
|
|---|
| 796 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 797 | # Mrk 421
|
|---|
| 798 | source=1
|
|---|
| 799 | # nightly
|
|---|
| 800 | bin=-1
|
|---|
| 801 | nightmin=20190109
|
|---|
| 802 | nightmax=20190113
|
|---|
| 803 | name="Mrk421_nightly_Astrosat-Jan-2019"
|
|---|
| 804 | get_results
|
|---|
| 805 | # 20min
|
|---|
| 806 | bin=20
|
|---|
| 807 | name="Mrk421_20min_Astrosat-Jan-2019"
|
|---|
| 808 | get_results
|
|---|
| 809 | # 30min
|
|---|
| 810 | bin=30
|
|---|
| 811 | name="Mrk421_30min_Astrosat-Jan-2019"
|
|---|
| 812 | get_results
|
|---|
| 813 | # 40min
|
|---|
| 814 | bin=40
|
|---|
| 815 | name="Mrk421_40min_Astrosat-Jan-2019"
|
|---|
| 816 | get_results
|
|---|
| 817 | # 60min
|
|---|
| 818 | bin=60
|
|---|
| 819 | name="Mrk421_60min_Astrosat-Jan-2019"
|
|---|
| 820 | get_results
|
|---|
| 821 | # 80min
|
|---|
| 822 | bin=80
|
|---|
| 823 | name="Mrk421_80min_Astrosat-Jan-2019"
|
|---|
| 824 | get_results
|
|---|
| 825 | # 90min
|
|---|
| 826 | bin=90
|
|---|
| 827 | name="Mrk421_90min_Astrosat-Jan-2019"
|
|---|
| 828 | get_results
|
|---|
| 829 |
|
|---|
| 830 |
|
|---|
| 831 |
|
|---|
| 832 | # LCs for flaring pattern project
|
|---|
| 833 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 834 | # Mrk 421
|
|---|
| 835 | source=1
|
|---|
| 836 | # nightly
|
|---|
| 837 | bin=-1
|
|---|
| 838 | nightmin=20111115
|
|---|
| 839 | nightmax=20201231
|
|---|
| 840 | name="Mrk421_nightly_Flaring-pattern-project"
|
|---|
| 841 | get_results
|
|---|
| 842 | # 2d
|
|---|
| 843 | bin=-2
|
|---|
| 844 | nightmin=20111115
|
|---|
| 845 | nightmax=20201231
|
|---|
| 846 | name="Mrk421_2day_Flaring-pattern-project"
|
|---|
| 847 | get_results
|
|---|
| 848 |
|
|---|
| 849 |
|
|---|
| 850 |
|
|---|
| 851 | # LCs for ToO-Trigger project
|
|---|
| 852 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 853 | # Mrk 421
|
|---|
| 854 | source=1
|
|---|
| 855 | # nightly for 2019
|
|---|
| 856 | bin=-1
|
|---|
| 857 | nightmin=20190101
|
|---|
| 858 | nightmax=20190630
|
|---|
| 859 | name="Mrk421_nightly_20190101-20190630_ToO-project-2019"
|
|---|
| 860 | get_results
|
|---|
| 861 | # 20 min around flare
|
|---|
| 862 | bin=20
|
|---|
| 863 | nightmin=20190609
|
|---|
| 864 | nightmax=20190612
|
|---|
| 865 | name="Mrk421_20min_20190609-20190612_ToO-project-2019"
|
|---|
| 866 | get_results
|
|---|
| 867 |
|
|---|
| 868 | exit
|
|---|
| 869 |
|
|---|
| 870 | table="AnalysisResultsRunLP" # QLA
|
|---|
| 871 | # Mrk 421
|
|---|
| 872 | source=1
|
|---|
| 873 | # nightly for 2019
|
|---|
| 874 | bin=-1
|
|---|
| 875 | nightmin=20190101
|
|---|
| 876 | nightmax=20190630
|
|---|
| 877 | name="QLA_Mrk421_nightly_20190101-20190630_ToO-project-2019"
|
|---|
| 878 | get_results
|
|---|
| 879 | # 20 min around flare
|
|---|
| 880 | bin=20
|
|---|
| 881 | nightmin=20190609
|
|---|
| 882 | nightmax=20190612
|
|---|
| 883 | name="QLA_Mrk421_20min_20190609-20190612_ToO-project-2019"
|
|---|
| 884 | get_results
|
|---|
| 885 |
|
|---|
| 886 |
|
|---|
| 887 | table="AnalysisResultsRunISDC" # ISDC
|
|---|
| 888 | # Mrk 421
|
|---|
| 889 | source=1
|
|---|
| 890 | # nightly for 2019
|
|---|
| 891 | bin=-1
|
|---|
| 892 | nightmin=20190101
|
|---|
| 893 | nightmax=20190630
|
|---|
| 894 | name="ISDC_Mrk421_nightly_20190101-20190630_ToO-project-2019"
|
|---|
| 895 | get_results
|
|---|
| 896 | # 20 min around flare
|
|---|
| 897 | bin=20
|
|---|
| 898 | nightmin=20190609
|
|---|
| 899 | nightmax=20190612
|
|---|
| 900 | name="ISDC_Mrk421_20min_20190609-20190612_ToO-project-2019"
|
|---|
| 901 | get_results
|
|---|
| 902 |
|
|---|
| 903 |
|
|---|
| 904 | exit
|
|---|
| 905 |
|
|---|
| 906 | # LC for ICRC
|
|---|
| 907 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 908 | bin=-1
|
|---|
| 909 | # Mrk 421
|
|---|
| 910 | source=1
|
|---|
| 911 | name="Mrk421_all_nightly"
|
|---|
| 912 | get_results
|
|---|
| 913 | # Mrk 501
|
|---|
| 914 | source=2
|
|---|
| 915 | name="Mrk501_all_nightly"
|
|---|
| 916 | get_results
|
|---|
| 917 | # 1959
|
|---|
| 918 | source=7
|
|---|
| 919 | name="1959_all_nightly"
|
|---|
| 920 | get_results
|
|---|
| 921 |
|
|---|
| 922 | # 2344
|
|---|
| 923 | source=3
|
|---|
| 924 | name="2344_all_nightly"
|
|---|
| 925 | get_results
|
|---|
| 926 |
|
|---|
| 927 | # Crab
|
|---|
| 928 | source=5
|
|---|
| 929 | name="Crab_all_nightly"
|
|---|
| 930 | get_results
|
|---|
| 931 |
|
|---|
| 932 |
|
|---|
| 933 | exit
|
|---|
| 934 |
|
|---|
| 935 | # Mrk 501
|
|---|
| 936 | source=2
|
|---|
| 937 | zdmax=90
|
|---|
| 938 | thmax=1500
|
|---|
| 939 | # new analysis
|
|---|
| 940 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 941 | nightmin=20140520
|
|---|
| 942 | nightmax=20140930
|
|---|
| 943 | name="Mrk501_nightly_newAnalysis_forHESS"
|
|---|
| 944 | bin=-1
|
|---|
| 945 | get_results
|
|---|
| 946 | name="Mrk501_7d_newAnalysis_forHESS"
|
|---|
| 947 | bin=-7
|
|---|
| 948 | get_results
|
|---|
| 949 | nightmin=20140623
|
|---|
| 950 | nightmax=20140623
|
|---|
| 951 | name="Mrk501_5min_FlareNight_newAnalysis_forHESS"
|
|---|
| 952 | bin=5
|
|---|
| 953 | get_results
|
|---|
| 954 | nightmin=20140622
|
|---|
| 955 | nightmax=20140624
|
|---|
| 956 | name="Mrk501_5min_Flare_newAnalysis_forHESS"
|
|---|
| 957 | bin=5
|
|---|
| 958 | get_results
|
|---|
| 959 |
|
|---|
| 960 | exit
|
|---|
| 961 |
|
|---|
| 962 | # LC for INTEGRAL Proposal
|
|---|
| 963 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 964 | bin=-1
|
|---|
| 965 | # Mrk 421
|
|---|
| 966 | source=1
|
|---|
| 967 | name="Mrk421_all_nightly"
|
|---|
| 968 | get_results
|
|---|
| 969 | # Mrk 501
|
|---|
| 970 | source=2
|
|---|
| 971 | name="Mrk501_all_nightly"
|
|---|
| 972 | get_results
|
|---|
| 973 | # 1959
|
|---|
| 974 | source=7
|
|---|
| 975 | name="1959_all_nightly"
|
|---|
| 976 | get_results
|
|---|
| 977 | # for other INTEGRAL proposal
|
|---|
| 978 | # Mrk 421
|
|---|
| 979 | bin=0
|
|---|
| 980 | source=1
|
|---|
| 981 | name="Mrk421_all_period"
|
|---|
| 982 | get_results
|
|---|
| 983 |
|
|---|
| 984 | exit
|
|---|
| 985 |
|
|---|
| 986 |
|
|---|
| 987 | # Crab
|
|---|
| 988 | source=5
|
|---|
| 989 | nightmin=20121214
|
|---|
| 990 | nightmax=20180418
|
|---|
| 991 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 992 | bin=-1
|
|---|
| 993 | zdmax=30
|
|---|
| 994 | thmax=330
|
|---|
| 995 | name="testCrabnightlycheck"
|
|---|
| 996 | get_results
|
|---|
| 997 |
|
|---|
| 998 | exit
|
|---|
| 999 |
|
|---|
| 1000 | # Crab
|
|---|
| 1001 | source=5
|
|---|
| 1002 | nightmin=20121214
|
|---|
| 1003 | nightmax=20180418
|
|---|
| 1004 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1005 | bin=20
|
|---|
| 1006 | name="testCrab20min"
|
|---|
| 1007 | get_results
|
|---|
| 1008 |
|
|---|
| 1009 | exit
|
|---|
| 1010 |
|
|---|
| 1011 | # Crab
|
|---|
| 1012 | source=5
|
|---|
| 1013 | nightmin=20121214
|
|---|
| 1014 | nightmax=20180418
|
|---|
| 1015 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1016 | bin=-1
|
|---|
| 1017 | name="testCrabnightly"
|
|---|
| 1018 | get_results
|
|---|
| 1019 |
|
|---|
| 1020 | exit
|
|---|
| 1021 |
|
|---|
| 1022 | # Crab
|
|---|
| 1023 | source=5
|
|---|
| 1024 | #nightmin=20121214
|
|---|
| 1025 | #nightmax=20180418
|
|---|
| 1026 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1027 | bin=-1
|
|---|
| 1028 | name="testCraball"
|
|---|
| 1029 | get_results
|
|---|
| 1030 |
|
|---|
| 1031 | exit
|
|---|
| 1032 |
|
|---|
| 1033 |
|
|---|
| 1034 | # Crab
|
|---|
| 1035 | source=5
|
|---|
| 1036 | nightmin=20121214
|
|---|
| 1037 | nightmax=20180418
|
|---|
| 1038 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1039 | bin=60
|
|---|
| 1040 | name="testCrab"
|
|---|
| 1041 | get_results
|
|---|
| 1042 |
|
|---|
| 1043 | exit
|
|---|
| 1044 |
|
|---|
| 1045 |
|
|---|
| 1046 | # for 2344 paper with MAGIC
|
|---|
| 1047 |
|
|---|
| 1048 | source=3
|
|---|
| 1049 | zdmax=90
|
|---|
| 1050 | thmax=1500
|
|---|
| 1051 |
|
|---|
| 1052 | # new analysis
|
|---|
| 1053 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1054 | nightmin=20160618
|
|---|
| 1055 | nightmax=20160815
|
|---|
| 1056 | name="2344_2016flare_newAnalysis"
|
|---|
| 1057 | bin=-7
|
|---|
| 1058 | get_results
|
|---|
| 1059 | overwrite="no"
|
|---|
| 1060 | bin=-28
|
|---|
| 1061 | nightmin=20160816
|
|---|
| 1062 | nightmax=20161031
|
|---|
| 1063 | get_results
|
|---|
| 1064 | overwrite="yes"
|
|---|
| 1065 |
|
|---|
| 1066 | # ISDC analysis
|
|---|
| 1067 | table="AnalysisResultsRunISDC"
|
|---|
| 1068 | nightmin=20160618
|
|---|
| 1069 | nightmax=20160815
|
|---|
| 1070 | name="2344_2016flare_stdAnalysis"
|
|---|
| 1071 | bin=-7
|
|---|
| 1072 | get_results
|
|---|
| 1073 | overwrite="no"
|
|---|
| 1074 | bin=-28
|
|---|
| 1075 | nightmin=20160816
|
|---|
| 1076 | nightmax=20161031
|
|---|
| 1077 | get_results
|
|---|
| 1078 | overwrite="yes"
|
|---|
| 1079 |
|
|---|
| 1080 |
|
|---|
| 1081 | usedch="no"
|
|---|
| 1082 | # new analysis
|
|---|
| 1083 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1084 | nightmin=20160618
|
|---|
| 1085 | nightmax=20160815
|
|---|
| 1086 | name="2344_2016flare_newAnalysis_noDCh"
|
|---|
| 1087 | bin=-7
|
|---|
| 1088 | get_results
|
|---|
| 1089 | overwrite="no"
|
|---|
| 1090 | bin=-28
|
|---|
| 1091 | nightmin=20160816
|
|---|
| 1092 | nightmax=20161031
|
|---|
| 1093 | get_results
|
|---|
| 1094 | overwrite="yes"
|
|---|
| 1095 |
|
|---|
| 1096 | # ISDC analysis
|
|---|
| 1097 | table="AnalysisResultsRunISDC"
|
|---|
| 1098 | nightmin=20160618
|
|---|
| 1099 | nightmax=20160815
|
|---|
| 1100 | name="2344_2016flare_stdAnalysis_noDCh"
|
|---|
| 1101 | bin=-7
|
|---|
| 1102 | get_results
|
|---|
| 1103 | overwrite="no"
|
|---|
| 1104 | bin=-28
|
|---|
| 1105 | nightmin=20160816
|
|---|
| 1106 | nightmax=20161031
|
|---|
| 1107 | get_results
|
|---|
| 1108 | overwrite="yes"
|
|---|
| 1109 |
|
|---|
| 1110 | usedch="yes"
|
|---|
| 1111 |
|
|---|
| 1112 |
|
|---|
| 1113 | exit
|
|---|
| 1114 |
|
|---|
| 1115 | # Mrk 501
|
|---|
| 1116 | source=2
|
|---|
| 1117 | zdmax=90
|
|---|
| 1118 | thmax=1500
|
|---|
| 1119 | # new analysis
|
|---|
| 1120 | table="AnalysisResultsRunCutsLC" # CutsLC
|
|---|
| 1121 | nightmin=20140520
|
|---|
| 1122 | nightmax=20140930
|
|---|
| 1123 | name="Mrk501_nightly_newAnalysis_forHESS"
|
|---|
| 1124 | bin=-1
|
|---|
| 1125 | get_results
|
|---|
| 1126 | name="Mrk501_7d_newAnalysis_forHESS"
|
|---|
| 1127 | bin=-7
|
|---|
| 1128 | get_results
|
|---|
| 1129 | nightmin=20140623
|
|---|
| 1130 | nightmax=20140623
|
|---|
| 1131 | name="Mrk501_5min_FlareNight_newAnalysis_forHESS"
|
|---|
| 1132 | bin=5
|
|---|
| 1133 | get_results
|
|---|
| 1134 | # isdc analysis
|
|---|
| 1135 | thmax=850
|
|---|
| 1136 | table="AnalysisResultsRunISDC"
|
|---|
| 1137 | nightmin=20140520
|
|---|
| 1138 | nightmax=20140930
|
|---|
| 1139 | name="Mrk501_nightly_stdAnalysis_forHESS"
|
|---|
| 1140 | bin=-1
|
|---|
| 1141 | get_results
|
|---|
| 1142 | name="Mrk501_7d_stdAnalysis_forHESS"
|
|---|
| 1143 | bin=-7
|
|---|
| 1144 | get_results
|
|---|
| 1145 | nightmin=20140623
|
|---|
| 1146 | nightmax=20140623
|
|---|
| 1147 | name="Mrk501_5min_FlareNight_stdAnalysis_forHESS"
|
|---|
| 1148 | bin=5
|
|---|
| 1149 | get_results
|
|---|
| 1150 | # qla
|
|---|
| 1151 | thmax=500
|
|---|
| 1152 | table="AnalysisResultsRunLP"
|
|---|
| 1153 | nightmin=20140520
|
|---|
| 1154 | nightmax=20140930
|
|---|
| 1155 | name="Mrk501_nightly_QLA_forHESS"
|
|---|
| 1156 | bin=-1
|
|---|
| 1157 | get_results
|
|---|
| 1158 |
|
|---|
| 1159 | exit
|
|---|
| 1160 |
|
|---|
| 1161 | # 501 MAGIC
|
|---|
| 1162 | source=2
|
|---|
| 1163 | name="Mrk501_2014_forMAGIC"
|
|---|
| 1164 | bin=-1
|
|---|
| 1165 | crabfluxconv="2.87" # using threshold of 830GeV
|
|---|
| 1166 | crabfluxconv="3.01" # using threshold of 830GeV and MAGIC Crab spectrum
|
|---|
| 1167 | nightmin=20140714
|
|---|
| 1168 | nightmax=20140805
|
|---|
| 1169 | get_results
|
|---|
| 1170 |
|
|---|
| 1171 | name="Mrk501_2014_forMAGIC_20min"
|
|---|
| 1172 | bin=20
|
|---|
| 1173 | get_results
|
|---|
| 1174 |
|
|---|
| 1175 |
|
|---|
| 1176 | exit
|
|---|
| 1177 |
|
|---|
| 1178 | bin=30
|
|---|
| 1179 | name="Mrk501_2014_forMAGIC30"
|
|---|
| 1180 | get_results
|
|---|
| 1181 |
|
|---|
| 1182 | bin=0
|
|---|
| 1183 | name="P"
|
|---|
| 1184 | nightmin=20140501
|
|---|
| 1185 | nightmax=20140930
|
|---|
| 1186 | get_results
|
|---|
| 1187 |
|
|---|
| 1188 | bin=20
|
|---|
| 1189 | nightmin=20140623
|
|---|
| 1190 | nightmax=20140623
|
|---|
| 1191 | name="Mrk501_test"
|
|---|
| 1192 | get_results
|
|---|
| 1193 |
|
|---|
| 1194 |
|
|---|
| 1195 | # end script here
|
|---|
| 1196 | exit
|
|---|
| 1197 |
|
|---|
| 1198 |
|
|---|
| 1199 |
|
|---|
| 1200 | #
|
|---|
| 1201 | # more examples
|
|---|
| 1202 | #
|
|---|
| 1203 |
|
|---|
| 1204 | # Mrk 421
|
|---|
| 1205 | source=1
|
|---|
| 1206 | name="Mrk421_nightly"
|
|---|
| 1207 | bin=-1
|
|---|
| 1208 | get_results
|
|---|
| 1209 | name="Mrk421_20min"
|
|---|
| 1210 | bin=20
|
|---|
| 1211 | get_results
|
|---|
| 1212 | name="Mrk421_3d"
|
|---|
| 1213 | bin=-3
|
|---|
| 1214 | get_results
|
|---|
| 1215 | name="Mrk421_10d"
|
|---|
| 1216 | bin=-10
|
|---|
| 1217 | get_results
|
|---|
| 1218 | name="Mrk421_period"
|
|---|
| 1219 | bin=0
|
|---|
| 1220 | get_results
|
|---|
| 1221 |
|
|---|
| 1222 |
|
|---|
| 1223 |
|
|---|
| 1224 | # Mrk 501
|
|---|
| 1225 | source=2
|
|---|
| 1226 | name="Mrk501_nightly"
|
|---|
| 1227 | bin=-1
|
|---|
| 1228 | get_results
|
|---|
| 1229 | name="Mrk501_20min"
|
|---|
| 1230 | bin=20
|
|---|
| 1231 | get_results
|
|---|
| 1232 | name="Mrk501_3d"
|
|---|
| 1233 | bin=-3
|
|---|
| 1234 | get_results
|
|---|
| 1235 | name="Mrk501_10d"
|
|---|
| 1236 | bin=-10
|
|---|
| 1237 | get_results
|
|---|
| 1238 | name="Mrk501_period"
|
|---|
| 1239 | bin=0
|
|---|
| 1240 | get_results
|
|---|
| 1241 |
|
|---|
| 1242 |
|
|---|
| 1243 |
|
|---|
| 1244 | # 2344
|
|---|
| 1245 | source=3
|
|---|
| 1246 | name="2344_nightly"
|
|---|
| 1247 | bin=-1
|
|---|
| 1248 | get_results
|
|---|
| 1249 | name="2344_20min"
|
|---|
| 1250 | bin=20
|
|---|
| 1251 | get_results
|
|---|
| 1252 | name="2344_period"
|
|---|
| 1253 | bin=0
|
|---|
| 1254 | get_results
|
|---|
| 1255 |
|
|---|
| 1256 |
|
|---|
| 1257 |
|
|---|
| 1258 | # 1959
|
|---|
| 1259 | source=7
|
|---|
| 1260 | name="1959_nightly"
|
|---|
| 1261 | bin=-1
|
|---|
| 1262 | get_results
|
|---|
| 1263 | name="1959_20min"
|
|---|
| 1264 | bin=20
|
|---|
| 1265 | get_results
|
|---|
| 1266 | name="1959_period"
|
|---|
| 1267 | bin=0
|
|---|
| 1268 | get_results
|
|---|
| 1269 |
|
|---|
| 1270 |
|
|---|
| 1271 |
|
|---|
| 1272 | # 0323
|
|---|
| 1273 | source=12
|
|---|
| 1274 | name="0323_nightly"
|
|---|
| 1275 | bin=-1
|
|---|
| 1276 | get_results
|
|---|
| 1277 | name="0323_20min"
|
|---|
| 1278 | bin=20
|
|---|
| 1279 | get_results
|
|---|
| 1280 | name="0323_period"
|
|---|
| 1281 | bin=0
|
|---|
| 1282 | get_results
|
|---|
| 1283 |
|
|---|
| 1284 |
|
|---|
| 1285 |
|
|---|
| 1286 | # crab
|
|---|
| 1287 | source=5
|
|---|
| 1288 | name="Crab_nightly"
|
|---|
| 1289 | bin=-1
|
|---|
| 1290 | get_results
|
|---|
| 1291 | name="Crab_20min"
|
|---|
| 1292 | bin=20
|
|---|
| 1293 | get_results
|
|---|
| 1294 | name="Crab_period"
|
|---|
| 1295 | bin=0
|
|---|
| 1296 | get_results
|
|---|
| 1297 | name="Crab_season"
|
|---|
| 1298 | bin=-365
|
|---|
| 1299 | nightmin=20110716
|
|---|
| 1300 | nightmax=20180716
|
|---|
| 1301 | get_results
|
|---|
| 1302 |
|
|---|
| 1303 |
|
|---|
| 1304 |
|
|---|
| 1305 | name="1959_2016"
|
|---|
| 1306 | source=7
|
|---|
| 1307 | bin=-1
|
|---|
| 1308 | nightmin=20160201
|
|---|
| 1309 | nightmax=20161105
|
|---|
| 1310 | get_results
|
|---|
| 1311 |
|
|---|
| 1312 | name="1959_all_variable"
|
|---|
| 1313 | overwrite="no"
|
|---|
| 1314 | source=7
|
|---|
| 1315 | bin=-365
|
|---|
| 1316 | nightmin=20120201
|
|---|
| 1317 | nightmax=20130131
|
|---|
| 1318 | get_results
|
|---|
| 1319 | nightmin=20130201
|
|---|
| 1320 | nightmax=20140131
|
|---|
| 1321 | get_results
|
|---|
| 1322 | nightmin=20140201
|
|---|
| 1323 | nightmax=20150131
|
|---|
| 1324 | get_results
|
|---|
| 1325 | bin=0
|
|---|
| 1326 | nightmin=20150201
|
|---|
| 1327 | nightmax=20160131
|
|---|
| 1328 | get_results
|
|---|
| 1329 | bin=-1
|
|---|
| 1330 | nightmin=20160201
|
|---|
| 1331 | nightmax=20170131
|
|---|
| 1332 | get_results
|
|---|
| 1333 | bin=0
|
|---|
| 1334 | nightmin=20170201
|
|---|
| 1335 | nightmax=20180131
|
|---|
| 1336 | get_results
|
|---|
| 1337 |
|
|---|
| 1338 |
|
|---|
| 1339 |
|
|---|
| 1340 | overwrite="yes"
|
|---|
| 1341 | name="1959_all_variable2"
|
|---|
| 1342 | overwrite="no"
|
|---|
| 1343 | source=7
|
|---|
| 1344 | bin=-365
|
|---|
| 1345 | nightmin=20120201
|
|---|
| 1346 | nightmax=20130131
|
|---|
| 1347 | get_results
|
|---|
| 1348 | nightmin=20130201
|
|---|
| 1349 | nightmax=20140131
|
|---|
| 1350 | get_results
|
|---|
| 1351 | nightmin=20140201
|
|---|
| 1352 | nightmax=20150131
|
|---|
| 1353 | get_results
|
|---|
| 1354 | bin=0
|
|---|
| 1355 | nightmin=20150201
|
|---|
| 1356 | nightmax=20160131
|
|---|
| 1357 | get_results
|
|---|
| 1358 | bin=-1
|
|---|
| 1359 | nightmin=20160201
|
|---|
| 1360 | nightmax=20160817
|
|---|
| 1361 | get_results
|
|---|
| 1362 | bin=0
|
|---|
| 1363 | nightmin=20160818
|
|---|
| 1364 | nightmax=20180131
|
|---|
| 1365 | get_results
|
|---|
| 1366 |
|
|---|
| 1367 |
|
|---|
| 1368 |
|
|---|
| 1369 | overwrite="yes"
|
|---|
| 1370 | bin=0
|
|---|
| 1371 | source=3
|
|---|
| 1372 | name="2344period"
|
|---|
| 1373 | get_results
|
|---|
| 1374 |
|
|---|
| 1375 |
|
|---|
| 1376 |
|
|---|
| 1377 | # flare night (HESS)
|
|---|
| 1378 | name="Mrk501_10min_flarenight"
|
|---|
| 1379 | source=2
|
|---|
| 1380 | bin=10
|
|---|
| 1381 | nightmin=20140623
|
|---|
| 1382 | nightmax=20140623
|
|---|
| 1383 | get_results
|
|---|
| 1384 |
|
|---|
| 1385 |
|
|---|
| 1386 |
|
|---|
| 1387 | # flare night (HESS)
|
|---|
| 1388 | name="Mrk501_5min_flarenight"
|
|---|
| 1389 | source=2
|
|---|
| 1390 | bin=5
|
|---|
| 1391 | nightmin=20140623
|
|---|
| 1392 | nightmax=20140623
|
|---|
| 1393 | get_results
|
|---|
| 1394 |
|
|---|
| 1395 |
|
|---|
| 1396 |
|
|---|
| 1397 |
|
|---|
| 1398 | # full sample
|
|---|
| 1399 | name="Mrk421_all_nightly"
|
|---|
| 1400 | source=1
|
|---|
| 1401 | get_results
|
|---|
| 1402 |
|
|---|
| 1403 | name="Mrk501_all_nightly"
|
|---|
| 1404 | source=2
|
|---|
| 1405 | get_results
|
|---|
| 1406 |
|
|---|
| 1407 | name="1959_all_nightly"
|
|---|
| 1408 | source=7
|
|---|
| 1409 | get_results
|
|---|
| 1410 |
|
|---|
| 1411 | name="2344_all_nightly"
|
|---|
| 1412 | source=3
|
|---|
| 1413 | get_results
|
|---|
| 1414 |
|
|---|
| 1415 |
|
|---|
| 1416 |
|
|---|
| 1417 | name="HESE20160427"
|
|---|
| 1418 | source=19
|
|---|
| 1419 | nightmin=20160425
|
|---|
| 1420 | bin=-10
|
|---|
| 1421 | get_results
|
|---|
| 1422 |
|
|---|
| 1423 | name="AMON20160731"
|
|---|
| 1424 | source=21
|
|---|
| 1425 | nightmin=20160730
|
|---|
| 1426 | bin=-10
|
|---|
| 1427 | get_results
|
|---|
| 1428 |
|
|---|
| 1429 |
|
|---|
| 1430 |
|
|---|