Changeset 42774
- Timestamp:
- Dec 29, 2024, 3:59:45 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-ppmerge-20241229/psModules/src/detrend/pmDark.c
r42379 r42774 252 252 } 253 253 254 # if (PS_TRACE_ON) 254 255 if (psTraceGetLevel("psModules.detrend") > 9) { 255 256 for (int i = 0; i < inputs->n; i++) { 256 257 psVector *val = values->data[i]; 257 (void) val; // avoid unused variable message when tracing is compiled out258 258 for (int j = 0; j < ordinates->n; j++) { 259 259 psTrace("psModules.detrend", 9, "Image %d, ordinate %d: %f\n", i, j, val->data.F32[j]); … … 261 261 } 262 262 } 263 # endif 263 264 264 265 int numTerms = 1; // Number of terms in polynomial … … 292 293 pmReadout *readout = output->readouts->data[i]; // Readout to update 293 294 if (!readout) { 294 readout = output->readouts->data[i] = pmReadoutAlloc(output); 295 } 296 295 // pmReadoutAlloc places a reference to the readout on cell->readouts 296 // and returns a second mem reference to the readout 297 readout = pmReadoutAlloc(output); 298 psFree (readout); // free the extra mem reference returned by pmReadoutAlloc 299 } 297 300 pmReadoutStackDefineOutput(readout, col0, row0, numCols, numRows, false, false, 0); 298 301 psTrace("psModules.imcombine", 7, "Output minimum: %d,%d\n", col0, row0); … … 469 472 for (int m = 0; m < poly->deviations->n; m++) { 470 473 logL->data.F64[k] += pow(poly->deviations->data.F32[m] / polySig->stdevFit,2); 471 /* if ((xOut == 20) && (yOut == 256)) { */472 /* psTrace("psModules.detrend",3,"pmDarkCombine DEV: %d %d: input %d models: Norders: %d logL: %g value: %g\n", */473 /* xOut,yOut,m,k,logL->data.F64[k],poly->deviations->data.F32[m]); */474 /* } */475 474 } 476 475 if (k > 0) { … … 487 486 k_best = 1; 488 487 } 489 /* k_best = 1; */ 488 490 489 // Select the polynomial that seems best. 491 490 psPolynomialMD *poly = poly_set->data[k_best]; 492 491 493 // for (int k = 0; k < poly->coeff->n; k++) {494 492 for (int k = 0; k < max_orders->n + 1; k++) { // There is one more coefficient than is stored here. 495 493 pmReadout *ro = output->readouts->data[k]; // Readout of interest 496 494 if (k < poly->coeff->n) { 497 495 ro->image->data.F32[yOut][xOut] = poly->coeff->data.F64[k]; 498 } 499 else { 496 } else { 500 497 ro->image->data.F32[yOut][xOut] = 0.0; 501 498 }
Note:
See TracChangeset
for help on using the changeset viewer.
