Compare commits

...

2 commits

Author SHA1 Message Date
Stephan I. Böttcher
97584ee496 numbers: fix index parsing 2023-11-21 21:55:02 +01:00
Stephan I. Böttcher
0425492016 LET fix log gain emission 2023-11-21 21:54:03 +01:00

11
irena.c
View file

@ -1476,7 +1476,7 @@ double mV_calib[NC] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
static int have_let(int c)
{
for (int i=0; i<NI; i++)
if (high_gain_ch[i] == c
if ((high_gain_ch[i] == c || low_gain_ch[i]==c)
&& coinc_ch[i] >= 0
&& coinc_ch[i] < NC)
return i;
@ -1505,15 +1505,10 @@ void incr_histograms(struct event *ev)
hists.dose[lg] += mV[lg];
else if (mV[hg] >= dose_min)
hists.dose[hg] += mV[hg];
}
for (int i=0; i<NI; i++) {
int hg = high_gain_ch[i];
if (hg < 0)
continue;
int ohg = coinc_ch[i];
if (ohg < 0 || ohg >= NC)
continue;
int lg = low_gain_ch[i];
if (lg < 0)
lg = hg;
int olg = -1;
@ -2818,7 +2813,7 @@ int process_cmd(char *l)
int nn = n->size;
if (!nn)
nn=1;
if (nn>1 && na>=2 && !index_number(*aa, &ii)) {
if (nn>1 && na>=1 && !index_number(*aa, &ii)) {
aa++;
na--;
}