IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 21, 2006, 5:21:00 PM (20 years ago)
Author:
Paul Price
Message:

Fringe subtraction is working!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmFringeStats.h

    r6921 r6957  
    55 *  @author Eugene Magnier, IfA
    66 *
    7  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-04-20 04:28:00 $
     7 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-04-22 03:21:00 $
    99 *
    1010 *  Copyright 2004 IfA, University of Hawaii
     
    1313# ifndef PM_FRINGE_STATS
    1414# define PM_FRINGE_STATS
     15
     16//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     17// pmFringeRegions
     18//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    1519
    1620/** Structure to hold the fringe measurement regions.
     
    3034pmFringeRegions;
    3135
     36/// Allocate fringe regions
    3237pmFringeRegions *pmFringeRegionsAlloc (
    3338    int nPts,     // number of points to create
     
    3742    int nY    // smoothing scale in y
    3843);
     44
     45// Generate the fringe points
     46bool pmFringeRegionsCreatePoints(pmFringeRegions *fringe, // Fringe regions
     47                                 const psImage *image // Image for the regions (defines the size)
     48                                );
     49
     50
     51//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     52// pmFringeStats
     53//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    3954
    4055/** Structure to hold the fringe measurements for a particular image
     
    4863pmFringeStats;
    4964
    50 pmFringeStats *pmFringeStatsAlloc(pmFringeRegions *regions);
    51 
    52 // Generate the fringe points
    53 bool pmFringeRegionsCreatePoints(pmFringeRegions *fringe, psImage *image);
    54 
    55 /** the pmFringeScale structure defines the relationship between two fringe measurements
    56  */
    57 typedef struct
    58 {
    59     int nFringeFrames;
    60     psVector *coeff;
    61     psVector *coeffErr;
    62 }
    63 pmFringeScale;
     65/// Allocate fringe statistics
     66pmFringeStats *pmFringeStatsAlloc(pmFringeRegions *regions // The fringe regions which will be measured
     67                                 );
    6468
    6569/** Measure the fringe stats for an image
     
    7882);
    7983
     84
     85//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     86// pmFringeScale
     87//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     88
     89/** the pmFringeScale structure defines the relationship between two fringe measurements
     90 */
     91typedef struct
     92{
     93    int nFringeFrames;
     94    psVector *coeff;
     95    psVector *coeffErr;
     96}
     97pmFringeScale;
     98
     99/** Determine the scales for the fringe correction
     100 *
     101 * Given an input fringe measurement, and an array of template fringe measurements, measure the contribution
     102 * of each of the templates to the input.  Rejection is performed on the fringe regions, to weed out stars
     103 * etc.
     104 *
     105 * @return pmFringeScale*
     106 */
     107pmFringeScale *pmFringeScaleMeasure(pmFringeStats *science, // Fringe measurements from science image
     108                                    psArray *fringes, // Array of fringe measurements from templates
     109                                    float rej, // Rejection threshold (in standard deviations)
     110                                    unsigned int nIter, // Maximum number of iterations
     111                                    float keepFrac // Minimum fraction of regions to keep
     112                                   );
     113
     114/// Allocate fringe scales
     115pmFringeScale *pmFringeScaleAlloc(int nFringeFrames // Number of fringe frames
     116                                 );
     117
     118
     119//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     120// Fringe correction
     121//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     122
    80123/** Fringe correct the science image
    81124 *
     
    89132                         psArray *fringeImages, // fringe images to use in correction
    90133                         psArray *fringeStats, // fringe stats to use in correction
    91                          psMaskType maskVal // Value to mask
     134                         psMaskType maskVal, // Value to mask
     135                         float rej,     // Rejection threshold, for pmFringeScaleMeasure
     136                         unsigned int nIter, // Maximum number of iterations, for pmFringeScaleMeasure
     137                         float keepFrac // Minimum fraction of regions to keep, for pmFringeScaleMeasure
    92138                        );
    93139
     140
    94141# endif
Note: See TracChangeset for help on using the changeset viewer.