Changeset 19568
- Timestamp:
- 07/24/19 12:52:59 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Tools/get_data.sh
r19562 r19568 49 49 # -------- 50 50 # 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, 52 52 # other info on flux: signif, cu-factor, num exc, num sig, num bg 53 53 # other info: zd th R750cor R750ref … … 61 61 # ------------- 62 62 # time: time, delta time, start, stop, ontime 63 # flux: excrate, excerr, corrate, corerr, flux, flux-err, significance63 # flux: excrate, excerr, corrate, corerr, CUcor CUcorerr, fluxcor, fluxcorrerr, significance 64 64 # 65 65 # additional information to put: … … 208 208 # some calculations 209 209 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)" 212 214 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))" 215 219 216 220 # columns to be selected … … 227 231 cu=" ROUND("$CU", 2) AS cu" 228 232 cuerr=" ROUND("$CUerr", 2) AS cuerr" 233 cucor=" ROUND("$CUcor", 2) AS cu" 234 cucorerr=" ROUND("$CUcorerr", 2) AS cuerr" 229 235 flux="ROUND("$CU" * "$crabflux", 2) AS flux" 230 236 fluxerr="ROUND("$CUerr" * "$crabflux", 2) AS fluxerr" … … 241 247 cu2=" ROUND("$CU2", 2) AS cu" 242 248 cuerr2=" ROUND("$CUerr2", 2) AS cuerr" 249 cucor2=" ROUND("$CUcor2", 2) AS cu" 250 cucorerr2=" ROUND("$CUcorerr2", 2) AS cuerr" 243 251 flux2="ROUND("$CU2" * "$crabflux", "$fluxprec") AS flux" 244 252 fluxerr2="ROUND("$CUerr2" *"$crabflux", "$fluxprec") AS fluxerr" … … 365 373 # internal 366 374 queryint=$querystart 367 queryint=$queryint" "$excrate", "$c orrexcrate", "$cu", "$flux", "375 queryint=$queryint" "$excrate", "$cu", "$correxcrate", "$cucor", "$flux", " 368 376 queryint=$queryint" "$deltat", "$ontime", " 369 queryint=$queryint" "$excrateerr", "$c orrexcrateerr", "$cuerr", "$fluxerr", "377 queryint=$queryint" "$excrateerr", "$cuerr", "$correxcrateerr", "$cucorerr", "$fluxerr", " 370 378 queryint=$queryint" "$significance", " 371 379 queryint=$queryint" MIN(fNight) AS nightmin, MAX(fNight) AS nightmax, " … … 378 386 # for collaborators 379 387 querycol=$querystart 380 querycol=$querycol" "$excrate", "$correxcrate", "$cu ", "$flux", "388 querycol=$querycol" "$excrate", "$correxcrate", "$cucor", "$flux", " 381 389 querycol=$querycol" "$deltat", "$ontime", " 382 querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cu err", "$fluxerr", "390 querycol=$querycol" "$excrateerr", "$correxcrateerr", "$cucorerr", "$fluxerr", " 383 391 querycol=$querycol" "$significance 384 392 querycol=$querycol" "$querybase" "$querydch" "$queryend … … 405 413 # internal 406 414 queryint=$querystart 407 queryint=$queryint" "$excrate2", "$c orrexcrate2", "$cu2", "$flux2", "415 queryint=$queryint" "$excrate2", "$cu2", "$correxcrate2", "$cucor2", "$flux2", " 408 416 queryint=$queryint" "$deltat2", "$ontime2", " 409 queryint=$queryint" "$excrateerr2", "$c orrexcrateerr2", "$cuerr2", "$fluxerr2", "417 queryint=$queryint" "$excrateerr2", "$cuerr2", "$correxcrateerr2", "$cucorerr2", "$fluxerr2", " 410 418 queryint=$queryint" "$significance2", " 411 419 queryint=$queryint" avg(o.night) AS night, " … … 467 475 echo "# $queryint" >> $fileint 468 476 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 " 471 479 headerint=$headerint" zdmin zdmax thmin thmax avg(cufactor) avg(R750cor) avg(R750ref) " 472 480 echo $headerint >> $fileint … … 490 498 #echo "# $querycol" >> $filecol 491 499 #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 " 494 502 echo $headercol >> $filecol 495 503 #echo "$querycol" … … 643 651 # -------------------------------------------------------------------------------------- # 644 652 645 646 # LC for INTEGRAL Proposal647 table="AnalysisResultsRunCutsLC" # CutsLC648 bin=-1649 # Mrk 421650 source=1651 name="Mrk421_all_nightly"652 get_results653 653 # Mrk 501 654 source=2655 name="Mrk501_all_nightly"656 get_results657 # 1959658 source=7659 name="1959_all_nightly"660 get_results661 # for other INTEGRAL proposal662 # Mrk 421663 bin=0664 source=1665 name="Mrk421_all_period"666 get_results667 668 exit669 670 671 # Crab672 source=5673 nightmin=20121214674 nightmax=20180418675 table="AnalysisResultsRunCutsLC" # CutsLC676 bin=-1677 zdmax=30678 thmax=330679 name="testCrabnightlycheck"680 get_results681 682 exit683 684 # Crab685 source=5686 nightmin=20121214687 nightmax=20180418688 table="AnalysisResultsRunCutsLC" # CutsLC689 bin=20690 name="testCrab20min"691 get_results692 693 exit694 695 # Crab696 source=5697 nightmin=20121214698 nightmax=20180418699 table="AnalysisResultsRunCutsLC" # CutsLC700 bin=-1701 name="testCrabnightly"702 get_results703 704 exit705 706 # Crab707 source=5708 #nightmin=20121214709 #nightmax=20180418710 table="AnalysisResultsRunCutsLC" # CutsLC711 bin=-1712 name="testCraball"713 get_results714 715 exit716 717 718 # Crab719 source=5720 nightmin=20121214721 nightmax=20180418722 table="AnalysisResultsRunCutsLC" # CutsLC723 bin=60724 name="testCrab"725 get_results726 727 exit728 729 730 # Mrk 501731 source=2732 zdmax=90733 thmax=1500734 # new analysis735 table="AnalysisResultsRunCutsLC" # CutsLC736 nightmin=20140622737 nightmax=20140624738 name="Mrk501_5min_Flare_newAnalysis_forHESS"739 bin=5740 get_results741 742 exit743 744 # for 2344 paper with MAGIC745 746 source=3747 zdmax=90748 thmax=1500749 750 # new analysis751 table="AnalysisResultsRunCutsLC" # CutsLC752 nightmin=20160618753 nightmax=20160815754 name="2344_2016flare_newAnalysis"755 bin=-7756 get_results757 overwrite="no"758 bin=-28759 nightmin=20160816760 nightmax=20161031761 get_results762 overwrite="yes"763 764 # ISDC analysis765 table="AnalysisResultsRunISDC"766 nightmin=20160618767 nightmax=20160815768 name="2344_2016flare_stdAnalysis"769 bin=-7770 get_results771 overwrite="no"772 bin=-28773 nightmin=20160816774 nightmax=20161031775 get_results776 overwrite="yes"777 778 779 usedch="no"780 # new analysis781 table="AnalysisResultsRunCutsLC" # CutsLC782 nightmin=20160618783 nightmax=20160815784 name="2344_2016flare_newAnalysis_noDCh"785 bin=-7786 get_results787 overwrite="no"788 bin=-28789 nightmin=20160816790 nightmax=20161031791 get_results792 overwrite="yes"793 794 # ISDC analysis795 table="AnalysisResultsRunISDC"796 nightmin=20160618797 nightmax=20160815798 name="2344_2016flare_stdAnalysis_noDCh"799 bin=-7800 get_results801 overwrite="no"802 bin=-28803 nightmin=20160816804 nightmax=20161031805 get_results806 overwrite="yes"807 808 usedch="yes"809 810 811 exit812 813 654 # Mrk 501 814 655 source=2 … … 830 671 bin=5 831 672 get_results 673 nightmin=20140622 674 nightmax=20140624 675 name="Mrk501_5min_Flare_newAnalysis_forHESS" 676 bin=5 677 get_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 697 698 exit 699 700 # LC for INTEGRAL Proposal 701 table="AnalysisResultsRunCutsLC" # CutsLC 702 bin=-1 703 # Mrk 421 704 source=1 705 name="Mrk421_all_nightly" 706 get_results 707 # Mrk 501 708 source=2 709 name="Mrk501_all_nightly" 710 get_results 711 # 1959 712 source=7 713 name="1959_all_nightly" 714 get_results 715 # for other INTEGRAL proposal 716 # Mrk 421 717 bin=0 718 source=1 719 name="Mrk421_all_period" 720 get_results 721 722 exit 723 724 725 # Crab 726 source=5 727 nightmin=20121214 728 nightmax=20180418 729 table="AnalysisResultsRunCutsLC" # CutsLC 730 bin=-1 731 zdmax=30 732 thmax=330 733 name="testCrabnightlycheck" 734 get_results 735 736 exit 737 738 # Crab 739 source=5 740 nightmin=20121214 741 nightmax=20180418 742 table="AnalysisResultsRunCutsLC" # CutsLC 743 bin=20 744 name="testCrab20min" 745 get_results 746 747 exit 748 749 # Crab 750 source=5 751 nightmin=20121214 752 nightmax=20180418 753 table="AnalysisResultsRunCutsLC" # CutsLC 754 bin=-1 755 name="testCrabnightly" 756 get_results 757 758 exit 759 760 # Crab 761 source=5 762 #nightmin=20121214 763 #nightmax=20180418 764 table="AnalysisResultsRunCutsLC" # CutsLC 765 bin=-1 766 name="testCraball" 767 get_results 768 769 exit 770 771 772 # Crab 773 source=5 774 nightmin=20121214 775 nightmax=20180418 776 table="AnalysisResultsRunCutsLC" # CutsLC 777 bin=60 778 name="testCrab" 779 get_results 780 781 exit 782 783 784 # for 2344 paper with MAGIC 785 786 source=3 787 zdmax=90 788 thmax=1500 789 790 # new analysis 791 table="AnalysisResultsRunCutsLC" # CutsLC 792 nightmin=20160618 793 nightmax=20160815 794 name="2344_2016flare_newAnalysis" 795 bin=-7 796 get_results 797 overwrite="no" 798 bin=-28 799 nightmin=20160816 800 nightmax=20161031 801 get_results 802 overwrite="yes" 803 804 # ISDC analysis 805 table="AnalysisResultsRunISDC" 806 nightmin=20160618 807 nightmax=20160815 808 name="2344_2016flare_stdAnalysis" 809 bin=-7 810 get_results 811 overwrite="no" 812 bin=-28 813 nightmin=20160816 814 nightmax=20161031 815 get_results 816 overwrite="yes" 817 818 819 usedch="no" 820 # new analysis 821 table="AnalysisResultsRunCutsLC" # CutsLC 822 nightmin=20160618 823 nightmax=20160815 824 name="2344_2016flare_newAnalysis_noDCh" 825 bin=-7 826 get_results 827 overwrite="no" 828 bin=-28 829 nightmin=20160816 830 nightmax=20161031 831 get_results 832 overwrite="yes" 833 834 # ISDC analysis 835 table="AnalysisResultsRunISDC" 836 nightmin=20160618 837 nightmax=20160815 838 name="2344_2016flare_stdAnalysis_noDCh" 839 bin=-7 840 get_results 841 overwrite="no" 842 bin=-28 843 nightmin=20160816 844 nightmax=20161031 845 get_results 846 overwrite="yes" 847 848 usedch="yes" 849 850 851 exit 852 853 # Mrk 501 854 source=2 855 zdmax=90 856 thmax=1500 857 # new analysis 858 table="AnalysisResultsRunCutsLC" # CutsLC 859 nightmin=20140520 860 nightmax=20140930 861 name="Mrk501_nightly_newAnalysis_forHESS" 862 bin=-1 863 get_results 864 name="Mrk501_7d_newAnalysis_forHESS" 865 bin=-7 866 get_results 867 nightmin=20140623 868 nightmax=20140623 869 name="Mrk501_5min_FlareNight_newAnalysis_forHESS" 870 bin=5 871 get_results 832 872 # isdc analysis 833 873 thmax=850
Note:
See TracChangeset
for help on using the changeset viewer.