
//C27 has different plasma window, and timing pulse got moved to
// possibly change was at 77440, something in chain1 changed at this
 
 
SingleTimingPulse
		
		
//load shape data for ch0's tpulse into all channels, as they get used for the instrument functions at the moment
LoadTPulses						-1		%SHAPESPATH%/ke9/postUpgrade/tpulse-ke9-C25-ch0.txt

SwitchOnFromTPulses		

BaselinesFromDataSource
PhotoElectronFactorsFromDataSource					//start with these so the rel sens are right (which they arn't) override later
RelativeSensitivitiesFromDataSource		0.70		// fractionalSigma = 50%, so effectivly 0 - 210%
TPulseToBackwallFromDataSource			20e-12		// sigma = 2mm = 20ps, small otherwise ke9 is effectivly useless 
VignettingFromDataSource		

InitBaselineFromData 			0, 0, 500, 2, 20, 40		//ch, X0, X1, rangeA, rangeX, rangeY
InitBaselineFromData			1, 0, 500, 2, 20, 40		//ch, X0, X1, rangeA, rangeX, rangeY
InitBaselineFromData			2, 0, 500, 2, 20, 40		//ch, X0, X1, rangeA, rangeX, rangeY
InitBaselineFromData			3, 0, 500, 2, 20, 40		//ch, X0, X1, rangeA, rangeX, rangeY

FindSaturationPoint				-1 1000 2048

//with extra 
//InitBaselineFromData 			0, 0, 500, 550, 800, 2, 20, 40		//ch, YShift_X0, YShift_X1, XShift_X0, XShift_X1, rangeA, rangeX, rangeY
//InitBaselineFromData			1, 0, 500, 700, 900, 2, 20, 40		//ch, YShift_X0, YShift_X1, XShift_X0, XShift_X1, rangeA, rangeX, rangeY
//InitBaselineFromData			2, 0, 500, 750, 950, 2, 20, 40		//ch, YShift_X0, YShift_X1, XShift_X0, XShift_X1, rangeA, rangeX, rangeY
//InitBaselineFromData			3, 0, 500, 800, 1000, 2, 20, 40		//ch, YShift_X0, YShift_X1, XShift_X0, XShift_X1, rangeA, rangeX, rangeY
  
SaturationRelativeInitAmbientFromData				0, -450, -410, 1			//ch, lBoundX, uBoundX, threshold
SaturationRelativeInitAmbientFromData				1, -315, -280, 1			//ch, lBoundX, uBoundX, threshold
SaturationRelativeInitAmbientFromData				2, -360, -300, 1		//ch, lBoundX, uBoundX, threshold
SaturationRelativeInitAmbientFromData				3, -260, -210, 1		//ch, lBoundX, uBoundX, threshold

SaturationRelativeInitTimingPulseFromData			0, -350, -290
//InitTimingPulseFromData			1, 940, 1040
//InitTimingPulseFromData			2, 940, 1040
//InitTimingPulseFromData			3, 940, 1040

    
SaturationRelativeInitSwitchOnPulseFromData		0, -570, -550					//ch, lBoundX, uBoundX
SaturationRelativeInitSwitchOnPulseFromData		1, -450, -420					//ch, lBoundX, uBoundX
SaturationRelativeInitSwitchOnPulseFromData		2, -410, -330					//ch, lBoundX, uBoundX
SaturationRelativeInitSwitchOnPulseFromData		3, -350, -310				//ch, lBoundX, uBoundX

InitBackwall				-1, 1148, 1170, 10, 0, 2.8, 6.0 	//ch, X0, X1, RangeX, L0, L, L1

//calced from ADCU=1:500 of all frames of 547 pulses, is ~sqrt(2) * 230 because baseline subtraction increases it
ElecSigma						320		

LineOfSightFromDataSource	2.5, 4.0		//sliced to only include given region in R
		
WindowTransmission			1.00, 1.00, 1.00, 1.00
SaturationRelativePlasmaRegion			-220, -220, -220, -220,    70, 70, 70, 70
ChannelEnable				true
		
// Mark B says the uberConst wanders around slowly over timescale > days.
UberConstValue				4.4e-20
UberConstMean				4.4e-20
UberConstSigma				10e-20
UberConstMin				0
UberConstMax				50e-20
UberConstTypMin				0
UberConstTypMax				8e-20
							
TimingAdjustMean			0
TimingAdjustValue			0
TimingAdjustSigma			3000e-12		//allow +/- 1sigma = 3000ps = 10cm
TimingAdjustMin				-20000e-12
TimingAdjustMax				20000e-12
TimingAdjustTypMin			-10000e-12
TimingAdjustTypMax			10000e-12

VignetPivotR				3.0
VignetShiftMean				0.0
VignetShiftSigma			0.40
VignetShiftValue			0.0
VignetShiftMin				-0.20
VignetShiftMax				0.20
VignetShiftTypMin			-0.10
VignetShiftTypMax			0.10
VignetAdjustGradMean		0.0
VignetAdjustGradSigma		2.0
VignetAdjustGradValue		0.0
VignetAdjustGradMin			-1
VignetAdjustGradMax			1
VignetAdjustGradTypMin		-0.2
VignetAdjustGradTypMax		0.2	






