Changeset 14801 for trunk/psModules/src/imcombine/pmSubtractionStamps.h
- Timestamp:
- Sep 10, 2007, 10:10:05 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionStamps.h
r14701 r14801 15 15 } pmSubtractionStampStatus; 16 16 17 /// A list of stamps 18 typedef struct { 19 long num; ///< Number of stamps 20 psArray *stamps; ///< The stamps 21 psArray *regions; ///< Regions for each stamp 22 psArray *x, *y; ///< Coordinates for possible stamps (or NULL) 23 psArray *flux; ///< Fluxes for possible stamps (or NULL) 24 } pmSubtractionStampList; 25 26 /// Allocate a list of stamps 27 pmSubtractionStampList *pmSubtractionStampListAlloc(int numCols, // Number of columns in image 28 int numRows, // Number of rows in image 29 const psRegion *region, // Region for stamps, or NULL 30 float spacing // Rough average spacing between stamps 31 ); 32 33 /// Assertion for stamp list to be valid 34 #define PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(LIST, RETURNVALUE) { \ 35 PS_ASSERT_PTR_NON_NULL(LIST, RETURNVALUE); \ 36 PS_ASSERT_ARRAY_NON_NULL((LIST)->stamps, RETURNVALUE); \ 37 PS_ASSERT_ARRAY_NON_NULL((LIST)->regions, RETURNVALUE); \ 38 PS_ASSERT_INT_POSITIVE((LIST)->num, RETURNVALUE); \ 39 PS_ASSERT_ARRAY_SIZE((LIST)->stamps, (LIST)->num, RETURNVALUE); \ 40 PS_ASSERT_ARRAY_SIZE((LIST)->regions, (LIST)->num, RETURNVALUE); \ 41 if ((LIST)->x || (LIST)->y || (LIST)->flux) { \ 42 PS_ASSERT_ARRAY_NON_NULL((LIST)->x, RETURNVALUE); \ 43 PS_ASSERT_ARRAY_NON_NULL((LIST)->y, RETURNVALUE); \ 44 PS_ASSERT_ARRAY_NON_NULL((LIST)->flux, RETURNVALUE); \ 45 PS_ASSERT_ARRAY_SIZE((LIST)->x, (LIST)->num, RETURNVALUE); \ 46 PS_ASSERT_ARRAY_SIZE((LIST)->y, (LIST)->num, RETURNVALUE); \ 47 PS_ASSERT_ARRAY_SIZE((LIST)->flux, (LIST)->num, RETURNVALUE); \ 48 } \ 49 } 50 17 51 /// A stamp for image subtraction 18 52 typedef struct { … … 26 60 psImage *matrix; ///< Associated matrix 27 61 psVector *vector; ///< Assoicated vector 28 pmSubtractionStampStatus status; ///< Status of stamp62 pmSubtractionStampStatus status; ///< Status of stamp 29 63 } pmSubtractionStamp; 30 64 65 /// Allocate a stamp 66 pmSubtractionStamp *pmSubtractionStampAlloc(void); 67 31 68 /// Find stamps on an image 32 p sArray *pmSubtractionFindStamps(psArray*stamps, ///< Output stamps, or NULL33 const psImage *image, ///< Image for which to find stamps34 const psImage *mask, ///< Mask, or NULL35 const psRegion *region, ///< Region in which to search for stamps, or NULL36 float threshold, ///< Threshold for stamps in the image37 float spacing ///< Rough spacing for stamps69 pmSubtractionStampList *pmSubtractionFindStamps(pmSubtractionStampList *stamps, ///< Output stamps, or NULL 70 const psImage *image, ///< Image for which to find stamps 71 const psImage *mask, ///< Mask, or NULL 72 const psRegion *region, ///< Region to search, or NULL 73 float threshold, ///< Threshold for stamps in the image 74 float spacing ///< Rough spacing for stamps 38 75 ); 39 76 40 77 /// Set stamps based on a list of x,y 41 psArray *pmSubtractionSetStamps(const psVector *x, ///< x coordinates for each stamp 42 const psVector *y, ///< y coordinates for each stamp 43 const psVector *flux, ///< Flux for each stamp, or NULL 44 const psImage *mask, ///< Mask, or NULL 45 const psRegion *region ///< Region in which to search for stamps, or NULL 78 /// 79 /// We may optionally apply an exclusion zone around each star --- this is important when we're convolving to 80 /// a specified PSF; less so when we're only trying to get a good subtraction. 81 pmSubtractionStampList *pmSubtractionSetStamps(const psVector *x, ///< x coordinates for each stamp 82 const psVector *y, ///< y coordinates for each stamp 83 const psVector *flux, ///< Flux for each stamp, or NULL 84 const psImage *image, ///< Image for flux of stamp 85 const psImage *mask, ///< Mask, or NULL 86 const psRegion *region, ///< Region to search, or NULL 87 float spacing, ///< Rough spacing for stamps 88 int exclusionZone // Exclusion zone around each star 46 89 ); 47 90 48 91 /// Extract stamps from the images 49 bool pmSubtractionExtractStamps(p sArray*stamps, ///< Stamps92 bool pmSubtractionExtractStamps(pmSubtractionStampList *stamps, ///< Stamps 50 93 psImage *reference, ///< Reference image 51 94 psImage *input, ///< Input image (or NULL) … … 56 99 57 100 /// Generate target for stamps based on list 58 bool pmSubtractionGenerateStamps(p sArray*stamps, ///< Stamps101 bool pmSubtractionGenerateStamps(pmSubtractionStampList *stamps, ///< Stamps 59 102 float fwhm, ///< FWHM for each stamp 60 103 int footprint, ///< Stamp footprint size
Note:
See TracChangeset
for help on using the changeset viewer.
