Go to the documentation of this file.
20 memset(&totmet, 0,
sizeof (totmet));
22 for (ip = 0; ip <
l1rec->npix; ip++) {
24 for (ib = 0; ib <
NBANDS; ib++) {
26 if ((
l1rec->data[ip][ib] -
l1rec->darkpix[ib]) < 3)
29 if (
l1rec->gain[ib] == 0) {
31 if (
l1rec->data[ip][ib] >= 1023)
32 totmet.gain1_satpix[ib]++;
34 totmet.gain1_nonsatpix[ib]++;
36 totmet.gain1_mean_rad[ib] +=
l1rec->data[ip][ib];
38 }
else if (
l1rec->gain[ib] == 2) {
40 if (
l1rec->data[ip][ib] >= 1023)
41 totmet.gain2_satpix[ib]++;
43 totmet.gain2_nonsatpix[ib]++;
45 totmet.gain2_mean_rad[ib] +=
l1rec->data[ip][ib];
65 memcpy(&avgmet, &totmet,
sizeof (l1met));
67 for (ib = 0; ib <
NBANDS; ib++) {
69 gain1Cnt = totmet.gain1_satpix[ib]
70 + totmet.gain1_nonsatpix[ib];
72 gain2Cnt = totmet.gain2_satpix[ib]
73 + totmet.gain2_nonsatpix[ib];
76 avgmet.gain1_mean_rad[ib] /= gain1Cnt;
79 avgmet.gain2_mean_rad[ib] /= gain2Cnt;
l1met * getL1Metrics(void)
void addL1Metrics(INT32 scanNum, swl1rec *l1rec)