Index: trunk/DataCheck/Tools/get_data.sh
===================================================================
--- trunk/DataCheck/Tools/get_data.sh	(revision 19937)
+++ trunk/DataCheck/Tools/get_data.sh	(revision 19938)
@@ -153,5 +153,5 @@
       if [ "$crabfluxconv" != "" ]
       then
-         echo "# You set a custom conversion to fluxes: "$crabfluxconv" [10^-11 erg/s/cm2]"
+         echo "# You set a custom conversion to fluxes: "$crabfluxconv" [10^-11 ph/s/cm2]"
       fi
    fi
@@ -183,5 +183,5 @@
       zdfactor="(pow(cos(fZenithDistanceMean*PI()/180),3)+14.8/21.9*pow(sin(2*fZenithDistanceMean*PI()/180),5))" 
       #zdfactor="(1/(pow(cos(fZenithDistanceMean*PI()/180),3)+14.8/21.9*pow(sin(2*fZenithDistanceMean*PI()/180),5)))" 
-      thfactor="(1-0.00124/1.21*(fThresholdMinSet-500)*(fThresholdMinSet>=500))"
+      thfactor="(1-0.00124/1.21*(IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)-500)*(IF(ISNULL(fThresholdMinSet),fThresholdMedian,fThresholdMinSet)>=500))"
       # ETh: 1100 GeV 
       crabflux="1.81"
@@ -685,5 +685,5 @@
 overwrite="yes"
 # optional: require minimal ontime per bin (default 20 min)
-#ontimelimit=30 # 30 min
+#ontimelimit=1800 # 30 min
 ontimelimit= # default 20 min
 # data quality selection
@@ -704,4 +704,5 @@
 # remove lines which contain NULL (e.g. zd-corrected flux when zd=NULL)
 rmemptyrows="yes"
+rmemptyrow="no"
 # remove lines with zdfactor * thfactor > value
 factorcut=0.3
@@ -723,9 +724,126 @@
 
 
+# LC for Mrk 421 for crosscheck of BB 
+datapath=/home/dorner/SW/bb/
+table="AnalysisResultsRunLP"
+# nightly 
+bin=-1
+nightmin=20130111
+nightmax=20180515
+thmax=560
+zdmax=60
+ontimelimit=1800
+factorcut=
+rmemptyrows="yes"
+dch=" AND fR750Cor/fR750Ref BETWEEN 0.93 AND 1.2 AND fHumidityMean<80 "
+# Mrk 421
+source=1
+name="Mrk421_nightly_BBXcheck"
+get_results
+
+
+
+exit
+
+# LC for Mrk 421 paper with MAGIC 
+# from David: MJD 57030 - 57540 (i.e. 8.1.2015 - 1.6.2016)
+datapath=/home/dorner/FACT.analysis/corrected.lcs.for.collaborators/lcs/
+table="AnalysisResultsRunCutsLC" # CutsLC
+# nightly 
+bin=-1
+nightmin=20141101
+nightmax=20160630
+# conversion factor to fluxes for CutsLC 
+#  using slope of -3.35 -> threshold 690 GeV
+#  details: https://www.fact-project.org/logbook/showthread.php?tid=6994&pid=28875#pid28875
+crabfluxconv="0.57" 
+# Mrk 421
+source=1
+name="Mrk421_nightly_20141101_20160630_forMAGIC"
+get_results
+
+
+
+exit
+
+# LCs for TeVPA poster
+datapath=/home/dorner/FACT.analysis/tevpa2019
+table="AnalysisResultsRunCutsLC" # CutsLC
+# nightly 
+bin=-1
+nightmin=20111115
+nightmax=20201231
+# Mrk 421
+source=1
+name="Mrk421_nightly"
+get_results
+# Mrk 501
+name="Mrk501_nightly"
+source=2
+get_results
+# 1959
+name="1959_nightly"
+source=7
+get_results
+# 2344
+name="2344_nightly"
+source=3
+get_results
+name="2344_monthly"
+bin=0
+get_results
+name="2344_7d"
+bin=7
+get_results
+usedch="no" 
+name="2344_nightly_nodch"
+source=3
+get_results
+name="2344_monthly_nodch"
+bin=0
+get_results
+name="2344_7d_nodch"
+bin=7
+get_results
+usedch="yes" 
+# 1959 
+name="1959_mixed"
+source=7
+bin=0
+nightmin=20111115
+nightmax=20160331
+get_results
+overwrite="no"
+nightmin=20160401
+nightmax=20160815
+bin=-1
+get_results
+bin=0
+nightmin=20160816
+nightmax=20201231
+get_results
+overwrite="yes"
+
+exit
+
+
 datapath=/home/dorner/FACT.analysis/corrected.lcs.for.collaborators/lcs
 
 # put your data request here, examples below
 
-# LCs for 421 campaign with Astrosat Jan 2019
+# LCs for 2344 XMM proposal
+table="AnalysisResultsRunCutsLC" 
+# 2344
+source=3
+# monthly
+bin=0
+nightmin=20111115
+nightmax=20191231
+name="2344_period_XMM-proposal-2019"
+get_results
+
+exit
+
+# LCs for 421 campaign with Astrosat Jan 2019 - crosscheck
 table="AnalysisResultsRunLP" 
 # Mrk 421
@@ -764,6 +882,4 @@
 
 
-
-exit
 
 # LCs for SED project 2013 
