IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 4:10:23 PM (15 months ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20230313
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313

  • branches/eam_branches/ipp-20230313/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c

    r42753 r42820  
    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                  }
Note: See TracChangeset for help on using the changeset viewer.