Changeset 29170
- Timestamp:
- Sep 17, 2010, 11:29:31 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823/psModules/src/imcombine
- Files:
-
- 2 added
- 5 edited
-
README (added)
-
pmSubtractionEquation.c (modified) (24 diffs)
-
pmSubtractionEquation.h (modified) (1 diff)
-
pmSubtractionEquation.v0.c (added)
-
pmSubtractionMatch.c (modified) (1 diff)
-
pmSubtractionStamps.c (modified) (1 diff)
-
pmSubtractionStamps.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionEquation.c
r29165 r29170 21 21 //#define USE_WINDOW // Include weight (1/variance) in equation? 22 22 23 # define PENALTY false 24 # define MOMENTS (!PENALTY) 23 25 24 26 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// … … 170 172 171 173 // Calculate the least-squares matrix and vector for dual convolution 172 static bool calculateDualMatrixVector(psImage *matrix, // Least-squares matrix, updated 173 psVector *vector, // Least-squares vector, updated 174 // XXX we could avoid calculating these values on successive passes *if* the stamp has not changed. 175 static bool calculateDualMatrixVector(pmSubtractionStamp *stamp, // stamp of interest 174 176 double normValue, // Normalisation, updated 175 const psKernel *image1, // Image 1 176 const psKernel *image2, // Image 2 177 double normValue2, // Normalisation, updated 177 178 const psKernel *weight, // Weight image 178 179 const psKernel *window, // Window image 179 const psArray *convolutions1, // Convolutions of image 1 for each kernel180 const psArray *convolutions2, // Convolutions of image 2 for each kernel181 180 const pmSubtractionKernels *kernels, // Kernels 182 181 const psImage *polyValues, // Spatial polynomial values … … 184 183 ) 185 184 { 186 int numKernels = kernels->num; // Number of kernels187 int spatialOrder = kernels->spatialOrder; // Order of spatial variation185 int numKernels = kernels->num; // Number of kernels 186 int spatialOrder = kernels->spatialOrder; // Order of spatial variation 188 187 int numPoly = PM_SUBTRACTION_POLYTERMS(spatialOrder); // Number of polynomial terms 189 188 double poly[numPoly]; // Polynomial terms 190 189 double poly2[numPoly][numPoly]; // Polynomial-polynomial values 191 190 192 int numParams = numKernels * numPoly; // Number of regular parameters 193 int numParams2 = numKernels * numPoly; // Number of additional parameters for dual 194 int numDual = numParams + numParams2; // Total number of parameters for dual 191 int numParams = numKernels * numPoly; // Number of regular parameters 192 int numParams2 = numKernels * numPoly; // Number of additional parameters for dual 193 int numDual = numParams + numParams2; // Total number of parameters for dual 194 195 psImage *matrix = stamp->matrix; // Least-squares matrix, updated 196 psVector *vector = stamp->vector; // Least-squares vector, updated 197 psKernel *image1 = stamp->image1; // Image 1 198 psKernel *image2 = stamp->image2; // Image 2 199 psArray *convolutions1 = stamp->convolutions1; // Convolutions of image 1 for each kernel 200 psArray *convolutions2 = stamp->convolutions2; // Convolutions of image 2 for each kernel 195 201 196 202 psAssert(matrix && … … 199 205 matrix->numRows == numDual, 200 206 "Least-squares matrix is bad."); 207 201 208 psAssert(vector && 202 209 vector->type.type == PS_TYPE_F64 && … … 232 239 // [kernel 0, x^n y^m][kernel 1 x^n y^m]...[kernel N, x^n y^m] 233 240 241 // for DUAL convolution analysis, we apply the normalization to I1 as follows: 242 // norm = I2 / I1 243 // 244 // I1c = norm I1 + \Sum_i a_i norm I1 \cross k_i 245 // I2c = I2 + \Sum_i b_i I2 \cross k_i 246 247 // we cannot absorb the normalization into a_i until the analysis is complete, or the 248 // second moment terms are incorrectly calculated. 249 234 250 for (int i = 0; i < numKernels; i++) { 235 251 psKernel *iConv1 = convolutions1->data[i]; // Convolution 1 for index i … … 242 258 double sumBB = 0.0; // Sum of convolution products between image 2 243 259 double sumAB = 0.0; // Sum of convolution products across images 1 and 2 260 261 double MxxAA = 0.0; 262 double MyyAA = 0.0; 263 double MxxBB = 0.0; 264 double MyyBB = 0.0; 244 265 for (int y = - footprint; y <= footprint; y++) { 245 266 for (int x = - footprint; x <= footprint; x++) { 246 double aa = iConv1->kernel[y][x] * jConv1->kernel[y][x] ;267 double aa = iConv1->kernel[y][x] * jConv1->kernel[y][x] * PS_SQR(normValue); 247 268 double bb = iConv2->kernel[y][x] * jConv2->kernel[y][x]; 248 double ab = iConv1->kernel[y][x] * jConv2->kernel[y][x] ;269 double ab = iConv1->kernel[y][x] * jConv2->kernel[y][x] * normValue; 249 270 if (weight) { 250 271 float wtVal = weight->kernel[y][x]; … … 262 283 sumBB += bb; 263 284 sumAB += ab; 264 } 265 } 285 286 if (MOMENTS) { 287 MxxAA += x*x*aa; 288 MyyAA += y*y*aa; 289 MxxBB += x*x*bb; 290 MyyBB += y*y*bb; 291 } 292 } 293 } 294 295 if (MOMENTS) { 296 MxxAA /= stamp->normSquare1 * PS_SQR(normValue); 297 MyyAA /= stamp->normSquare1 * PS_SQR(normValue); 298 MxxBB /= stamp->normSquare2; 299 MyyBB /= stamp->normSquare2; 300 } 301 302 // XXX this makes the Chisq portion independent of the normalization and star flux 303 // but may be mis-scaling between stars of different fluxes 304 sumAA /= PS_SQR(stamp->normI2); 305 sumAB /= PS_SQR(stamp->normI2); 306 sumBB /= PS_SQR(stamp->normI2); 307 308 // fprintf (stderr, "i,j : %d %d : M(xx,yy)(AA,BB) : %f %f %f %f\n", i, j, MxxAA, MyyAA, MxxBB, MyyBB); 266 309 267 310 // Spatial variation of kernel coeffs … … 278 321 matrix->data.F64[jIndex + numParams][iIndex + numParams] = bb; 279 322 323 // add in second moments 324 if (MOMENTS) { 325 matrix->data.F64[iIndex][jIndex] += kernels->penalty * MxxAA; 326 matrix->data.F64[iIndex][jIndex] += kernels->penalty * MyyAA; 327 328 matrix->data.F64[jIndex][iIndex] += kernels->penalty * MxxAA; 329 matrix->data.F64[jIndex][iIndex] += kernels->penalty * MyyAA; 330 331 matrix->data.F64[iIndex + numParams][jIndex + numParams] += kernels->penalty * MxxBB; 332 matrix->data.F64[iIndex + numParams][jIndex + numParams] += kernels->penalty * MyyBB; 333 334 matrix->data.F64[jIndex + numParams][iIndex + numParams] += kernels->penalty * MxxBB; 335 matrix->data.F64[jIndex + numParams][iIndex + numParams] += kernels->penalty * MyyBB; 336 337 // XXX this uses the single moments, first try 338 // matrix->data.F64[iIndex][jIndex] += kernels->penalty * stamp->MxxI1->data.F32[i]*stamp->MxxI1->data.F32[j]; 339 // matrix->data.F64[iIndex][jIndex] += kernels->penalty * stamp->MyyI1->data.F32[i]*stamp->MyyI1->data.F32[j]; 340 // 341 // matrix->data.F64[jIndex][iIndex] += kernels->penalty * stamp->MxxI1->data.F32[i]*stamp->MxxI1->data.F32[j]; 342 // matrix->data.F64[jIndex][iIndex] += kernels->penalty * stamp->MyyI1->data.F32[i]*stamp->MyyI1->data.F32[j]; 343 // 344 // matrix->data.F64[iIndex + numParams][jIndex + numParams] += kernels->penalty * stamp->MxxI2->data.F32[i]*stamp->MxxI2->data.F32[j]; 345 // matrix->data.F64[iIndex + numParams][jIndex + numParams] += kernels->penalty * stamp->MyyI2->data.F32[i]*stamp->MyyI2->data.F32[j]; 346 // 347 // matrix->data.F64[jIndex + numParams][iIndex + numParams] += kernels->penalty * stamp->MxxI2->data.F32[i]*stamp->MxxI2->data.F32[j]; 348 // matrix->data.F64[jIndex + numParams][iIndex + numParams] += kernels->penalty * stamp->MyyI2->data.F32[i]*stamp->MyyI2->data.F32[j]; 349 } 280 350 matrix->data.F64[iIndex][jIndex + numParams] = ab; 281 351 matrix->data.F64[jIndex + numParams][iIndex] = ab; … … 290 360 for (int y = - footprint; y <= footprint; y++) { 291 361 for (int x = - footprint; x <= footprint; x++) { 292 double ab = iConv1->kernel[y][x] * jConv2->kernel[y][x] ;362 double ab = iConv1->kernel[y][x] * jConv2->kernel[y][x] * normValue; 293 363 if (weight) { 294 364 ab *= weight->kernel[y][x]; … … 301 371 } 302 372 373 // XXX this makes the Chisq portion independent of the normalization and star flux 374 // but may be mis-scaling between stars of different fluxes 375 sumAB /= PS_SQR(stamp->normI2); 376 303 377 // Spatial variation of kernel coeffs 304 378 for (int iTerm = 0, iIndex = i; iTerm < numPoly; iTerm++, iIndex += numKernels) { … … 315 389 double sumAI1 = 0.0; // Sum of A.I_1 products (for matrix, normalisation) 316 390 double sumBI1 = 0.0; // Sum of B.I_1 products (for matrix, normalisation) 391 392 double MxxAI1 = 0.0; 393 double MyyAI1 = 0.0; 394 double MxxBI2 = 0.0; 395 double MyyBI2 = 0.0; 317 396 for (int y = - footprint; y <= footprint; y++) { 318 397 for (int x = - footprint; x <= footprint; x++) { … … 322 401 float i2 = image2->kernel[y][x]; 323 402 324 double ai2 = a * i2 ;403 double ai2 = a * i2 * normValue; 325 404 double bi2 = b * i2; 326 double ai1 = a * i1 ;327 double bi1 = b * i1 ;405 double ai1 = a * i1 * PS_SQR(normValue); 406 double bi1 = b * i1 * normValue; 328 407 329 408 if (weight) { … … 345 424 sumAI1 += ai1; 346 425 sumBI1 += bi1; 347 } 348 } 426 427 if (MOMENTS) { 428 MxxAI1 += x*x*ai1; 429 MyyAI1 += y*y*ai1; 430 MxxBI2 += x*x*bi2; 431 MyyBI2 += y*y*bi2; 432 } 433 } 434 } 435 436 if (MOMENTS) { 437 MxxAI1 /= stamp->normSquare1 * PS_SQR(normValue); 438 MyyAI1 /= stamp->normSquare1 * PS_SQR(normValue); 439 MxxBI2 /= stamp->normSquare2; 440 MyyBI2 /= stamp->normSquare2; 441 } 442 443 // fprintf (stderr, "i : %d : M(xx,yy)(AI1,BI2) : %f %f %f %f\n", i, MxxAI1, MyyAI1, MxxBI2, MyyBI2); 444 445 // XXX this makes the Chisq portion independent of the normalization and star flux 446 // but may be mis-scaling between stars of different fluxes 447 sumAI1 /= PS_SQR(stamp->normI2); 448 sumBI1 /= PS_SQR(stamp->normI2); 449 sumAI2 /= PS_SQR(stamp->normI2); 450 sumBI2 /= PS_SQR(stamp->normI2); 451 349 452 // Spatial variation 350 453 for (int iTerm = 0, iIndex = i; iTerm < numPoly; iTerm++, iIndex += numKernels) { … … 353 456 double ai1 = sumAI1 * poly[iTerm]; 354 457 double bi1 = sumBI1 * poly[iTerm]; 355 vector->data.F64[iIndex] = ai2 - normValue * ai1; 356 vector->data.F64[iIndex + numParams] = bi2 - normValue * bi1; 458 vector->data.F64[iIndex] = ai2 - ai1; 459 vector->data.F64[iIndex + numParams] = bi2 - bi1; 460 461 // fprintf (stderr, "i : %d : V(I1,I2) : %f %f\n", i, vector->data.F64[iIndex], vector->data.F64[iIndex + numParams]); 462 463 // add in second moments 464 if (MOMENTS) { 465 vector->data.F64[iIndex] -= kernels->penalty * MxxAI1; 466 vector->data.F64[iIndex] -= kernels->penalty * MyyAI1; 467 468 vector->data.F64[iIndex + numParams] -= kernels->penalty * MxxBI2; 469 vector->data.F64[iIndex + numParams] -= kernels->penalty * MyyBI2; 470 } 357 471 } 358 472 } … … 414 528 // Contribution to chi^2: a_i^2 P_i 415 529 psAssert(isfinite(penalties1->data.F32[i]), "Invalid penalty"); 416 fprintf (stderr, "penalty: %f + %f (%f * %f)\n", matrix->data.F64[index][index], normSquare1 * penalties1->data.F32[i], normSquare1, penalties1->data.F32[i]);530 // fprintf (stderr, "penalty: %f + %f (%f * %f)\n", matrix->data.F64[index][index], normSquare1 * penalties1->data.F32[i], normSquare1, penalties1->data.F32[i]); 417 531 matrix->data.F64[index][index] += normSquare1 * penalties1->data.F32[i]; 418 532 419 fprintf (stderr, "penalty: (x^%d y^%d fwhm %f) : %f + %f (%f * %f)\n", kernels->u->data.S32[index], kernels->v->data.S32[index], kernels->widths->data.F32[index],420 matrix->data.F64[index + numParams][index + numParams], normSquare2 * penalties2->data.F32[i], normSquare2, penalties2->data.F32[i]);533 // fprintf (stderr, "penalty: (x^%d y^%d fwhm %f) : %f + %f (%f * %f)\n", kernels->u->data.S32[index], kernels->v->data.S32[index], kernels->widths->data.F32[index], 534 // matrix->data.F64[index + numParams][index + numParams], normSquare2 * penalties2->data.F32[i], normSquare2, penalties2->data.F32[i]); 421 535 matrix->data.F64[index + numParams][index + numParams] += normSquare2 * penalties2->data.F32[i]; 422 536 // matrix[i][i] is ~ (k_i * I_1)(k_i * I_1) … … 484 598 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 485 599 600 bool pmSubtractionCalculateMoments( 601 pmSubtractionKernels *kernels, // Kernels 602 pmSubtractionStampList *stamps) 603 { 604 PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(stamps, false); 605 606 // XXX skip this, right? 607 return true; 608 609 // these are only used by DUAL mode 610 if (kernels->mode != PM_SUBTRACTION_MODE_DUAL) return true; 611 612 psTimerStart("pmSubtractionCalculateMoments"); 613 614 int footprint = stamps->footprint; // Half-size of stamps 615 616 // Loop over each stamp and calculate its normalization factor 617 for (int i = 0; i < stamps->num; i++) { 618 pmSubtractionStamp *stamp = stamps->stamps->data[i]; // Stamp of interest 619 if (stamp->status == PM_SUBTRACTION_STAMP_REJECTED) continue; 620 if (stamp->status == PM_SUBTRACTION_STAMP_NONE) continue; 621 622 pmSubtractionCalculateMomentsStamp(kernels, stamp, footprint, stamps->normWindow2, stamps->normWindow1); 623 } 624 625 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Calculate moments: %f sec", psTimerClear("pmSubtractionCalculateMoments")); 626 627 return true; 628 } 629 630 bool pmSubtractionCalculateMomentsStamp( 631 pmSubtractionKernels *kernels, // Kernels 632 pmSubtractionStamp *stamp, // stamp on which to save normalization) 633 int footprint, // (Half-)Size of stamp 634 int normWindow1, // Window (half-)size for normalisation measurement 635 int normWindow2 // Window (half-)size for normalisation measurement 636 ) 637 { 638 double Mxx, Myy; 639 640 int numKernels = kernels->num; 641 642 // Generate convolutions: these are generated once and saved 643 if (!pmSubtractionConvolveStamp(stamp, kernels, footprint)) { 644 psError(psErrorCodeLast(), false, "Unable to convolve stamp"); 645 return false; 646 } 647 648 if (!stamp->MxxI1) { 649 stamp->MxxI1 = psVectorAlloc (numKernels, PS_TYPE_F32); 650 } 651 if (!stamp->MyyI1) { 652 stamp->MyyI1 = psVectorAlloc (numKernels, PS_TYPE_F32); 653 } 654 if (!stamp->MxxI2) { 655 stamp->MxxI2 = psVectorAlloc (numKernels, PS_TYPE_F32); 656 } 657 if (!stamp->MyyI2) { 658 stamp->MyyI2 = psVectorAlloc (numKernels, PS_TYPE_F32); 659 } 660 661 for (int i = 0; i < numKernels; i++) { 662 pmSubtractionCalculateMomentsKernel(&Mxx, &Myy, stamp->convolutions1->data[i], footprint, normWindow1); 663 stamp->MxxI1->data.F32[i] = Mxx / stamp->normI1; 664 stamp->MyyI1->data.F32[i] = Myy / stamp->normI1; 665 pmSubtractionCalculateMomentsKernel(&Mxx, &Myy, stamp->convolutions2->data[i], footprint, normWindow2); 666 stamp->MxxI2->data.F32[i] = Mxx / stamp->normI2; 667 stamp->MyyI2->data.F32[i] = Myy / stamp->normI2; 668 } 669 670 pmSubtractionCalculateMomentsKernel(&Mxx, &Myy, stamp->image1, footprint, normWindow1); 671 stamp->MxxI1raw = Mxx / stamp->normI1; 672 stamp->MyyI1raw = Myy / stamp->normI1; 673 674 pmSubtractionCalculateMomentsKernel(&Mxx, &Myy, stamp->image2, footprint, normWindow2); 675 stamp->MxxI2raw = Mxx / stamp->normI2; 676 stamp->MyyI2raw = Myy / stamp->normI2; 677 678 // fprintf (stderr, "Mxx I1: %f, Myy I1: %f, Mxx I2: %f, Myy I2: %f\n", stamp->MxxI1raw, stamp->MyyI1raw, stamp->MxxI2raw, stamp->MyyI2raw); 679 680 return true; 681 } 682 683 bool pmSubtractionCalculateMomentsKernel(double *Mxx, double *Myy, psKernel *image, int footprint, int window) { 684 685 double Sxx = 0.0; 686 double Syy = 0.0; 687 for (int y = - footprint; y <= footprint; y++) { 688 for (int x = - footprint; x <= footprint; x++) { 689 if (PS_SQR(x) + PS_SQR(y) > PS_SQR(window)) continue; 690 691 double flux = image->kernel[y][x]; 692 693 Sxx += PS_SQR(x) * flux; 694 Syy += PS_SQR(y) * flux; 695 } 696 } 697 *Mxx = Sxx; 698 *Myy = Syy; 699 return true; 700 } 701 702 ///--------- 703 486 704 bool pmSubtractionCalculateNormalization( 487 705 pmSubtractionStampList *stamps, … … 493 711 494 712 psVector *norms = psVectorAllocEmpty(stamps->num, PS_TYPE_F64); // Normalisations 713 psVector *norm2 = psVectorAllocEmpty(stamps->num, PS_TYPE_F64); // Normalisations 495 714 496 715 int footprint = stamps->footprint; // Half-size of stamps … … 510 729 } 511 730 psVectorAppend(norms, stamp->norm); 731 psVectorAppend(norm2, stamp->normSquare2 / stamp->normSquare1); 512 732 } 513 733 … … 517 737 psFree(stats); 518 738 psFree(norms); 739 psFree(norm2); 519 740 return false; 520 741 } 521 742 stamps->normValue = stats->robustMedian; 522 743 523 fprintf (stderr, "norm (1): %f\n", stamps->normValue); 744 psStatsInit(stats); 745 if (!psVectorStats(stats, norm2, NULL, NULL, 0)) { 746 psError(PM_ERR_DATA, false, "Unable to determine median normalisation"); 747 psFree(stats); 748 psFree(norms); 749 psFree(norm2); 750 return false; 751 } 752 stamps->normValue2 = stats->robustMedian; 753 754 fprintf (stderr, "norm (1): %f (%f)\n", stamps->normValue, stamps->normValue2); 524 755 525 756 psFree(stats); 526 757 psFree(norms); 758 psFree(norm2); 527 759 528 760 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Calculate normalization: %f sec", psTimerClear("pmSubtractionCalculateNormalization")); … … 560 792 } 561 793 stamp->norm = normI2 / normI1; 794 stamp->normI1 = normI1; 795 stamp->normI2 = normI2; 562 796 stamp->normSquare1 = normSquare1; 563 797 stamp->normSquare2 = normSquare2; … … 675 909 break; 676 910 case PM_SUBTRACTION_MODE_DUAL: 677 status = calculateDualMatrixVector(stamp->matrix, stamp->vector, stamps->normValue, stamp->image1, stamp->image2, 678 weight, window, stamp->convolutions1, stamp->convolutions2, 679 kernels, polyValues, footprint); 911 status = calculateDualMatrixVector(stamp, stamps->normValue, stamps->normValue2, weight, window, kernels, polyValues, footprint); 680 912 break; 681 913 default: … … 924 1156 #endif 925 1157 926 calculatePenalty(sumMatrix, sumVector, kernels, normSquare1, normSquare2); 1158 if (PENALTY) { 1159 calculatePenalty(sumMatrix, sumVector, kernels, normSquare1, normSquare2); 1160 } 927 1161 928 1162 psVector *solution = NULL; // Solution to equation! … … 930 1164 psVectorInit(solution, 0); 931 1165 932 solution = psMatrixSolveSVD(solution, sumMatrix, sumVector, 1e-6);1166 solution = psMatrixSolveSVD(solution, sumMatrix, sumVector, NAN); 933 1167 934 1168 #if (1) … … 947 1181 } 948 1182 1183 // for DUAL convolution analysis, we apply the normalization to I1 as follows: 1184 // I1c = norm I1 + \Sum_i a_i norm I1 \cross k_i 1185 // I2c = I2 + \Sum_i b_i I2 \cross k_i 1186 1187 // We absorb the normalization into a_i after the analysis is complete to be consistent 1188 // with the SINGLE definitions of the convolutions 1189 949 1190 int numKernels = kernels->num; 950 1191 for (int i = 0; i < numKernels * numSpatial; i++) { 951 // XXX fprintf (stderr, "keep\n");952 kernels->solution1->data.F64[i] = solution->data.F64[i] ;1192 // we solve for coefficients 1193 kernels->solution1->data.F64[i] = solution->data.F64[i] * stamps->normValue; 953 1194 kernels->solution2->data.F64[i] = solution->data.F64[i + numSolution1]; 954 1195 } -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionEquation.h
r29165 r29170 78 78 ); 79 79 80 bool pmSubtractionCalculateMoments( 81 pmSubtractionKernels *kernels, // Kernels 82 pmSubtractionStampList *stamps); 83 84 bool pmSubtractionCalculateMomentsStamp( 85 pmSubtractionKernels *kernels, // Kernels 86 pmSubtractionStamp *stamp, // stamp on which to save normalization) 87 int footprint, // (Half-)Size of stamp 88 int normWindow1, // Window (half-)size for normalisation measurement 89 int normWindow2 // Window (half-)size for normalisation measurement 90 ); 91 92 bool pmSubtractionCalculateMomentsKernel(double *Mxx, double *Myy, psKernel *image, int footprint, int window); 93 80 94 #endif -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionMatch.c
r29165 r29170 710 710 } 711 711 712 // step 0b : calculate the moments, pass along to the next steps via stamps->normValue 713 // XXX this step is now skipped -- delete 714 psTrace("psModules.imcombine", 3, "Calculating normalization...\n"); 715 if (!pmSubtractionCalculateMoments(kernels, stamps)) { 716 psError(psErrorCodeLast(), false, "Unable to calculate least-squares equation."); 717 goto MATCH_ERROR; 718 } 719 712 720 // step 1: generate the elements of the matrix equation Ax = B 713 721 psTrace("psModules.imcombine", 3, "Calculating kernel equations...\n"); -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionStamps.c
r29165 r29170 344 344 stamp->vector = NULL; 345 345 stamp->norm = NAN; 346 stamp->normI1 = NAN; 347 stamp->normI2 = NAN; 346 348 stamp->normSquare1 = NAN; 347 349 stamp->normSquare2 = NAN; 350 351 stamp->MxxI1 = NULL; 352 stamp->MyyI1 = NULL; 353 stamp->MxxI2 = NULL; 354 stamp->MyyI2 = NULL; 355 356 stamp->MxxI1raw = NAN; 357 stamp->MyyI1raw = NAN; 358 stamp->MxxI2raw = NAN; 359 stamp->MyyI2raw = NAN; 348 360 349 361 return stamp; -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionStamps.h
r29165 r29170 26 26 float normFrac; ///< Fraction of flux in window for normalisation window 27 27 float normValue; ///< calculated normalization 28 float normValue2; ///< calculated normalization 28 29 psKernel *window1; ///< window function generated from ensemble of stamps (input 1) 29 30 psKernel *window2; ///< window function generated from ensemble of stamps (input 2) … … 86 87 psVector *vector; ///< Least-squares vector, or NULL 87 88 double norm; ///< Normalisation difference 89 double normI1; ///< Sum(flux) for image 1 90 double normI2; ///< Sum(flux) for image 2 88 91 double normSquare1; ///< Sum(flux^2) for image 1 (used for penalty) 89 92 double normSquare2; ///< Sum(flux^2) for image 2 (used for penalty) 90 93 pmSubtractionStampStatus status; ///< Status of stamp 94 psVector *MxxI1; ///< second moments of convolution images 95 psVector *MyyI1; ///< second moments of convolution images 96 psVector *MxxI2; ///< second moments of convolution images 97 psVector *MyyI2; ///< second moments of convolution images 98 double MxxI1raw; 99 double MyyI1raw; 100 double MxxI2raw; 101 double MyyI2raw; 91 102 } pmSubtractionStamp; 92 103
Note:
See TracChangeset
for help on using the changeset viewer.
