From 2c2251a43d1cfb3d497516019db558bab4e8da5f Mon Sep 17 00:00:00 2001 From: redford_s Date: Mon, 29 Jul 2019 12:28:57 +0200 Subject: [PATCH] Change the maximum fit range allowed in Backplane Pulsing. Due to the amplifier plateau at the end of its range. According to the datasheet of the amplifier (Analog devices model ADA4870) the output voltage swing is 37 V with a 40 V supply. This is the cause of the non-linearity at the end of the scans. The fit should only extend to 7 V - (3 V / gain factor of 5) = 6.4 V. All modules have been rerun. --- BP_analysis.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BP_analysis.cpp b/BP_analysis.cpp index a05ad3d..31313e7 100644 --- a/BP_analysis.cpp +++ b/BP_analysis.cpp @@ -13,6 +13,18 @@ #include "TLegend.h" #include "TPaveText.h" +double checkRangeMaxForAmplifierPlateau(double range_max) { + + // check that the range maximum is no more than 6.4 V + // to avoid non-linearity coming from amplifier plateau + if (range_max > 6400) { + return 6400; + } else { + return range_max; + } + +} + int main(int argc, char* argv[]) { jungfrauStyle(); @@ -501,6 +513,7 @@ int main(int argc, char* argv[]) { rangemin_g1 = lowestPointAfterSwitching(r1_filter,r0_filter); rangemax_g1 = *max_element(r1_filter.begin(),r1_filter.end()); + rangemax_g1 = checkRangeMaxForAmplifierPlateau(rangemax_g1); if (rangemax_g1 > rangemin_g1) {