Changeset 42392 for trunk/extsrc/gpcsw/gpcsrc/fits/burntool/burntool.c
- Timestamp:
- Feb 14, 2023, 12:48:54 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/extsrc/gpcsw/gpcsrc/fits/burntool/burntool.c
r26766 r42392 89 89 PSF_THRESH = 5000; /* Threshold for a star to be a PSF */ 90 90 91 BMASK_GROW = 5.0; /* Growth of burned boxes in size*/92 RMASK_GROW = 3.0; /* Growth of burn/star in diameter */91 BMASK_GROW = 3.0; /* Growth of burned boxes in pixels */ 92 RMASK_GROW = 2.0; /* Growth of burn/star in diameter */ 93 93 94 94 MIN_PSF_SIZE = 3; /* Min box size for stamp selection */ … … 97 97 MAX_PSF_PER_CELL = 20; /* Max number of PSF stars accepted per cell */ 98 98 99 NEGLIGIBLE_TRAIL = 0. 5; /* Don't sweat less than this * sigma */99 NEGLIGIBLE_TRAIL = 0.4; /* Don't sweat less than this * sigma */ 100 100 EXPIRE_TRAIL_TIME = 2000; /* Expire a persist after this [sec] */ 101 101 … … 564 564 565 565 /* Does this cell look kosher? */ 566 if(OTA[cell].rms*OTA[cell].rms >567 OTA[cell].sky/MIN_EADU + i*i*MAX_READ_NOISE*MAX_READ_NOISE) {568 if(VERBOSE > 0) {569 fprintf(stderr, "logonly: cell %d is unreasonably noisy, skipping...\n", cell);570 fprintf(stderr, "logonly: bias = %d sky = %d rms = %d satfrac = %.2f\n",571 OTA[cell].bias, OTA[cell].sky, OTA[cell].rms, OTA[cell].satfrac);572 }573 continue;574 }566 // if(OTA[cell].rms*OTA[cell].rms > 567 // OTA[cell].sky/MIN_EADU + i*i*MAX_READ_NOISE*MAX_READ_NOISE) { 568 // if(VERBOSE > 0) { 569 // fprintf(stderr, "logonly: cell %d is unreasonably noisy, skipping...\n", cell); 570 // fprintf(stderr, "logonly: bias = %d sky = %d rms = %d satfrac = %.2f\n", 571 // OTA[cell].bias, OTA[cell].sky, OTA[cell].rms, OTA[cell].satfrac); 572 // } 573 // continue; 574 // } 575 575 576 576 if(apply) { … … 601 601 if(VERBOSE & VERB_NORM) burn_blab(OTA+cell); 602 602 603 /* Fix up the streaks (don't bother if table only) */ 604 // Why the heck do I get to skip this if table only? Makes no sense! 605 // if(!tableonly) { 606 persist_fix(naxis1-ovrscan1, naxis2-ovrscan2, naxis1, buf, 603 persist_fix(naxis1-ovrscan1, naxis2-ovrscan2, naxis1, buf, 607 604 OTA+cell); 608 605 /* Tell us about it? */ 609 if(VERBOSE & VERB_NORM) persist_blab(OTA+cell);610 // } 606 if(VERBOSE & VERB_NORM) persist_blab(OTA+cell); 607 611 608 } 612 609 … … 667 664 { 668 665 /* Make some space for medians */ 669 if(2*SKY_MARG*ny > nmedian_buf) {666 /* if(2*SKY_MARG*ny > nmedian_buf) { 670 667 if(median_buf != NULL) free(median_buf); 671 668 if( (median_buf = (int *)calloc(2*SKY_MARG*ny, sizeof(int))) == NULL) { … … 675 672 676 673 nmedian_buf = 2*SKY_MARG*ny; 674 } 675 */ 676 677 /* Make some space for cell copy */ 678 if(nx*ny > nmedian_buf) { 679 if(median_buf != NULL) free(median_buf); 680 if( (median_buf = (int *)calloc(nx*ny, sizeof(DTYPE))) == NULL) { 681 fprintf(stderr, "\rerror: failed to alloc cell copy\n"); 682 exit(-668); 683 } 684 nmedian_buf = nx*ny; 677 685 } 678 686 … … 728 736 /* Get sky stats */ 729 737 for(k=n=nsat=0; k<nx*ny; k+=((617*nx)/1000)) { 738 // for(k=n=nsat=0; k<nx*ny; k+=((100*nx)/1000)) { 739 // for(k=n=nsat=0; k<nx*ny; k++) { 730 740 i = k % nx; 731 741 j = k / nx;
Note:
See TracChangeset
for help on using the changeset viewer.
