Changeset 30322 for branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionStamps.h
- Timestamp:
- Jan 20, 2011, 11:53:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtractionStamps.h
r29543 r30322 1 1 #ifndef PM_SUBTRACTION_STAMPS_H 2 2 #define PM_SUBTRACTION_STAMPS_H 3 4 #include <pslib.h>5 6 #include "pmSubtractionKernels.h"7 8 /// Status of stamp9 typedef enum {10 PM_SUBTRACTION_STAMP_INIT, ///< Initial state11 PM_SUBTRACTION_STAMP_FOUND, ///< Found a suitable source for this stamp12 PM_SUBTRACTION_STAMP_CALCULATE, ///< Calculate matrix and vector values for this stamp13 PM_SUBTRACTION_STAMP_USED, ///< Use this stamp14 PM_SUBTRACTION_STAMP_REJECTED, ///< This stamp has been rejected15 PM_SUBTRACTION_STAMP_NONE ///< No stamp in this region16 } pmSubtractionStampStatus;17 18 /// A list of stamps19 typedef struct {20 long num; ///< Number of stamps21 psArray *stamps; ///< The stamps22 psArray *regions; ///< Regions for each stamp23 psArray *x, *y; ///< Coordinates for possible stamps (or NULL)24 psArray *flux; ///< Fluxes for possible stamps (or NULL)25 int footprint; ///< Half-size of stamps26 float normFrac; ///< Fraction of flux in window for normalisation window27 float normValue; ///< calculated normalization28 float normValue2; ///< calculated normalization29 psKernel *window1; ///< window function generated from ensemble of stamps (input 1)30 psKernel *window2; ///< window function generated from ensemble of stamps (input 2)31 psKernel *window; ///< weighting window function (sigma = 1.1 * MAX(fwhm))32 float normWindow1; ///< Size of window for measuring normalisation33 float normWindow2; ///< Size of window for measuring normalisation34 float sysErr; ///< Systematic error35 float skyErr; ///< increase effective readnoise36 } pmSubtractionStampList;37 3 38 4 /// Allocate a list of stamps … … 74 40 ); 75 41 76 77 /// A stamp for image subtraction78 typedef struct {79 float x, y; ///< Position80 float flux; ///< Flux81 float xNorm, yNorm; ///< Normalised position82 psKernel *image1; ///< Reference image postage stamp83 psKernel *image2; ///< Input image postage stamp84 psKernel *weight; ///< Weight image (1/variance) postage stamp, or NULL85 psArray *convolutions1; ///< Convolutions of image 1 for each kernel component, or NULL86 psArray *convolutions2; ///< Convolutions of image 2 for each kernel component, or NULL87 psImage *matrix; ///< Least-squares matrix, or NULL88 psVector *vector; ///< Least-squares vector, or NULL89 double norm; ///< Normalisation difference90 double normI1; ///< Sum(flux) for image 191 double normI2; ///< Sum(flux) for image 292 double normSquare1; ///< Sum(flux^2) for image 1 (used for penalty)93 double normSquare2; ///< Sum(flux^2) for image 2 (used for penalty)94 pmSubtractionStampStatus status; ///< Status of stamp95 psVector *MxxI1; ///< second moments of convolution images96 psVector *MyyI1; ///< second moments of convolution images97 psVector *MxxI2; ///< second moments of convolution images98 psVector *MyyI2; ///< second moments of convolution images99 double MxxI1raw;100 double MyyI1raw;101 double MxxI2raw;102 double MyyI2raw;103 } pmSubtractionStamp;104 105 42 /// Allocate a stamp 106 43 pmSubtractionStamp *pmSubtractionStampAlloc(void); 44 45 // find and extract the stamps 46 bool pmSubtractionStampsSelect(pmSubtractionStampList **stamps, // Stamps to read 47 const pmReadout *ro1, // Readout 1 48 const pmReadout *ro2, // Readout 2 49 const psImage *subMask, // Mask for subtraction, or NULL 50 psImage *variance, // Variance map 51 const psRegion *region, // Region of interest 52 float thresh1, // Threshold for stamp finding on readout 1 53 float thresh2, // Threshold for stamp finding on readout 2 54 float stampSpacing, // Spacing between stamps 55 float normFrac, // Fraction of flux in window for normalisation window 56 float sysError, // Relative systematic error in images 57 float skyError, // Relative systematic error in images 58 int size, // Kernel half-size 59 int footprint, // Convolution footprint for stamps 60 pmSubtractionMode mode // Mode for subtraction 61 ); 62 107 63 108 64 /// Find stamps on an image … … 172 128 /// Calculate the window and normalisation window from the stamps 173 129 bool pmSubtractionStampsGetWindow( 130 bool *tryAgain, ///< re-try with new stamp size? 174 131 pmSubtractionStampList *stamps, ///< List of stamps 175 132 int kernelSize ///< Half-size of kernel
Note:
See TracChangeset
for help on using the changeset viewer.
