46 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
47 if(verbose>0) printf(
"%s(t, cri, %d, %d, %g, %g, bf)\n", __func__, n, bfNr, t3min, t3max);
48 if(t==NULL || cri==NULL || bf==NULL) {
53 if(verbose>1) printf(
"invalid sample or BF number\n");
57 if(t3min<1.0E-10 || t3min>=t3max) {
58 if(verbose>1) printf(
"invalid theta3 range\n");
66 if(verbose>1) printf(
"allocating memory for basis functions\n");
70 statusSet(status, __func__, __FILE__, __LINE__, ret);
77 for(
int bi=0; bi<bf->
tacNr; bi++) sprintf(bf->
c[bi].
name,
"B%5.5d", bi+1);
78 for(
int fi=0; fi<bf->
sampleNr; fi++) bf->
x[fi]=t[fi];
81 if(verbose>1) printf(
"computing theta3 values\n");
83 a=log10(t3min); b=log10(t3max); c=(b-a)/(
double)(bfNr-1);
84 for(
int bi=0; bi<bf->
tacNr; bi++) {
85 bf->
c[bi].
size=pow(10.0, (
double)bi*c+a);
89 printf(
"bf_t3_range := %g - %g\n", bf->
c[0].
size, bf->
c[bf->
tacNr-1].
size);
90 printf(
"bf_t3_gaps := %g - %g\n", bf->
c[1].
size-bf->
c[0].
size,
95 if(verbose>1) printf(
"computing basis functions\n");
97 for(
int bi=0; bi<bf->
tacNr && !ret; bi++) {
98 if(verbose>99) printf(
" theta3=%g\n", bf->
c[bi].
size);
int bfmSRTM(double *t, double *cri, const int n, const int bfNr, const double t3min, const double t3max, TAC *bf, TPCSTATUS *status)
int simC1_i(double *t, double *cai, const int nr, const double k1, const double k2, double *ct)