@@ -81,6 +81,14 @@ protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double sec
8181 final double slm_offset = slmTable .getDoubleValue ("offset" ,0 ,0 ,0 ); // Hz
8282 final double slm_atten = slmTable .getDoubleValue ("atten" ,0 ,0 ,0 ); // attenuation
8383
84+ // increase clock frequency by this factor
85+ // double clockFreqFactor = 10.0;
86+ // seconds /= clockFreqFactor;
87+ // liveSeconds /= clockFreqFactor;
88+
89+ // String prefix = String.format("TICK [%s]", this.getClass().getSimpleName());
90+ // System.out.println(String.format("%s freq(orig)=%f seconds=%f liveSeconds=%f ", prefix, this.clockFreq, seconds, liveSeconds) + this.toString());
91+
8492 double q = (double )this .slm - slm_offset * seconds ;
8593 double qg = (double )this .gatedSlm - slm_offset * liveSeconds ;
8694 this .beamChargeSLM = q * slm_atten / slm_slope ;
@@ -90,13 +98,17 @@ protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double sec
9098 if (fcup_atten <1e-8 || fcup_slope <1e-8 ) {
9199 this .beamCharge = this .beamChargeSLM ;
92100 this .beamChargeGated = this .beamChargeGatedSLM ;
101+ // System.out.println(String.format("%s [slm]: %f %f", prefix, this.beamChargeGated, this.beamCharge));
93102 }
94103 else {
95104 q = (double )this .fcup - fcup_offset * seconds ;
96105 qg = (double )this .gatedFcup - fcup_offset * liveSeconds ;
97106 this .beamCharge = q * fcup_atten / fcup_slope ;
98107 this .beamChargeGated = qg * fcup_atten / fcup_slope ;
108+ // System.out.println(String.format("%s [fcup]: %f %f", prefix, this.beamChargeGated, this.beamCharge));
99109 }
110+ // if(this.getClass().getSimpleName().equals("Dsc2Scaler"))
111+ // System.out.println(String.format("%s %f %f %s", prefix, this.beamChargeGated, this.beamCharge, this.toString()));
100112 }
101113 }
102114
0 commit comments