IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2009, 7:59:50 AM (17 years ago)
Author:
beaumont
Message:

Added visualizations to ppSub. Set up a single variable in pmVisual to control when plots are drawn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branch_20090215/psModules/src/objects/pmPeaks.c

    r20937 r21536  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2008-12-08 02:51:14 $
     8 *  @version $Revision: 1.25.14.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-19 17:59:50 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828AddPeak(): A private function which allocates a psArray, if the peaks
    2929argument is NULL, otherwise it adds the peak to that array.
    30 XXX EAM : row,col now refer to image coords, NOT parent (since this is private) 
     30XXX EAM : row,col now refer to image coords, NOT parent (since this is private)
    3131XXX EAM : now also calculates fractional peak positions from 3x3 bicube region
    3232*****************************************************************************/
     
    6363        peak->xf = min.x + ix + image->col0;
    6464        peak->yf = min.y + iy + image->row0;
    65         peak->dx = NAN;
    66         peak->dy = NAN;
    67        
    68         // xf,yf must land on image with 0 pixel border
    69         peak->xf = PS_MAX (PS_MIN (peak->xf, image->numCols - 1), image->col0);
    70         peak->yf = PS_MAX (PS_MIN (peak->yf, image->numRows - 1), image->row0);
     65
     66        // These errors are fractional errors, and should be scaled by the
     67        // error on the peak pixel (see, eg, psphotFindPeaks)
     68        peak->dx = min.xErr;
     69        peak->dy = min.yErr;
     70
     71        // xf,yf must land on image with 0 pixel border
     72        peak->xf = PS_MAX (PS_MIN (peak->xf, image->numCols - 1), image->col0);
     73        peak->yf = PS_MAX (PS_MIN (peak->yf, image->numRows - 1), image->row0);
    7174    } else {
    7275        peak->xf = ix;
    7376        peak->yf = iy;
    74         peak->dx = NAN;
    75         peak->dy = NAN;
     77        peak->dx = NAN;
     78        peak->dy = NAN;
    7679    }
    7780
     
    8689getRowVectorFromImage(): a private function which simply returns a
    8790psVector containing the specified row of data from the psImage.
    88  
     91
    8992XXX: Is there a better way to do this?
    9093XXX EAM: does this really need to alloc a new vector???
     
    245248above the given threshold.  Returns a vector of type PS_TYPE_U32 containing
    246249the location (x value) of all peaks.
    247  
     250
    248251XXX: What types should be supported?  Only F32 is implemented.
    249  
     252
    250253XXX: We currently step through the input vector twice; once to determine the
    251254size of the output vector, then to set the values of the output vector.
     
    253256*****************************************************************************/
    254257psVector *pmPeaksInVector(const psVector *vector,
    255                         psF32 threshold)
     258                        psF32 threshold)
    256259{
    257260    psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
     
    347350above the given threshold.  Returns a psArray containing location (x/y value)
    348351of all peaks.
    349  
     352
    350353XXX: I'm not convinced the peak type definition in the SDRS is mutually
    351354exclusive.  Some peaks can have multiple types.  Edges for sure.  Also, a
    352355digonal line with the same value at each point will have a peak for every
    353356point on that line.
    354  
     357
    355358XXX: This does not work if image has either a single row, or a single column.
    356  
     359
    357360The peak is returned in the image parent coordinates
    358361
Note: See TracChangeset for help on using the changeset viewer.