IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11159


Ignore:
Timestamp:
Jan 18, 2007, 6:36:55 PM (19 years ago)
Author:
magnier
Message:

adding SN and flux elements to pmPeak, changing counts to value

Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPeaks.c

    r10048 r11159  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-11-17 23:00:31 $
     8 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-01-19 04:36:55 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    122122pmPeak *pmPeakAlloc(psS32 x,
    123123                    psS32 y,
    124                     psF32 counts,
     124                    psF32 value,
    125125                    pmPeakType type)
    126126{
     
    131131    tmp->x = x;
    132132    tmp->y = y;
    133     tmp->counts = counts;
     133    tmp->value = value;
     134    tmp->flux = 0;
     135    tmp->SN = 0;
     136
    134137    tmp->type = type;
    135138
     
    154157    psF32 diff;
    155158
    156     diff = A->counts - B->counts;
     159    diff = A->value - B->value;
    157160    if (diff < FLT_EPSILON) {
    158161        psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__);
     
    175178    psF32 diff;
    176179
    177     diff = A->counts - B->counts;
     180    diff = A->value - B->value;
    178181    if (diff < FLT_EPSILON) {
    179182        psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__);
     
    301304XXX: This does not work if image has either a single row, or a single column.
    302305 
    303 XXX: In the output psArray elements, should we use the image row/column offsets?
    304      Currently, we do not.
    305 XXX EAM : this function needs to return peaks in *parent* coords
    306  
    307 XXX: Merge with CVS 1.20.  This had the proper code for images with a single
    308 row or column.
    309  
    310 XXX this does not use the weight or mask information
    311  
    312 *****************************************************************************/
    313 psArray *pmFindImagePeaks(const psImage *image,
    314                           psF32 threshold)
     306*****************************************************************************/
     307psArray *pmFindImagePeaks(const psImage *image, psF32 threshold)
    315308{
    316309    psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
     
    532525    while (tmpListElem != NULL) {
    533526        pmPeak *tmpPeak = (pmPeak *) tmpListElem->data;
    534         if ((tmpPeak->counts > maxValue) ||
     527        if ((tmpPeak->value > maxValue) ||
    535528                (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))) {
    536529            psListRemoveData(peaks, (psPtr) tmpPeak);
     
    562555    for (int i = 0; i < peaks->n; i++) {
    563556        pmPeak *tmpPeak = (pmPeak *) peaks->data[i];
    564         if (tmpPeak->counts > maxValue)
     557        if (tmpPeak->value > maxValue)
    565558            continue;
    566559        if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
  • trunk/psModules/src/objects/pmPeaks.h

    r9881 r11159  
    1010 *  @author GLG, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-11-07 09:07:42 $
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-01-19 04:36:53 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5252    float xf;                           ///< bicube fit to peak coord (x)
    5353    float yf;                           ///< bicube fit to peak coord (y)
    54     float counts;                       ///< Value of peak pixel (above sky?).
    55     pmPeakType type;                   ///< Description of peak.
     54    float value;                        ///< level in detection image
     55    float flux;                         ///< level in unsmoothed sci image
     56    float SN;                           ///< S/N implied by detection level
     57    pmPeakType type;   ///< Description of peak.
    5658}
    5759pmPeak;
Note: See TracChangeset for help on using the changeset viewer.