Changeset 21183 for trunk/psModules/src/objects/pmSourcePhotometry.c
- Timestamp:
- Jan 26, 2009, 8:40:07 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourcePhotometry.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourcePhotometry.c
r20937 r21183 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.4 7$ $Name: not supported by cvs2svn $6 * @date $Date: 200 8-12-08 02:51:14$5 * @version $Revision: 1.48 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2009-01-27 06:39:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 66 66 67 67 // XXX masked region should be (optionally) elliptical 68 bool pmSourceMagnitudes (pmSource *source, pmPSF *psf, pmSourcePhotometryMode mode, ps MaskType maskVal)68 bool pmSourceMagnitudes (pmSource *source, pmPSF *psf, pmSourcePhotometryMode mode, psImageMaskType maskVal) 69 69 { 70 70 PS_ASSERT_PTR_NON_NULL(source, false); … … 306 306 307 307 // return source aperture magnitude 308 bool pmSourcePhotometryAper (float *apMag, pmModel *model, psImage *image, psImage *mask, ps MaskType maskVal)308 bool pmSourcePhotometryAper (float *apMag, pmModel *model, psImage *image, psImage *mask, psImageMaskType maskVal) 309 309 { 310 310 PS_ASSERT_PTR_NON_NULL(apMag, false); … … 324 324 325 325 psF32 **imData = image->data.F32; 326 ps U8 **mkData = mask->data.U8;326 psImageMaskType **mkData = mask->data.PS_TYPE_IMAGE_MASK_DATA; 327 327 328 328 // measure apMag … … 344 344 345 345 // return source aperture magnitude 346 bool pmSourcePixelWeight (float *pixWeight, pmModel *model, psImage *image, psImage *mask, ps MaskType maskVal)346 bool pmSourcePixelWeight (float *pixWeight, pmModel *model, psImage *image, psImage *mask, psImageMaskType maskVal) 347 347 { 348 348 PS_ASSERT_PTR_NON_NULL(pixWeight, false); … … 412 412 if (my >= NY) 413 413 continue; 414 if (mask->data. U8[my][mx] & maskVal)414 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[my][mx] & maskVal) 415 415 continue; 416 416 … … 475 475 for (yi = yIs, yj = yJs; yi < yIe; yi++, yj++) { 476 476 for (xi = xIs, xj = xJs; xi < xIe; xi++, xj++) { 477 if (Ti->data. U8[yi][xi])478 continue; 479 if (Tj->data. U8[yj][xj])477 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 478 continue; 479 if (Tj->data.PS_TYPE_IMAGE_MASK_DATA[yj][xj]) 480 480 continue; 481 481 … … 540 540 for (yi = yIs, yj = yJs; yi < yIe; yi++, yj++) { 541 541 for (xi = xIs, xj = xJs; xi < xIe; xi++, xj++) { 542 if (Ti->data. U8[yi][xi])543 continue; 544 if (Tj->data. U8[yj][xj])542 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 543 continue; 544 if (Tj->data.PS_TYPE_IMAGE_MASK_DATA[yj][xj]) 545 545 continue; 546 546 … … 578 578 for (int yi = 0; yi < Pi->numRows; yi++) { 579 579 for (int xi = 0; xi < Pi->numCols; xi++) { 580 if (Ti->data. U8[yi][xi])580 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 581 581 continue; 582 582 if (!unweighted_sum) { … … 613 613 614 614 bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *weight, 615 ps MaskType maskVal)615 psImageMaskType maskVal) 616 616 { 617 617 PS_ASSERT_PTR_NON_NULL(model, false); … … 624 624 for (int j = 0; j < image->numRows; j++) { 625 625 for (int i = 0; i < image->numCols; i++) { 626 if (mask->data. U8[j][i] & maskVal)626 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[j][i] & maskVal) 627 627 continue; 628 628 if (weight->data.F32[j][i] <= 0) … … 657 657 for (int yi = 0; yi < Pi->numRows; yi++) { 658 658 for (int xi = 0; xi < Pi->numCols; xi++) { 659 if (Ti->data. U8[yi][xi])659 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 660 660 continue; 661 661 if (!unweighted_sum) { … … 734 734 for (yi = yIs, yj = yJs; yi < yIe; yi++, yj++) { 735 735 for (xi = xIs, xj = xJs; xi < xIe; xi++, xj++) { 736 if (Ti->data. U8[yi][xi])737 continue; 738 if (Tj->data. U8[yj][xj])736 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 737 continue; 738 if (Tj->data.PS_TYPE_IMAGE_MASK_DATA[yj][xj]) 739 739 continue; 740 740 … … 798 798 for (yi = yIs, yj = yJs; yi < yIe; yi++, yj++) { 799 799 for (xi = xIs, xj = xJs; xi < xIe; xi++, xj++) { 800 if (Ti->data. U8[yi][xi])801 continue; 802 if (Tj->data. U8[yj][xj])800 if (Ti->data.PS_TYPE_IMAGE_MASK_DATA[yi][xi]) 801 continue; 802 if (Tj->data.PS_TYPE_IMAGE_MASK_DATA[yj][xj]) 803 803 continue; 804 804
Note:
See TracChangeset
for help on using the changeset viewer.
