Changeset 42395 for trunk/ppImage/src/ppImageBurntoolMask.c
- Timestamp:
- Feb 14, 2023, 12:59:09 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageBurntoolMask.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageBurntoolMask.c
r26895 r42395 24 24 } 25 25 long Nrows = psFitsTableSize(fits); 26 27 26 long row = 0; 28 27 29 28 psLogMsg ("ppImageBurntoolMask", 4, "Inside burntool mask %ld", Nrows); 30 29 30 /* The new burntool tables and method coming into play in 2022 has a slightly different format (an extra column). Need to differentiate */ 31 psS16 BURNTOOL_STATE_GOOD = psMetadataLookupS16(NULL, config->camera, "BURNTOOL.STATE.GOOD"); 32 31 33 /* Redirects and Memory juggling. */ 32 34 view->readout = 0; 33 35 psImage *image = mask->mask; 34 35 36 36 37 /* Set the maskValue from the recipes. */ … … 64 65 ); 65 66 #endif 66 for (int i = psMetadataLookupS32(&status,rowMD,"sxfit"); 67 68 /* do separate masking strategy for old (14 and lower) and new burntool tables*/ 69 if (BURNTOOL_STATE_GOOD >= 15) { 70 for (int i = psMetadataLookupS32(&status,rowMD,"sxfit"); 67 71 i <= psMetadataLookupS32(&status,rowMD,"exfit"); 68 72 i++) { 69 73 70 if (psMetadataLookupS32(&status,rowMD,"up") == 0) {71 for (int j = 0; j <= psMetadataLookupS32(&status,rowMD,"y1p"); j++) {72 #if PPIMAGE_BURNTOOL_DEBUG73 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n",74 if (psMetadataLookupS32(&status,rowMD,"up") == 0) { 75 for (int j = psMetadataLookupS32(&status,rowMD,"eyfit"); j <= psMetadataLookupS32(&status,rowMD,"y0"); j++) { 76 #if PPIMAGE_BURNTOOL_DEBUG 77 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", 74 78 i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); 75 #endif 76 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 79 #endif 80 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 81 } 82 } else { 83 for (int j = psMetadataLookupS32(&status,rowMD,"sy"); j < psMetadataLookupS32(&status,rowMD,"eyfit") ; j++) { 84 #if PPIMAGE_BURNTOOL_DEBUG 85 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", 86 i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); 87 #endif 88 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 89 } 77 90 } 78 91 } 79 else { 80 for (int j = psMetadataLookupS32(&status,rowMD,"y1m"); j < image->numRows ; j++) { 81 #if PPIMAGE_BURNTOOL_DEBUG 82 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", 92 } else { 93 for (int i = psMetadataLookupS32(&status,rowMD,"sxfit"); 94 i <= psMetadataLookupS32(&status,rowMD,"exfit"); 95 i++) { 96 97 if (psMetadataLookupS32(&status,rowMD,"up") == 0) { 98 for (int j = 0; j <= psMetadataLookupS32(&status,rowMD,"y1p"); j++) { 99 #if PPIMAGE_BURNTOOL_DEBUG 100 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", 83 101 i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); 84 #endif 85 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 102 #endif 103 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 104 } 105 } 106 else { 107 for (int j = psMetadataLookupS32(&status,rowMD,"y1m"); j < image->numRows ; j++) { 108 #if PPIMAGE_BURNTOOL_DEBUG 109 psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", 110 i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); 111 #endif 112 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 113 } 86 114 } 87 115 } 116 88 117 } 118 89 119 90 120 }
Note:
See TracChangeset
for help on using the changeset viewer.
