43 int sample_min,
int sample_max,
44 double time_of_max,
double chi2_max,
69 for(k=sample_min;k<=sample_max;k++){
116 double xki2, dif, difmx, deglib;
117 double bv[4],
s, deter;
119 deglib=(double)nmxul - 4.;
120 for(i=0;i<nmxul;i++){
131 for(i=0;i<nmxul;i++){
137 for(i=0;i<nmxul;i++){
152 if( parom[3] == 0. ){
161 for(i=0;i<nmxul;i++ ){
163 h= parom[0]+parom[1]*t[
i]+parom[2]*t2+parom[3]*t2*t[
i];
164 dif=(adc[
i]-
h)*mask[i];
171 if(deglib > 0.5) xki2=xki2/deglib;
173 delta=parom[2]*parom[2]-3.*parom[3]*parom[1];
176 tm=-(delta+parom[2])/(3.*parom[3]);
177 tmp=(delta-parom[2])/(3.*parom[3]);
186 parom[5]= parom[0]+parom[1]*tm+parom[2]*tm*tm+parom[3]*tm*tm*tm;
201 "ERROR : trying to use TSFit::inverms with size %d( max allowed %d\n",
207 memset( (
char *)
al, zero, 8*n*n );
208 memset( (
char *)
be, zero, 8*n*n );
227 if( j < i )
al[
i][
j] = r /
al[
j][
j];
232 be[0][0] = 1./
al[0][0];
238 for(k=jj+1;k<=
i;k++){
241 be[
i][jj]=-s/
al[jj][jj];
289 if( bdc[i] > val_max ){
295 if( (val_max*val_max) *
errmat[imax][imax] < 16. )
return -118;
302 double val2 = val_max / 2.;
303 double val3 = val_max / 2.;
309 if( ( bdc[i] < val3 ) && ( i < imax ) )ilow =
i;
310 if( bdc[i] > val2 )ihig =
i;
320 if( ihig == ilow)
return -105;
321 if( ilow == imax )ilow = ilow-1;
327 int number_of_good_samples = 0;
328 for(i=ilow;i<=ihig;i++){
335 number_of_good_samples++;
340 if( number_of_good_samples < 4 ){
349 tm =
parfp3[4] + (float)ilow;
352 if( amp * amp *
errmat[0][0] < 2. )
return -101.;
353 tmp =
parfp3[6] + (float)ilow;
366 if( (tm < (
double)ilow ) || (tm > (
double)ihig)){
370 if( (tmp > (
double)ilow ) && (tmp < (
double)ihig - 1.) ){
378 ret_dat[2] = val_max;
379 ret_dat[3] = (double)imax;
380 ret_dat[4] = (double)ilow;
381 ret_dat[5] = (double)ihig;
382 ret_dat[6] = (double)tmp;
int adc(sample_type sample)
get the ADC sample (12 bits)
TSFit(int size=SDIM, int size_sh=PLSHDIM)
double invcov[matdim][matdim]
double al[matdim][matdim]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
double fit_third_degree_polynomial(double *, double *)
double be[matdim][matdim]
double cov[matdim][matdim]
double fpol3dg(int, double *, double *, double *)
double inverms(int, double xx[matdim][matdim], double yy[matdim][matdim])
double errmat[SDIM][SDIM]
std::vector< std::vector< double > > tmp
void set_params(int, int, int, int, int, double, double, int, int)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
tuple size
Write out results.