- Timestamp:
- Jan 22, 2010, 11:45:18 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppStack/src/ppStackMatch.c
r26543 r26671 316 316 int optOrder = psMetadataLookupS32(&mdok, ppsub, "OPTIMUM.ORDER"); // Order for search 317 317 float poorFrac = psMetadataLookupF32(&mdok, ppsub, "POOR.FRACTION"); // Fraction for "poor" 318 319 bool scale = psMetadataLookupBool(NULL, recipe, "SCALE"); // Scale kernel parameters? 320 float scaleRef = psMetadataLookupF32(NULL, recipe, "SCALE.REF"); // Reference for scaling 321 float scaleMin = psMetadataLookupF32(NULL, recipe, "SCALE.MIN"); // Minimum for scaling 322 float scaleMax = psMetadataLookupF32(NULL, recipe, "SCALE.MAX"); // Maximum for scaling 323 if (!isfinite(scaleRef) || !isfinite(scaleMin) || !isfinite(scaleMax)) { 324 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 325 "Scale parameters (SCALE.REF=%f, SCALE.MIN=%f, SCALE.MAX=%f) not set in recipe.", 326 scaleRef, scaleMin, scaleMax); 327 return false; 328 } 329 318 330 319 331 // These values are specified specifically for stacking … … 410 422 } 411 423 } else { 424 // Scale the input parameters 425 psVector *widthsCopy = psVectorCopy(NULL, widths, PS_TYPE_F32); // Copy of kernel widths 426 if (scale && !pmSubtractionParamsScale(&size, &footprint, widthsCopy, 427 options->inputSeeing->data.F32[index], 428 options->targetSeeing, scaleRef, scaleMin, scaleMax)) { 429 psError(PS_ERR_UNKNOWN, false, "Unable to scale kernel parameters"); 430 psFree(fake); 431 psFree(optWidths); 432 psFree(stampSources); 433 psFree(conv); 434 psFree(widthsCopy); 435 if (threads > 0) { 436 pmSubtractionThreadsFinalize(readout, fake); 437 } 438 return false; 439 } 440 412 441 if (!pmSubtractionMatch(NULL, conv, fake, readout, footprint, stride, regionSize, spacing, 413 threshold, stampSources, stampsName, type, size, order, widths ,442 threshold, stampSources, stampsName, type, size, order, widthsCopy, 414 443 orders, inner, ringsOrder, binning, penalty, 415 444 optimum, optWidths, optOrder, optThresh, iter, rej, sysError, skyErr, … … 421 450 psFree(stampSources); 422 451 psFree(conv); 452 psFree(widthsCopy); 423 453 if (threads > 0) { 424 454 pmSubtractionThreadsFinalize(readout, fake); … … 426 456 return false; 427 457 } 458 psFree(widthsCopy); 428 459 } 429 460
Note:
See TracChangeset
for help on using the changeset viewer.
