Changeset 42293 for trunk/psModules/src/objects/pmSourcePhotometry.c
- Timestamp:
- Sep 27, 2022, 5:08:10 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourcePhotometry.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourcePhotometry.c
r41705 r42293 53 53 54 54 // make this a bit more clever and dynamic 55 static psImageMaskType maskSuspect = 0; 56 static psImageMaskType maskSpike = 0; 57 static psImageMaskType maskStarCore = 0; 58 static psImageMaskType maskBurntool = 0; 59 static psImageMaskType maskConvPoor = 0; 60 static psImageMaskType maskGhost = 0; 61 static psImageMaskType maskGlint = 0; 62 static psImageMaskType maskCrosstalk = 0; 55 static psImageMaskType maskSuspect = 0; 56 static psImageMaskType maskSpike = 0; 57 static psImageMaskType maskStarCore = 0; 58 static psImageMaskType maskBurntool = 0; 59 static psImageMaskType maskConvPoor = 0; 60 static psImageMaskType maskGhost = 0; 61 static psImageMaskType maskGlint = 0; 62 static psImageMaskType maskCrosstalk = 0; 63 static psImageMaskType maskCTE = 0; 63 64 64 65 bool pmSourceMagnitudesInit (pmConfig *config, psMetadata *recipe) … … 69 70 // we are going to test specially against these poor values 70 71 if (config) { 71 maskSpike = pmConfigMaskGet("SPIKE", config); 72 maskStarCore = pmConfigMaskGet("STARCORE", config); 73 maskBurntool = pmConfigMaskGet("BURNTOOL", config); 74 maskConvPoor = pmConfigMaskGet("CONV.POOR", config); 75 maskGhost = pmConfigMaskGet("GHOST", config); 76 maskGlint = pmConfigMaskGet("GHOST", config); 77 maskCrosstalk = pmConfigMaskGet("CROSSTALK", config); 78 maskSuspect = maskSpike | maskStarCore | maskBurntool | maskConvPoor; 72 maskSpike = pmConfigMaskGet("SPIKE", config); 73 maskStarCore = pmConfigMaskGet("STARCORE", config); 74 maskBurntool = pmConfigMaskGet("BURNTOOL", config); 75 maskConvPoor = pmConfigMaskGet("CONV.POOR", config); 76 maskGhost = pmConfigMaskGet("GHOST", config); 77 maskGlint = pmConfigMaskGet("GHOST", config); 78 maskCrosstalk = pmConfigMaskGet("CROSSTALK", config); 79 maskCTE = pmConfigMaskGet("CTE", config); 80 maskSuspect = maskSpike | maskStarCore | maskBurntool | maskConvPoor; 79 81 } 80 82 … … 440 442 float convpoorSum = 0; 441 443 float ghostSum = 0; 444 float cteSum = 0; 442 445 443 446 int Xo, Yo, dP; … … 534 537 convpoorSum += value; 535 538 } 539 // count pixels which are masked with an mask bit (bad or poor) 540 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[my][mx] & maskCTE) { 541 cteSum += value; 542 } 543 536 544 } 537 545 } … … 555 563 if ((convpoorSum/modelSum) > 0.25) { 556 564 source->mode2 |= PM_SOURCE_MODE2_ON_CONVPOOR; 565 } 566 if ((cteSum/modelSum) > 0.25) { 567 source->mode2 |= PM_SOURCE_MODE2_ON_CTE; 557 568 } 558 569 … … 614 625 float convpoorSum = 0; 615 626 float ghostSum = 0; 627 float cteSum = 0; 616 628 617 629 int Xo, Yo, dP; … … 683 695 convpoorSum += 1.; 684 696 } 697 // count pixels which are masked with an mask bit (bad or poor) 698 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[my][mx] & maskCTE) { 699 cteSum += 1.; 700 } 685 701 } 686 702 } … … 701 717 if ((convpoorSum/modelSum) > 0.25) { 702 718 source->mode2 |= PM_SOURCE_MODE2_ON_CONVPOOR; 719 } 720 if ((cteSum/modelSum) > 0.25) { 721 source->mode2 |= PM_SOURCE_MODE2_ON_CTE; 703 722 } 704 723
Note:
See TracChangeset
for help on using the changeset viewer.
