IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6905


Ignore:
Timestamp:
Apr 19, 2006, 10:29:57 AM (20 years ago)
Author:
magnier
Message:

added MOMENTS_AR_MAX, added limits to Sx and Sx > 0.05, merged PM_SOURCE_MASK with PM_MASK_xxx

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

Legend:

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

    r6872 r6905  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-04-17 18:01:05 $
     8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-04-19 20:29:57 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "pmHDU.h"
    2020#include "pmFPA.h"
     21#include "pmMaskBadPixels.h"
    2122#include "pmPeaks.h"
    2223#include "pmMoments.h"
     
    164165        if (!status)
    165166            SY_MAX = 10.0;
     167        psF32 AR_MAX = psMetadataLookupF32 (&status, metadata, "MOMENTS_AR_MAX");
     168        if (!status)
     169            AR_MAX =  3.0;
     170        psF32 AR_MIN = 1.0 / AR_MAX;
    166171
    167172        // construct a sigma-plane image
     
    185190
    186191            // Sx,Sy are limited at 0.  a peak at 0,0 is artificial
    187             if ((fabs(tmpSrc->moments->Sx) < FLT_EPSILON) && (fabs(tmpSrc->moments->Sy) < FLT_EPSILON)) {
     192            if (fabs(tmpSrc->moments->Sx) < 0.05) {
     193                continue;
     194            }
     195            if (fabs(tmpSrc->moments->Sy) < 0.05) {
     196                continue;
     197            }
     198            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) > AR_MAX) {
     199                continue;
     200            }
     201            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) < AR_MIN) {
    188202                continue;
    189203            }
     
    341355        // inner = psRegionForSquare (tmpSrc->peak->x - tmpSrc->mask->col0, tmpSrc->peak->y - tmpSrc->mask->row0, 2);
    342356        inner = psRegionForSquare (tmpSrc->peak->x, tmpSrc->peak->y, 2);
    343         int Nsatpix = psImageCountPixelMask (tmpSrc->mask, inner, PM_SOURCE_MASK_SATURATED);
     357        int Nsatpix = psImageCountPixelMask (tmpSrc->mask, inner, PM_MASK_SAT);
    344358
    345359        // saturated star (size consistent with PSF or larger)
  • trunk/psModules/src/objects/pmSource.h

    r6872 r6905  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-04-17 18:01:05 $
     5 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-04-19 20:29:57 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020 * outside of the PSPHOT code.  Perhaps we can set up a registered set of mask
    2121 * values with specific meanings that other functions can add to or define?
    22  */
     22 
     23 * XXX We will only use the PM_MASK_xxx mask values
    2324typedef enum {
    2425    PM_SOURCE_MASK_CLEAR     = 0x00,
     
    2728    PM_SOURCE_MASK_MARKED    = 0x08,
    2829} psphotMaskValues;
     30*/
    2931
    3032/** pmSourceType enumeration
Note: See TracChangeset for help on using the changeset viewer.