Changeset 25210
- Timestamp:
- Aug 26, 2009, 4:56:14 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 16 edited
-
extsrc/gpcsw/gpcsrc/fits/burntool/burnparams.h (modified) (1 diff)
-
extsrc/gpcsw/gpcsrc/fits/burntool/burntool.c (modified) (2 diffs)
-
extsrc/gpcsw/gpcsrc/fits/burntool/man/burntool.1 (modified) (3 diffs)
-
extsrc/gpcsw/gpcsrc/fits/burntool/persist_fits.c (modified) (6 diffs)
-
extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c (modified) (4 diffs)
-
extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c (modified) (1 diff)
-
extsrc/gpcsw/gpcsrc/fits/libfh/fh.c (modified) (3 diffs)
-
extsrc/gpcsw/gpcsrc/fits/libfh/fh.h (modified) (3 diffs)
-
ippTools/src/pxchip.c (modified) (1 diff)
-
ippconfig/recipes/masks.16bit.config (modified) (1 diff)
-
ippconfig/recipes/ppImage.config (modified) (2 diffs)
-
ppImage/src/ppImage.h (modified) (4 diffs)
-
ppImage/src/ppImageBurntoolMask.c (modified) (6 diffs)
-
ppImage/src/ppImageDetrendReadout.c (modified) (1 diff)
-
ppImage/src/ppImageOptions.c (modified) (4 diffs)
-
ppImage/src/ppImageSetMaskBits.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/burnparams.h
r23924 r25210 55 55 EXTERN int EXPIRE_TRAIL_TIME; /* Expire trails after this interval */ 56 56 57 EXTERN int PERSIST_RETAIN; /* Retain bad-slope persistence fits */ 58 57 59 #endif /* _INCLUDED_burnparams_ */ -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/burntool.c
r24391 r25210 100 100 EXPIRE_TRAIL_TIME = 2000; /* Expire a persist after this [sec] */ 101 101 102 PERSIST_RETAIN = 0; /* Retain persists with bad slopes? */ 103 102 104 /* Parse the args */ 103 105 cellxy = -1; … … 174 176 } else if(strncmp(argv[i], "infits=", 7) == 0) { /* infits=fname */ 175 177 persistfitsfile = argv[i] + 7; 178 179 /* Keep persistence streaks which had a bad slope? */ 180 } else if(strncmp(argv[i], "persist=", 8) == 0) {/* persist={t|f} */ 181 PERSIST_RETAIN = argv[i][8] == 'y' || argv[i][8] == '1' || argv[i][8] == 't'; 176 182 177 183 /* Output file for PSF gallery */ -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/man/burntool.1
r24391 r25210 53 53 power laws; downward burns as exponentials. 54 54 55 The fit to downward, persistence burns may have an unreasonable "slope" 56 (meaning exponential sign), increasing away from the burn origin. 57 These are discarded unless "persist=t" is invoked. It is possible 58 for the fit to be fooled by uncataloged stars, so the persistence 59 can be kept in the output file with "persist=t" (although no fit 60 correction is applied) and they will propagate from input to output 61 until they finally achieve a legal fit with negligible amplitude. 62 55 63 Burntool also identifies really blasted areas which are saturated from 56 64 top to bottom. These cannot be fitted, but are carried along for … … 231 239 'in' takes precedence. 232 240 241 persist={t|f} 242 Retain persistence streaks whose fit slope turned out to be 243 unreasonable. 244 233 245 out=fname 234 246 Output file for burn streaks … … 332 344 BUGS: 333 345 090224: Still in development 346 090810: Squished a few memory bugs 334 347 335 348 SEE ALSO: -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/persist_fits.c
r23924 r25210 222 222 for(k=0; k<cell[j].npersist; k++) 223 223 { 224 if(cell[j].persist[k].fiterr) continue; 225 if(cell[j].persist[k].nfit <= 0) continue; 224 if(PERSIST_RETAIN) { 225 /* Keep fits which have a dubious slope */ 226 if(cell[j].persist[k].fiterr != FIT_SLOPE_ERROR) { 227 if(cell[j].persist[k].fiterr) continue; 228 if(cell[j].persist[k].nfit <= 0) continue; 229 } 230 } else { 231 if(cell[j].persist[k].fiterr) continue; 232 if(cell[j].persist[k].nfit <= 0) continue; 233 } 226 234 num_areas++; 227 235 num_fits += cell[j].persist[k].nfit; … … 232 240 { 233 241 if(!cell[j].burn[k].burned) continue; 234 if(cell[j].burn[k].fiterr && 235 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 236 if(cell[j].burn[k].nfit <= 0) continue; 242 if(PERSIST_RETAIN) { 243 /* Keep fits which have a dubious slope */ 244 if(cell[j].burn[k].fiterr != FIT_SLOPE_ERROR) { 245 if(cell[j].burn[k].fiterr && 246 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 247 if(cell[j].burn[k].nfit <= 0) continue; 248 } 249 } else { 250 if(cell[j].burn[k].fiterr && 251 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 252 if(cell[j].burn[k].nfit <= 0) continue; 253 } 237 254 num_areas++; 238 255 num_fits += cell[j].burn[k].nfit; … … 329 346 for(k=0; k<cell[j].npersist; k++) 330 347 { 331 if(cell[j].persist[k].fiterr) continue; 332 if(cell[j].persist[k].nfit <= 0) continue; 348 if(PERSIST_RETAIN) { 349 /* Keep fits which have a dubious slope */ 350 if(cell[j].persist[k].fiterr != FIT_SLOPE_ERROR) { 351 if(cell[j].persist[k].fiterr) continue; 352 if(cell[j].persist[k].nfit <= 0) continue; 353 } 354 } else { 355 if(cell[j].persist[k].fiterr) continue; 356 if(cell[j].persist[k].nfit <= 0) continue; 357 } 333 358 334 359 result = write_area_row(hu, data, table, row++, &(cell[j].persist[k])); … … 340 365 { 341 366 if(!cell[j].burn[k].burned) continue; 342 if(cell[j].burn[k].fiterr && 343 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 344 if(cell[j].burn[k].nfit <= 0) continue; 367 if(PERSIST_RETAIN) { 368 /* Keep fits which have a dubious slope */ 369 if(cell[j].burn[k].fiterr != FIT_SLOPE_ERROR) { 370 if(cell[j].burn[k].fiterr && 371 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 372 if(cell[j].burn[k].nfit <= 0) continue; 373 } 374 } else { 375 if(cell[j].burn[k].fiterr && 376 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 377 if(cell[j].burn[k].nfit <= 0) continue; 378 } 345 379 346 380 result = write_area_row(hu, data, table, row++, &(cell[j].burn[k])); … … 426 460 for(k=0; k<cell[j].npersist; k++) 427 461 { 428 if(cell[j].persist[k].fiterr) continue; 462 if(PERSIST_RETAIN) { 463 /* Keep fits which have a dubious slope */ 464 if(cell[j].persist[k].fiterr != FIT_SLOPE_ERROR) { 465 if(cell[j].persist[k].fiterr) continue; 466 } 467 } else { 468 if(cell[j].persist[k].fiterr) continue; 469 } 429 470 for(i=0; i<cell[j].persist[k].nfit; i++) 430 471 { … … 441 482 { 442 483 if(!cell[j].burn[k].burned) continue; 443 if(cell[j].burn[k].fiterr && 444 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 484 if(PERSIST_RETAIN) { 485 /* Keep fits which have a dubious slope */ 486 if(cell[j].burn[k].fiterr != FIT_SLOPE_ERROR) { 487 if(cell[j].burn[k].fiterr && 488 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 489 } 490 } else { 491 if(cell[j].burn[k].fiterr && 492 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 493 } 445 494 446 495 for(i=0; i<cell[j].burn[k].nfit; i++) -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c
r23924 r25210 51 51 &boxbuf[nbox].slope, &boxbuf[nbox].nfit, 52 52 &boxbuf[nbox].sxfit, &boxbuf[nbox].exfit); 53 if(boxbuf[nbox].nfit <= 0) continue; 54 boxbuf[nbox].zero = (double *)calloc(boxbuf[nbox].nfit, sizeof(double)); 55 boxbuf[nbox].xfit = (int *)calloc(boxbuf[nbox].nfit, sizeof(int)); 56 boxbuf[nbox].yfit = (int *)calloc(boxbuf[nbox].nfit, sizeof(int)); 57 for(i=0; i<boxbuf[nbox].nfit; i++) { 58 if(fgets(line, 1024, fp) == NULL) { 59 fprintf(stderr, "\rerror: short read of burn lines\n"); 60 return(-1); 61 } 62 sscanf(line, "%d %d %lf\n", &boxbuf[nbox].xfit[i], 63 &boxbuf[nbox].yfit[i], &boxbuf[nbox].zero[i]); 53 if(boxbuf[nbox].nfit > 0) { 54 boxbuf[nbox].zero = (double *)calloc(boxbuf[nbox].nfit, sizeof(double)); 55 boxbuf[nbox].xfit = (int *)calloc(boxbuf[nbox].nfit, sizeof(int)); 56 boxbuf[nbox].yfit = (int *)calloc(boxbuf[nbox].nfit, sizeof(int)); 57 for(i=0; i<boxbuf[nbox].nfit; i++) { 58 if(fgets(line, 1024, fp) == NULL) { 59 fprintf(stderr, "\rerror: short read of burn lines\n"); 60 return(-1); 61 } 62 sscanf(line, "%d %d %lf\n", &boxbuf[nbox].xfit[i], 63 &boxbuf[nbox].yfit[i], &boxbuf[nbox].zero[i]); 64 } 64 65 } 65 66 boxbuf[nbox].fiterr = 0; … … 147 148 for(kp=0; kp<n; kp++) { 148 149 k = boxid[kp]; 149 zk = box[k].zero[box[k].nfit/2]; 150 zk = 0.0; 151 if(box[k].nfit > 0) zk = box[k].zero[box[k].nfit/2]; 150 152 for(jp=kp+1; jp<n; jp++) { 151 153 j = boxid[jp]; 152 zj = box[j].zero[box[j].nfit/2]; 154 zj = 0.0; 155 if(box[j].nfit > 0) zj = box[j].zero[box[j].nfit/2]; 153 156 if(ABS(yctr[jp]-yctr[kp]) > DIFFERENT_STREAK) { 154 157 /* Trim back the feebler streak */ … … 238 241 /* First: patched up persists */ 239 242 for(k=0; k<cell[j].npersist; k++) { 240 if(cell[j].persist[k].fiterr) continue; 241 if(cell[j].persist[k].nfit <= 0) continue; 243 244 if(PERSIST_RETAIN) { 245 /* Keep fits which have a dubious slope */ 246 if(cell[j].persist[k].fiterr != FIT_SLOPE_ERROR) { 247 if(cell[j].persist[k].fiterr) continue; 248 if(cell[j].persist[k].nfit <= 0) continue; 249 } 250 } else { 251 if(cell[j].persist[k].fiterr) continue; 252 if(cell[j].persist[k].nfit <= 0) continue; 253 } 242 254 fprintf(fp, "%3d %7d %3d %3d %5d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %1d %1d %9.6f %3d %3d %3d\n", 243 255 j, cell[j].persist[k].time, … … 262 274 for(k=0; k<cell[j].nburn; k++) { 263 275 if(!cell[j].burn[k].burned) continue; 264 if(cell[j].burn[k].fiterr && 265 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 266 if(cell[j].burn[k].nfit <= 0) continue; 276 if(PERSIST_RETAIN) { 277 /* Keep fits which have a dubious slope */ 278 if(cell[j].burn[k].fiterr != FIT_SLOPE_ERROR) { 279 if(cell[j].burn[k].fiterr && 280 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 281 if(cell[j].burn[k].nfit <= 0) continue; 282 } 283 } else { 284 if(cell[j].burn[k].fiterr && 285 cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue; 286 if(cell[j].burn[k].nfit <= 0) continue; 287 } 267 288 268 289 i = (cell[j].burn[k].ex - cell[j].burn[k].sx + 1) / 2; -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c
r25145 r25210 226 226 /* FIXME: sanity check fits */ 227 227 if(slope >= FIT_MAX_SLOPE || slope < FIT_MIN_SLOPE) { 228 box->slope = slope; 229 box->nfit = 0; 228 230 box->fiterr = FIT_SLOPE_ERROR; 229 231 return(-1); -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/libfh/fh.c
r24391 r25210 1039 1039 newval[strlen(newval) - 1] = '\0'; 1040 1040 fh_set_str(hu, idx, name, newval, comment); 1041 free(newval); 1041 1042 return; 1042 1043 } … … 1519 1520 i++; 1520 1521 } 1522 return FH_SUCCESS; 1523 } 1524 1525 static void 1526 pad_header(HeaderUnit hu, int n) 1527 { 1528 int i; 1529 double idx = 900000000; 1530 1531 for (i = 0; i < n; i++) 1532 { 1533 fh_set_card(hu, idx++, FH_RESERVE); 1534 } 1535 } 1536 1537 fh_result 1538 fh_copy(HeaderUnit hu, const HeaderUnit source_) 1539 { 1540 fh_result result; 1541 int reserve; 1542 1543 result = fh_merge(hu, source_); 1544 if (result != FH_SUCCESS) return result; 1545 reserve = fh_get_reserve(source_); 1546 if (reserve) pad_header(hu, reserve); 1521 1547 return FH_SUCCESS; 1522 1548 } … … 1757 1783 } 1758 1784 1785 int 1786 fh_get_reserve(HeaderUnit hu) 1787 { 1788 HeaderUnitStruct* list = FH_HU(hu); 1789 1790 if (!list) 1791 { 1792 log_error("invalid argument to fh_get_reserve()"); 1793 return -1; 1794 } 1795 1796 if (list->reserve) 1797 return list->reserve; 1798 else 1799 return list->reserve_found; 1800 } 1801 1759 1802 fh_result 1760 1803 fh_rewrite(HeaderUnit hu) -
branches/czw_branch/cleanup/extsrc/gpcsw/gpcsrc/fits/libfh/fh.h
r23924 r25210 174 174 * is used to create a new FITS header. NOT for use with fh_rewrite(). 175 175 */ 176 int fh_get_reserve(HeaderUnit hu); 177 /* 178 * Get the current setting or the number of reserve cards found in 179 * a header unit. Returns -1 if hu is invalid. 180 */ 176 181 fh_result fh_validate(HeaderUnit hu); /* fh_validate.c; for use by fhtool.c */ 177 182 … … 386 391 double fh_idx(HeaderUnit hu); /* idx of the last card returned by fh_next */ 387 392 fh_result fh_merge(HeaderUnit hu, const HeaderUnit source); /* source unchanged */ 393 fh_result fh_copy(HeaderUnit hu, const HeaderUnit source); /* fh_merge+keep reserve */ 388 394 389 395 /* --------------------------------------------------------- … … 459 465 */ 460 466 461 462 467 #endif /* _INCLUDED_fh */ -
branches/czw_branch/cleanup/ippTools/src/pxchip.c
r25149 r25210 69 69 psMetadataAddF64(md, PS_LIST_TAIL, "-posang_min", 0, "search by min rotator position angle", NAN); 70 70 psMetadataAddF64(md, PS_LIST_TAIL, "-posang_max", 0, "search by max rotator position angle", NAN); 71 <<<<<<< .mine72 =======73 71 psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_min", 0, "search by min solar angle", NAN); 74 72 psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_max", 0, "search by max solar angle", NAN); 75 psMetadataAddStr(md, PS_LIST_TAIL, "-object", 0, "search by exposure object", NULL);76 >>>>>>> .r2509977 73 psMetadataAddStr(md, PS_LIST_TAIL, "-object", 0, "search by exposure object", NULL); 78 74 psMetadataAddStr(md, PS_LIST_TAIL, "-comment", 0, "search by comment field (LIKE comparison)", NULL); -
branches/czw_branch/cleanup/ippconfig/recipes/masks.16bit.config
r23498 r25210 20 20 21 21 # Mask values which represent non-astronomical structures 22 BURNTOOL U16 0x0080 # Pixel may contain uncorrected streak. 22 23 CR U16 0x0100 # Pixel contains a cosmic ray 23 24 SPIKE U16 0x0200 # Pixel contains a diffraction spike -
branches/czw_branch/cleanup/ippconfig/recipes/ppImage.config
r24951 r25210 16 16 MASK.SATURATED BOOL TRUE # Mask the saturated pixels 17 17 MASK.LOW BOOL TRUE # Mask pixels below valid range 18 MASK.BURNTOOL BOOL TRUE # Mask potential burntool trails 18 19 VARIANCE.BUILD BOOL FALSE # Build internal variance image 19 20 PATTERN BOOL FALSE # Fit and remove pattern noise? … … 54 55 ## if we use multithreaded detrending, detrend this number of rows per thread 55 56 SCAN.ROWS S32 100 57 58 BURNTOOL.TRAILS U16 0x01 56 59 57 60 # Non-linearity correction -
branches/czw_branch/cleanup/ppImage/src/ppImage.h
r24951 r25210 26 26 bool doMaskBuild; // Build internal mask 27 27 bool doVarianceBuild; // Build internal variance map 28 bool doMaskBurntool; // mask potential burntool trails 28 29 bool doMaskSat; // mask saturated pixels 29 30 bool doMaskLow; // mask low pixels … … 74 75 psImageMaskType darkMask; // Mask value to give bad dark pixels 75 76 psImageMaskType blankMask; // Mask value to give blank pixels 76 77 psImageMaskType burntoolMask; // Suspect pixels that fall where a burntool trail is expected. 77 78 // non-linear correction parameters 78 79 psDataType nonLinearType; … … 82 83 // options for the analysis 83 84 pmOverscanOptions *overscan; // Overscan options 84 85 int burntoolTrails; 85 86 // binning parameters 86 87 int xBin1; // x-binning, scale 1 … … 156 157 bool ppImageCheckCTE(pmConfig *config, ppImageOptions *options, pmFPAview *view); 157 158 159 bool ppImageBurntoolMask(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *mask); 160 158 161 // Record which detrend file was used for the detrending 159 162 bool ppImageDetrendRecord( -
branches/czw_branch/cleanup/ppImage/src/ppImageBurntoolMask.c
r25159 r25210 3 3 #endif 4 4 5 #define PPIMAGE_BURNTOOL_DEBUG 1 6 5 7 #include "ppImage.h" 6 8 7 bool ppImageBurntoolMask (pmConfig *config, ppImageOptions *options, pmFPAview *view) { 8 9 bool ppImageBurntoolMask (pmConfig *config, ppImageOptions *options, pmFPAview *view,pmReadout *mask) { 9 10 bool status = true; 11 int burntool_cell; 12 /* Find input filename */ 10 13 pmFPAfile *inputFile = psMetadataLookupPtr(&status , config->files, "PPIMAGE.INPUT"); 11 14 if (!status) { … … 13 16 return(false); 14 17 } 15 16 18 psFits *fits = inputFile->fits; 17 19 20 /* Read input header, and find the burntool data table. */ 21 psMetadata *phu = psFitsReadHeader(NULL, fits); 22 18 23 if (!psFitsMoveExtName(fits,"burntool_areas")) { 19 24 psError(PS_ERR_IO,false, "Unable to find extension burntool_areas"); … … 21 26 } 22 27 long Nrows = psFitsTableSize(fits); 28 23 29 long row = 0; 24 25 p mFPAview *detview = pmFPAviewAlloc(0);26 *detview = *view; 27 detview->readout = 0;28 pmReadout *mask = pmFPAfileThisReadout(config->files,detview,"PPIMAGE.MASK");30 31 psLogMsg ("ppImageBurntoolMask", 4, "Inside burntool mask %ld", Nrows); 32 33 /* Redirects and Memory juggling. */ 34 view->readout = 0; 29 35 psImage *image = mask->mask; 30 36 31 psImageMaskType maskValue = psMetadataLookupS32(&status,config->files,"PPIMAGE.BURNTOOL_MASK");32 37 38 /* Set the maskValue from the recipes. */ 39 psImageMaskType maskValue = options->burntoolMask; 40 #ifdef PPIMAGE_BURNTOOL_DEBUG 41 psLogMsg("ppImageBurntoolMask", 4, "Status: %ld %d\n",Nrows,maskValue); 42 #endif 43 44 burntool_cell = view->cell; 45 burntool_cell = (view->cell % 8) * 8 + (view->cell - (view->cell % 8)) / 8; 46 psLogMsg("ppImageBurntoolMask", 4, "Cell mapping: %d %d %d\n",view->cell,burntool_cell,-1); 33 47 for (row = 0; row < Nrows; row++) { 34 48 psMetadata *rowMD = psFitsReadTableRow(fits,row); 35 49 36 if (psMetadataLookupS32(&status,rowMD,"cell") == detview->cell) { 37 38 if (psMetadataLookupS32(&status,rowMD,"func") != -1) { // This should be an actual check 39 50 if (psMetadataLookupS32(&status,rowMD,"cell") == burntool_cell) { 51 if (((options->burntoolTrails & 0x01)&&(psMetadataLookupS32(&status,rowMD,"nfit") == 0))|| 52 ((options->burntoolTrails & 0x02)&&(psMetadataLookupS32(&status,rowMD,"up") == 1))|| 53 ((options->burntoolTrails & 0x04)&&(psMetadataLookupS32(&status,rowMD,"up") == 0))) { 54 /* If the fit fails, burntool reports zero here. This 55 signifies that it expected to see a trail (else why 56 fit) but did not find it when it attempted to 57 correct. */ 58 #ifdef PPIMAGE_BURNTOOL_DEBUG 59 psLogMsg ("ppImageBurntoolMask", 4, "Masking! %d (%d %d %d) %d %d", 60 psMetadataLookupS32(&status,rowMD,"cell"), 61 ((options->burntoolTrails & 0x0001)&&(psMetadataLookupS32(&status,rowMD,"nfit") == 0)), 62 ((options->burntoolTrails & 0x02)&&(psMetadataLookupS32(&status,rowMD,"up") == 1)), 63 ((options->burntoolTrails & 0x04)&&(psMetadataLookupS32(&status,rowMD,"up") == 0)), 64 options->burntoolTrails, 65 maskValue 66 ); 67 #endif 40 68 for (int i = psMetadataLookupS32(&status,rowMD,"sxfit"); 41 69 i <= psMetadataLookupS32(&status,rowMD,"exfit"); … … 44 72 if (psMetadataLookupS32(&status,rowMD,"up") == 0) { 45 73 for (int j = 0; j <= psMetadataLookupS32(&status,rowMD,"y1p"); j++) { 74 /* #ifdef PPIMAGE_BURNTOOL_DEBUG */ 75 /* psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", */ 76 /* i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); */ 77 /* #endif */ 46 78 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 47 79 } … … 49 81 else { 50 82 for (int j = psMetadataLookupS32(&status,rowMD,"y1m"); j < image->numRows ; j++) { 83 /* #ifdef PPIMAGE_BURNTOOL_DEBUG */ 84 /* psLogMsg("ppImageBurntoolMask", 4, "Noisy!: %d %d %d %d\n", */ 85 /* i,j,image->data.PS_TYPE_IMAGE_MASK_DATA[j][i],maskValue); */ 86 /* #endif */ 51 87 image->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskValue; 52 88 } … … 56 92 } 57 93 } 94 psFree(rowMD); 58 95 } 59 96 psFree(phu); 60 97 return(status); 61 98 } -
branches/czw_branch/cleanup/ppImage/src/ppImageDetrendReadout.c
r24951 r25210 26 26 pmMaskBadPixels(input, mask, options->maskValue); 27 27 } 28 if (options->doMaskBurntool) { 29 ppImageBurntoolMask(config,options,view,input); 30 } 31 28 32 29 33 # if 0 -
branches/czw_branch/cleanup/ppImage/src/ppImageOptions.c
r24951 r25210 21 21 options->doMaskSat = false; // mask saturated pixels 22 22 options->doMaskLow = false; // mask low pixels 23 options->doMaskBurntool = false; // mask potential burntool trails 23 24 options->doVarianceBuild = false; // Build internal variance 24 25 options->doMask = false; // Mask bad pixels … … 64 65 options->blankMask = 0x00; // Blank (no data, cell gap) pixels (supplied to pmChipMosaic, pmFPAMosaic) 65 66 options->markValue = 0x00; // A safe bit for internal marking 66 67 options->burntoolMask = 0x00; // Suspect pixels that fall where a burntool trail is expected. 68 options->burntoolTrails = 0x00; // Which types of burntool areas to mask. 67 69 // crosstalk options 68 70 options->doCrosstalkMeasure = false; // measure crosstalk … … 219 221 options->doMaskSat = psMetadataLookupBool(NULL, recipe, "MASK.SATURATED"); 220 222 options->doMaskLow = psMetadataLookupBool(NULL, recipe, "MASK.LOW"); 223 options->doMaskBurntool = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL"); 221 224 options->doVarianceBuild = psMetadataLookupBool(NULL, recipe, "VARIANCE.BUILD"); 222 225 … … 245 248 options->applyParity = psMetadataLookupBool(NULL, recipe, "APPLY.CELL.PARITY"); 246 249 250 options->burntoolTrails = psMetadataLookupU16(&status, recipe, "BURNTOOL.TRAILS"); 251 if (!status) { 252 psWarning("BURNTOOL.TRAILS not found in recipe: setting to default value.\n"); 253 } 254 247 255 // binned image options 248 256 options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 249 257 if (!status) { 250 258 psWarning("BIN1.XBIN not found in recipe: setting to default value.\n"); 259 options->xBin1 = 4; 251 260 } 252 261 options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 253 262 if (!status) { 254 263 psWarning("BIN1.YBIN not found in recipe: setting to default value.\n"); 255 options->yBin1 = 16;264 options->yBin1 = 4; 256 265 } 257 266 -
branches/czw_branch/cleanup/ppImage/src/ppImageSetMaskBits.c
r24079 r25210 38 38 psAssert (options->lowMask, "low mask not set"); 39 39 40 // mask for suspect regions due to burntool 41 options->burntoolMask = pmConfigMaskGet("BURNTOOL",config); 42 psAssert (options->burntoolMask, "burntool mask not set"); 43 40 44 // save MASK and MARK on the PSPHOT recipe 41 45 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE);
Note:
See TracChangeset
for help on using the changeset viewer.
