IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42799


Ignore:
Timestamp:
May 1, 2025, 2:37:34 PM (15 months ago)
Author:
tdeboer
Message:

tweak the threshold value for burns for properly handling images clsoe to the saturation limit

Location:
trunk/extsrc/gpcsw/gpcsrc/fits/burntool
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c

    r42392 r42799  
    312312                    cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
    313313               if(cell[j].burn[k].nfit <= 0) continue;
    314              }
     314               /*kick out burns which are single pixels*/
     315\            }
    315316            } else {
    316317             if(cell[j].burn[k].fiterr &&
    317318               cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
    318319             if(cell[j].burn[k].nfit <= 0) continue;
     320             /*kick out burns which are single pixels*/
     321
    319322            }
    320323
  • trunk/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c

    r42724 r42799  
    3434   starcut = STAR_THRESH/2 + cell->sky + cell->bias;
    3535
    36    /*try a new value for thresh_lo which is 1 sigmas above the background, but with a safety limit of 1000 counts*/
     36   /*try a new value for thresh_lo which is 10 sigmas above the background, but with a safety limit of 1000 counts*/
    3737        trailthresh = cell->sky + (10*cell->rms);
    3838        if(trailthresh <= 1000) trailthresh = 1000;
    3939        trailthresh = trailthresh + cell->bias;
     40        thresh_lo = trailthresh;
     41
     42   /*try a new value for burnthresh which is twice the bias above the sky background, but with a safety limit of 30000 counts*/
     43        burnthresh = cell->sky + (2*cell->bias);
     44        if(burnthresh <= BURN_THRESH) burnthresh = BURN_THRESH;
     45        thresh_hi = burnthresh;
    4046
    4147/* Look at all the pixels which pass the burn threshold */
     
    8187                boxbuf[nbox].ey = k-1;
    8288                grow_box(nx, ny, NX, data, thresh_lo, boxbuf+nbox);
     89               
    8390           /* Fill in max and center info */
    8491                boxbuf[nbox].max = 0;
     
    100107                             boxbuf[nbox].ex, boxbuf[nbox].ey,
    101108                             boxbuf[nbox].max);
     109                        fflush(stdout);
     110                  }
     111/* Mark the veto mask so as not to trigger on this one again */
     112                  for(l=boxbuf[nbox].sy; l<=boxbuf[nbox].ey; l++) {
     113                         for(k=boxbuf[nbox].sx; k<=boxbuf[nbox].ex; k++) {
     114                          veto[k+l*NX] = boxbuf[nbox].max;
     115                         }
     116                  }
     117                  xon = -1;
     118                  continue;
     119                }
     120
     121/* A box that is composed of a single pixel should not be considered a burn */
     122                if((boxbuf[nbox].ex - boxbuf[nbox].sx) <= 2 && (boxbuf[nbox].ey - boxbuf[nbox].sy) <= 2) {
     123                  if(VERBOSE & VERB_DETECT) {
     124                        printf("Ditching box %d %d %d %d  for being too small\n",
     125                             boxbuf[nbox].sx, boxbuf[nbox].sy,
     126                             boxbuf[nbox].ex, boxbuf[nbox].ey);
    102127                        fflush(stdout);
    103128                  }
  • trunk/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c

    r42724 r42799  
    290290
    291291   if(!strcmp(camera,"gpc2")) {
    292 
    293292     /*Conpute the mean and standard deviation of the trail along x*/
    294293     for(i=xs; i<=xe; i++) {
     
    384383     }
    385384     /* Update fit ranges */
    386      if(box->nfit > 0) {
     385     if(box->nfit > 1) {
    387386        box->sxfit = box->xfit[0];
    388387        box->exfit = box->xfit[box->nfit-1];
Note: See TracChangeset for help on using the changeset viewer.