Ignore:
Timestamp:
07/26/19 21:43:32 (5 years ago)
Author:
Daniela Dorner
Message:
fixed bug, added uncorrect flux to internal files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Tools/get_data.sh

    r19568 r19569  
    4949# --------
    5050# time: time, delta time, start, stop, ontime
    51 # flux: excrate, excerr, CU, CUerr, corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorerr,
     51# flux: excrate, excerr, CU, CUerr, flux, fluxerr corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorerr,
    5252# other info on flux: signif, cu-factor, num exc, num sig, num bg
    5353# other info: zd th R750cor R750ref
     
    231231   cu=" ROUND("$CU", 2) AS cu"
    232232   cuerr=" ROUND("$CUerr", 2) AS cuerr"
    233    cucor=" ROUND("$CUcor", 2) AS cu"
    234    cucorerr=" ROUND("$CUcorerr", 2) AS cuerr"
     233   cucor=" ROUND("$CUcor", 2) AS cucor"
     234   cucorerr=" ROUND("$CUcorerr", 2) AS cucorerr"
    235235   flux="ROUND("$CU" * "$crabflux", 2) AS flux"
    236236   fluxerr="ROUND("$CUerr" * "$crabflux", 2) AS fluxerr"
     237   fluxcor="ROUND("$CUcor" * "$crabflux", 2) AS fluxcor"
     238   fluxcorerr="ROUND("$CUcorerr" * "$crabflux", 2) AS fluxcorerr"
    237239   # for minute binning
    238240   ontime2=" ROUND(SUM(o.ot)/60., 1) AS ontime"
     
    247249   cu2=" ROUND("$CU2", 2) AS cu"
    248250   cuerr2=" ROUND("$CUerr2", 2) AS cuerr"
    249    cucor2=" ROUND("$CUcor2", 2) AS cu"
    250    cucorerr2=" ROUND("$CUcorerr2", 2) AS cuerr"
     251   cucor2=" ROUND("$CUcor2", 2) AS cucor"
     252   cucorerr2=" ROUND("$CUcorerr2", 2) AS cucorerr"
    251253   flux2="ROUND("$CU2" * "$crabflux", "$fluxprec") AS flux"
    252254   fluxerr2="ROUND("$CUerr2" *"$crabflux", "$fluxprec") AS fluxerr"
     255   fluxcor2="ROUND("$CUcor2" * "$crabflux", "$fluxprec") AS fluxcor"
     256   fluxcorerr2="ROUND("$CUcorerr2" *"$crabflux", "$fluxprec") AS fluxcorerr"
    253257
    254258   case $timeunit in
     
    373377      # internal
    374378      queryint=$querystart
    375       queryint=$queryint" "$excrate", "$cu", "$correxcrate", "$cucor", "$flux", "
     379      queryint=$queryint" "$excrate", "$cu", "$flux", "$correxcrate", "$cucor", "$fluxcor", "
    376380      queryint=$queryint" "$deltat", "$ontime", "
    377       queryint=$queryint" "$excrateerr", "$cuerr", "$correxcrateerr", "$cucorerr", "$fluxerr", "
     381      queryint=$queryint" "$excrateerr", "$cuerr", "$fluxerr", "$correxcrateerr", "$cucorerr", "$fluxcorerr", "
    378382      queryint=$queryint" "$significance", "
    379383      queryint=$queryint" MIN(fNight) AS nightmin, MAX(fNight) AS nightmax, "
     
    386390      # for collaborators
    387391      querycol=$querystart
    388       querycol=$querycol" "$excrate", "$correxcrate", "$cucor", "$flux", "
     392      querycol=$querycol" "$excrate", "$correxcrate", "$cucor", "$fluxcor", "
    389393      querycol=$querycol" "$deltat", "$ontime", "
    390       querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cucorerr", "$fluxerr", "
     394      querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cucorerr", "$fluxcorerr", "
    391395      querycol=$querycol" "$significance
    392396      querycol=$querycol" "$querybase" "$querydch" "$queryend
     
    413417      # internal
    414418      queryint=$querystart
    415       queryint=$queryint" "$excrate2", "$cu2", "$correxcrate2", "$cucor2", "$flux2", "
     419      queryint=$queryint" "$excrate2", "$cu2", "$flux2", "$correxcrate2", "$cucor2", "$fluxcor2", "
    416420      queryint=$queryint" "$deltat2", "$ontime2", "
    417       queryint=$queryint" "$excrateerr2", "$cuerr2", "$correxcrateerr2", "$cucorerr2", "$fluxerr2", "
     421      queryint=$queryint" "$excrateerr2", "$cuerr2", "$fluxerr2", "$correxcrateerr2", "$cucorerr2", "$fluxcorerr2", "
    418422      queryint=$queryint" "$significance2", "
    419423      queryint=$queryint" avg(o.night) AS night, "
     
    425429      # for collaborators
    426430      querycol=$querystart
    427       querycol=$querycol" "$excrate2", "$correxcrate2", "$cu2", "$flux2", "
     431      querycol=$querycol" "$excrate2", "$correxcrate2", "$cu2", "$fluxcor2", "
    428432      querycol=$querycol" "$deltat2", "$ontime2", "
    429       querycol=$querycol" "$excrateerr2", "$correxcrateerr2", "$cuerr2", "$fluxerr2", "
     433      querycol=$querycol" "$excrateerr2", "$correxcrateerr2", "$cuerr2", "$fluxcorerr2", "
    430434      querycol=$querycol" "$significance2
    431435      querycol=$querycol" "$querybase
     
    475479   echo "# $queryint" >> $fileint
    476480   echo "#" >> $fileint
    477    headerint="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] flux[CU] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
    478    headerint=$headerint" excess-rate_error[evts/h] flux_error[CU] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11/cm2/s] significance night num_exc num_sig num_bg "
     481   headerint="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] flux[CU] flux[e-11TeV/cm2/s] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11TeV/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
     482   headerint=$headerint" excess-rate_error[evts/h] flux_error[CU] flux_error[e-11TeV/cm2/s] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11/cm2/s] significance night num_exc num_sig num_bg "
    479483   headerint=$headerint" zdmin zdmax thmin thmax avg(cufactor) avg(R750cor) avg(R750ref) "
    480484   echo $headerint >> $fileint
     
    498502   #echo "# $querycol" >> $filecol
    499503   #echo "#" >> $filecol
    500    headercol="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
    501    headercol=$headercol" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11/cm2/s] significance "
     504   headercol="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] corrected_excess-rate[evts/h] corrected_flux[CU] corrected_flux[e-11TeV/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
     505   headercol=$headercol" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] corrected_flux_error[CU] corrected_flux_error[e-11TeV/cm2/s] significance "
    502506   echo $headercol >> $filecol
    503507   #echo "$querycol"
     
    651655# -------------------------------------------------------------------------------------- #
    652656
     657# some test
     658table="AnalysisResultsRunCutsLC" # CutsLC
     659bin=0
    653660# Mrk 501
     661source=2
     662name="Mrk501_all_P"
     663get_results
     664
     665#exit
     666
     667# LC for ICRC
     668table="AnalysisResultsRunCutsLC" # CutsLC
     669bin=-1
     670# Mrk 421
     671source=1
     672name="Mrk421_all_nightly"
     673get_results
     674# Mrk 501
     675source=2
     676name="Mrk501_all_nightly"
     677get_results
     678# 1959
     679source=7
     680name="1959_all_nightly"
     681get_results
     682
     683# 2344
     684source=3
     685name="2344_all_nightly"
     686get_results
     687
     688# Crab
     689source=5
     690name="Crab_all_nightly"
     691get_results
     692
     693
     694#exit
     695
    654696# Mrk 501
    655697source=2
     
    676718bin=5
    677719get_results
    678 
    679 exit
    680 
    681 # LC for ICRC
    682 table="AnalysisResultsRunCutsLC" # CutsLC
    683 bin=-1
    684 # Mrk 421
    685 source=1
    686 name="Mrk421_all_nightly"
    687 get_results
    688 # Mrk 501
    689 source=2
    690 name="Mrk501_all_nightly"
    691 get_results
    692 # 1959
    693 source=7
    694 name="1959_all_nightly"
    695 get_results
    696 
    697720
    698721exit
Note: See TracChangeset for help on using the changeset viewer.