Ignore:
Timestamp:
07/24/19 12:52:59 (5 years ago)
Author:
Daniela Dorner
Message:
added uncorrected CU for internal files
File:
1 edited

Legend:

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

    r19562 r19568  
    4949# --------
    5050# time: time, delta time, start, stop, ontime
    51 # flux: excrate, excerr, corrate, corerr, CU CUerr, flux, fluxerr,
     51# flux: excrate, excerr, CU, CUerr,  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
     
    6161# -------------
    6262# time: time, delta time, start, stop, ontime
    63 # flux: excrate, excerr, corrate, corerr, flux, flux-err, significance
     63# flux: excrate, excerr, corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorrerr, significance
    6464#
    6565# additional information to put:
     
    208208   # some calculations
    209209   excerr="ExcErr(Sum(fNumSigEvts), SUM(fNumBgEvts))"
    210    CU="SUM("$correvts"/"$cufactor")/SUM("$ontimeif")*3600"
    211    CUerr=$excerr"/SUM("$ontimeif")*3600*SUM("$correvts"/"$cufactor")/SUM(fNumExcEvts)"
     210   CU="SUM(fNumExcEvts/"$cufactor")/SUM("$ontimeif")*3600"
     211   CUerr=$excerr"/SUM("$ontimeif")*3600*SUM(fNumExcEvts/"$cufactor")/SUM(fNumExcEvts)"
     212   CUcor="SUM("$correvts"/"$cufactor")/SUM("$ontimeif")*3600"
     213   CUcorerr=$excerr"/SUM("$ontimeif")*3600*SUM("$correvts"/"$cufactor")/SUM(fNumExcEvts)"
    212214   excerr2="ExcErr(SUM(o.sigevts),SUM(o.bgevts))"
    213    CU2="SUM(o.corevts/o.cufactor)/SUM(o.ot)*3600"
    214    CUerr2=$excerr2"/SUM(o.ot)*3600*SUM(o.corevts/o.cufactor)/(SUM(o.sigevts)-SUM(o.bgevts))"
     215   CU2="SUM((o.sigevts-o.bgevts)/o.cufactor)/SUM(o.ot)*3600"
     216   CUerr2=$excerr2"/SUM(o.ot)*3600*SUM((o.sigevts-o.bgevts)/o.cufactor)/(SUM(o.sigevts)-SUM(o.bgevts))"
     217   CUcor2="SUM(o.corevts/o.cufactor)/SUM(o.ot)*3600"
     218   CUcorerr2=$excerr2"/SUM(o.ot)*3600*SUM(o.corevts/o.cufactor)/(SUM(o.sigevts)-SUM(o.bgevts))"
    215219   
    216220   # columns to be selected
     
    227231   cu=" ROUND("$CU", 2) AS cu"
    228232   cuerr=" ROUND("$CUerr", 2) AS cuerr"
     233   cucor=" ROUND("$CUcor", 2) AS cu"
     234   cucorerr=" ROUND("$CUcorerr", 2) AS cuerr"
    229235   flux="ROUND("$CU" * "$crabflux", 2) AS flux"
    230236   fluxerr="ROUND("$CUerr" * "$crabflux", 2) AS fluxerr"
     
    241247   cu2=" ROUND("$CU2", 2) AS cu"
    242248   cuerr2=" ROUND("$CUerr2", 2) AS cuerr"
     249   cucor2=" ROUND("$CUcor2", 2) AS cu"
     250   cucorerr2=" ROUND("$CUcorerr2", 2) AS cuerr"
    243251   flux2="ROUND("$CU2" * "$crabflux", "$fluxprec") AS flux"
    244252   fluxerr2="ROUND("$CUerr2" *"$crabflux", "$fluxprec") AS fluxerr"
     
    365373      # internal
    366374      queryint=$querystart
    367       queryint=$queryint" "$excrate", "$correxcrate", "$cu", "$flux", "
     375      queryint=$queryint" "$excrate", "$cu", "$correxcrate", "$cucor", "$flux", "
    368376      queryint=$queryint" "$deltat", "$ontime", "
    369       queryint=$queryint" "$excrateerr", "$correxcrateerr", "$cuerr", "$fluxerr", "
     377      queryint=$queryint" "$excrateerr", "$cuerr", "$correxcrateerr", "$cucorerr", "$fluxerr", "
    370378      queryint=$queryint" "$significance", "
    371379      queryint=$queryint" MIN(fNight) AS nightmin, MAX(fNight) AS nightmax, "
     
    378386      # for collaborators
    379387      querycol=$querystart
    380       querycol=$querycol" "$excrate", "$correxcrate", "$cu", "$flux", "
     388      querycol=$querycol" "$excrate", "$correxcrate", "$cucor", "$flux", "
    381389      querycol=$querycol" "$deltat", "$ontime", "
    382       querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cuerr", "$fluxerr", "
     390      querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cucorerr", "$fluxerr", "
    383391      querycol=$querycol" "$significance
    384392      querycol=$querycol" "$querybase" "$querydch" "$queryend
     
    405413      # internal
    406414      queryint=$querystart
    407       queryint=$queryint" "$excrate2", "$correxcrate2", "$cu2", "$flux2", "
     415      queryint=$queryint" "$excrate2", "$cu2", "$correxcrate2", "$cucor2", "$flux2", "
    408416      queryint=$queryint" "$deltat2", "$ontime2", "
    409       queryint=$queryint" "$excrateerr2", "$correxcrateerr2", "$cuerr2", "$fluxerr2", "
     417      queryint=$queryint" "$excrateerr2", "$cuerr2", "$correxcrateerr2", "$cucorerr2", "$fluxerr2", "
    410418      queryint=$queryint" "$significance2", "
    411419      queryint=$queryint" avg(o.night) AS night, "
     
    467475   echo "# $queryint" >> $fileint
    468476   echo "#" >> $fileint
    469    headerint="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] corrected_excess-rate[evts/h] flux[CU] flux[e-11/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
    470    headerint=$headerint" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] flux_error[CU] flux_error[e-11/cm2/s] significance night num_exc num_sig num_bg "
     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 "
    471479   headerint=$headerint" zdmin zdmax thmin thmax avg(cufactor) avg(R750cor) avg(R750ref) "
    472480   echo $headerint >> $fileint
     
    490498   #echo "# $querycol" >> $filecol
    491499   #echo "#" >> $filecol
    492    headercol="# time["$timeunit"] start["$timeunit"] stop["$timeunit"] excess-rate[evts/h] corrected_excess-rate[evts/h] flux[CU] flux[e-11/cm2/s] (stop-start)/2["$timeunit"] ontime[min]"
    493    headercol=$headercol" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] flux_error[CU] flux_error[e-11/cm2/s] significance "
     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 "
    494502   echo $headercol >> $filecol
    495503   #echo "$querycol"
     
    643651# -------------------------------------------------------------------------------------- #
    644652
    645 
    646 # LC for INTEGRAL Proposal
    647 table="AnalysisResultsRunCutsLC" # CutsLC
    648 bin=-1
    649 # Mrk 421
    650 source=1
    651 name="Mrk421_all_nightly"
    652 get_results
    653653# Mrk 501
    654 source=2
    655 name="Mrk501_all_nightly"
    656 get_results
    657 # 1959
    658 source=7
    659 name="1959_all_nightly"
    660 get_results
    661 # for other INTEGRAL proposal
    662 # Mrk 421
    663 bin=0
    664 source=1
    665 name="Mrk421_all_period"
    666 get_results
    667 
    668 exit
    669 
    670 
    671 # Crab
    672 source=5
    673 nightmin=20121214
    674 nightmax=20180418
    675 table="AnalysisResultsRunCutsLC" # CutsLC
    676 bin=-1
    677 zdmax=30
    678 thmax=330
    679 name="testCrabnightlycheck"
    680 get_results
    681 
    682 exit
    683 
    684 # Crab
    685 source=5
    686 nightmin=20121214
    687 nightmax=20180418
    688 table="AnalysisResultsRunCutsLC" # CutsLC
    689 bin=20
    690 name="testCrab20min"
    691 get_results
    692 
    693 exit
    694 
    695 # Crab
    696 source=5
    697 nightmin=20121214
    698 nightmax=20180418
    699 table="AnalysisResultsRunCutsLC" # CutsLC
    700 bin=-1
    701 name="testCrabnightly"
    702 get_results
    703 
    704 exit
    705 
    706 # Crab
    707 source=5
    708 #nightmin=20121214
    709 #nightmax=20180418
    710 table="AnalysisResultsRunCutsLC" # CutsLC
    711 bin=-1
    712 name="testCraball"
    713 get_results
    714 
    715 exit
    716 
    717 
    718 # Crab
    719 source=5
    720 nightmin=20121214
    721 nightmax=20180418
    722 table="AnalysisResultsRunCutsLC" # CutsLC
    723 bin=60
    724 name="testCrab"
    725 get_results
    726 
    727 exit
    728 
    729 
    730 # Mrk 501
    731 source=2
    732 zdmax=90
    733 thmax=1500
    734 # new analysis
    735 table="AnalysisResultsRunCutsLC" # CutsLC
    736 nightmin=20140622
    737 nightmax=20140624
    738 name="Mrk501_5min_Flare_newAnalysis_forHESS"
    739 bin=5
    740 get_results
    741 
    742 exit
    743 
    744 # for 2344 paper with MAGIC
    745 
    746 source=3
    747 zdmax=90
    748 thmax=1500
    749 
    750 # new analysis
    751 table="AnalysisResultsRunCutsLC" # CutsLC
    752 nightmin=20160618
    753 nightmax=20160815
    754 name="2344_2016flare_newAnalysis"
    755 bin=-7
    756 get_results
    757 overwrite="no"
    758 bin=-28
    759 nightmin=20160816
    760 nightmax=20161031
    761 get_results
    762 overwrite="yes"
    763 
    764 # ISDC analysis
    765 table="AnalysisResultsRunISDC"
    766 nightmin=20160618
    767 nightmax=20160815
    768 name="2344_2016flare_stdAnalysis"
    769 bin=-7
    770 get_results
    771 overwrite="no"
    772 bin=-28
    773 nightmin=20160816
    774 nightmax=20161031
    775 get_results
    776 overwrite="yes"
    777 
    778 
    779 usedch="no"
    780 # new analysis
    781 table="AnalysisResultsRunCutsLC" # CutsLC
    782 nightmin=20160618
    783 nightmax=20160815
    784 name="2344_2016flare_newAnalysis_noDCh"
    785 bin=-7
    786 get_results
    787 overwrite="no"
    788 bin=-28
    789 nightmin=20160816
    790 nightmax=20161031
    791 get_results
    792 overwrite="yes"
    793 
    794 # ISDC analysis
    795 table="AnalysisResultsRunISDC"
    796 nightmin=20160618
    797 nightmax=20160815
    798 name="2344_2016flare_stdAnalysis_noDCh"
    799 bin=-7
    800 get_results
    801 overwrite="no"
    802 bin=-28
    803 nightmin=20160816
    804 nightmax=20161031
    805 get_results
    806 overwrite="yes"
    807 
    808 usedch="yes"
    809 
    810 
    811 exit
    812 
    813654# Mrk 501
    814655source=2
     
    830671bin=5
    831672get_results
     673nightmin=20140622
     674nightmax=20140624
     675name="Mrk501_5min_Flare_newAnalysis_forHESS"
     676bin=5
     677get_results
     678
     679exit
     680
     681# LC for ICRC
     682table="AnalysisResultsRunCutsLC" # CutsLC
     683bin=-1
     684# Mrk 421
     685source=1
     686name="Mrk421_all_nightly"
     687get_results
     688# Mrk 501
     689source=2
     690name="Mrk501_all_nightly"
     691get_results
     692# 1959
     693source=7
     694name="1959_all_nightly"
     695get_results
     696
     697
     698exit
     699
     700# LC for INTEGRAL Proposal
     701table="AnalysisResultsRunCutsLC" # CutsLC
     702bin=-1
     703# Mrk 421
     704source=1
     705name="Mrk421_all_nightly"
     706get_results
     707# Mrk 501
     708source=2
     709name="Mrk501_all_nightly"
     710get_results
     711# 1959
     712source=7
     713name="1959_all_nightly"
     714get_results
     715# for other INTEGRAL proposal
     716# Mrk 421
     717bin=0
     718source=1
     719name="Mrk421_all_period"
     720get_results
     721
     722exit
     723
     724
     725# Crab
     726source=5
     727nightmin=20121214
     728nightmax=20180418
     729table="AnalysisResultsRunCutsLC" # CutsLC
     730bin=-1
     731zdmax=30
     732thmax=330
     733name="testCrabnightlycheck"
     734get_results
     735
     736exit
     737
     738# Crab
     739source=5
     740nightmin=20121214
     741nightmax=20180418
     742table="AnalysisResultsRunCutsLC" # CutsLC
     743bin=20
     744name="testCrab20min"
     745get_results
     746
     747exit
     748
     749# Crab
     750source=5
     751nightmin=20121214
     752nightmax=20180418
     753table="AnalysisResultsRunCutsLC" # CutsLC
     754bin=-1
     755name="testCrabnightly"
     756get_results
     757
     758exit
     759
     760# Crab
     761source=5
     762#nightmin=20121214
     763#nightmax=20180418
     764table="AnalysisResultsRunCutsLC" # CutsLC
     765bin=-1
     766name="testCraball"
     767get_results
     768
     769exit
     770
     771
     772# Crab
     773source=5
     774nightmin=20121214
     775nightmax=20180418
     776table="AnalysisResultsRunCutsLC" # CutsLC
     777bin=60
     778name="testCrab"
     779get_results
     780
     781exit
     782
     783
     784# for 2344 paper with MAGIC
     785
     786source=3
     787zdmax=90
     788thmax=1500
     789
     790# new analysis
     791table="AnalysisResultsRunCutsLC" # CutsLC
     792nightmin=20160618
     793nightmax=20160815
     794name="2344_2016flare_newAnalysis"
     795bin=-7
     796get_results
     797overwrite="no"
     798bin=-28
     799nightmin=20160816
     800nightmax=20161031
     801get_results
     802overwrite="yes"
     803
     804# ISDC analysis
     805table="AnalysisResultsRunISDC"
     806nightmin=20160618
     807nightmax=20160815
     808name="2344_2016flare_stdAnalysis"
     809bin=-7
     810get_results
     811overwrite="no"
     812bin=-28
     813nightmin=20160816
     814nightmax=20161031
     815get_results
     816overwrite="yes"
     817
     818
     819usedch="no"
     820# new analysis
     821table="AnalysisResultsRunCutsLC" # CutsLC
     822nightmin=20160618
     823nightmax=20160815
     824name="2344_2016flare_newAnalysis_noDCh"
     825bin=-7
     826get_results
     827overwrite="no"
     828bin=-28
     829nightmin=20160816
     830nightmax=20161031
     831get_results
     832overwrite="yes"
     833
     834# ISDC analysis
     835table="AnalysisResultsRunISDC"
     836nightmin=20160618
     837nightmax=20160815
     838name="2344_2016flare_stdAnalysis_noDCh"
     839bin=-7
     840get_results
     841overwrite="no"
     842bin=-28
     843nightmin=20160816
     844nightmax=20161031
     845get_results
     846overwrite="yes"
     847
     848usedch="yes"
     849
     850
     851exit
     852
     853# Mrk 501
     854source=2
     855zdmax=90
     856thmax=1500
     857# new analysis
     858table="AnalysisResultsRunCutsLC" # CutsLC
     859nightmin=20140520
     860nightmax=20140930
     861name="Mrk501_nightly_newAnalysis_forHESS"
     862bin=-1
     863get_results
     864name="Mrk501_7d_newAnalysis_forHESS"
     865bin=-7
     866get_results
     867nightmin=20140623
     868nightmax=20140623
     869name="Mrk501_5min_FlareNight_newAnalysis_forHESS"
     870bin=5
     871get_results
    832872# isdc analysis
    833873thmax=850
Note: See TracChangeset for help on using the changeset viewer.