Index: trunk/DataCheck/Tools/get_data.sh
===================================================================
--- trunk/DataCheck/Tools/get_data.sh	(revision 19447)
+++ trunk/DataCheck/Tools/get_data.sh	(revision 19448)
@@ -330,4 +330,6 @@
          querydch=$dch
       fi
+   else
+      querydch=
    fi
    
@@ -457,9 +459,9 @@
       echo "# This file was created at "`date` > $fileint
       print_policy >> $fileint
-      print_selection >> $fileint
-      echo "# The following query was used: " >> $fileint
-      echo "# "$queryint >> $fileint
-      echo "#" >> $fileint
-   fi
+   fi
+   print_selection >> $fileint
+   echo "# The following query was used: " >> $fileint
+   echo "# $queryint" >> $fileint
+   echo "#" >> $fileint
    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]"
    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 "
@@ -480,9 +482,9 @@
       echo "# This file was created at "`date` > $filecol
       print_policy >> $filecol
-      print_selection >> $filecol
-      #echo "# The following query was used: " >> $filecol
-      #echo "# "$querycol >> $filecol
-      #echo "#" >> $filecol
-   fi
+   fi
+   print_selection >> $filecol
+   #echo "# The following query was used: " >> $filecol
+   #echo "# $querycol" >> $filecol
+   #echo "#" >> $filecol
    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]"
    headercol=$headercol" excess-rate_error[evts/h] corrected_excess-rate_error[evts/h] flux_error[CU] flux_error[e-11/cm2/s] significance "
@@ -637,5 +639,72 @@
 # -------------------------------------------------------------------------------------- #
 
-#expert="yes"
+# for 2344 paper with MAGIC
+
+source=3
+zdmax=90
+thmax=1500
+
+# new analysis
+table="AnalysisResultsRunCutsLC" # CutsLC
+nightmin=20160618
+nightmax=20160815
+name="2344_2016flare_newAnalysis"
+bin=-7
+get_results
+overwrite="no"
+bin=-28
+nightmin=20160816
+nightmax=20161031
+get_results
+overwrite="yes"
+
+# ISDC analysis
+table="AnalysisResultsRunISDC"
+nightmin=20160618
+nightmax=20160815
+name="2344_2016flare_stdAnalysis"
+bin=-7
+get_results
+overwrite="no"
+bin=-28
+nightmin=20160816
+nightmax=20161031
+get_results
+overwrite="yes"
+
+
+usedch="no" 
+# new analysis
+table="AnalysisResultsRunCutsLC" # CutsLC
+nightmin=20160618
+nightmax=20160815
+name="2344_2016flare_newAnalysis_noDCh"
+bin=-7
+get_results
+overwrite="no"
+bin=-28
+nightmin=20160816
+nightmax=20161031
+get_results
+overwrite="yes"
+
+# ISDC analysis
+table="AnalysisResultsRunISDC"
+nightmin=20160618
+nightmax=20160815
+name="2344_2016flare_stdAnalysis_noDCh"
+bin=-7
+get_results
+overwrite="no"
+bin=-28
+nightmin=20160816
+nightmax=20161031
+get_results
+overwrite="yes"
+
+usedch="yes" 
+
+
+exit
 
 # Mrk 501
