Changeset 14533
- Timestamp:
- Aug 16, 2007, 10:43:42 AM (19 years ago)
- Location:
- trunk/psModules/src/imcombine
- Files:
-
- 3 edited
-
pmSubtractionKernels.h (modified) (4 diffs)
-
pmSubtractionStamps.c (modified) (3 diffs)
-
pmSubtractionStamps.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionKernels.h
r14525 r14533 21 21 long num; ///< Number of kernel components (not including the spatial ones) 22 22 psVector *u, *v; ///< Offset (for POIS) or polynomial order (for ISIS) 23 psVector *widths; ///< Gaussian widths (ISIS) or ring radius (RINGS)23 psVector *widths; ///< Gaussian FWHMs (ISIS) or ring radius (RINGS) 24 24 psVector *uStop, *vStop; ///< Width of kernel element (SPAM,FRIES only) 25 25 int subIndex; ///< Index of kernel to be subtracted (to maintain flux conservation) … … 49 49 pmSubtractionKernels *pmSubtractionKernelsISIS(int size, ///< Half-size of the kernel 50 50 int spatialOrder, ///< Order of spatial variations 51 const psVector * sigmas, ///< Gaussian widths51 const psVector *fwhms, ///< Gaussian FWHMs 52 52 const psVector *orders ///< Polynomial order of gaussians 53 53 ); … … 69 69 pmSubtractionKernels *pmSubtractionKernelsGUNK(int size, ///< Half-size of the kernel 70 70 int spatialOrder, ///< Order of spatial variations 71 const psVector * sigmas, ///< Gaussian widths71 const psVector *fwhms, ///< Gaussian FWHMs 72 72 const psVector *orders, ///< Polynomial order of gaussians 73 73 int inner ///< Inner radius containing grid of delta functions … … 86 86 int size, ///< Half-size of the kernel 87 87 int spatialOrder, ///< Order of spatial variations 88 const psVector * sigmas, ///< Gaussian widths88 const psVector *fwhms, ///< Gaussian FWHMs 89 89 const psVector *orders, ///< Polynomial order of gaussians 90 90 int inner, ///< Inner radius to preserve unbinned -
trunk/psModules/src/imcombine/pmSubtractionStamps.c
r14519 r14533 303 303 304 304 305 bool pmSubtractionGenerateStamps(psArray *stamps, float sigma, int footprint,305 bool pmSubtractionGenerateStamps(psArray *stamps, float fwhm, int footprint, 306 306 const pmSubtractionKernels *kernels) 307 307 { … … 312 312 int size = kernels->size + footprint; // Size of postage stamps 313 313 int num = stamps->n; // Number of stamps 314 float sigma = fwhm / (2.0 * sqrtf(2.0 * ln(2.0))); // Gaussian sigma 314 315 315 316 for (int i = 0; i < num; i++) { … … 337 338 for (int u = -size; u <= size; u++) { 338 339 input->kernel[v][u] = flux / sigma * 0.5 * M_2_SQRTPI * M_SQRT1_2 * 339 expf( 0.5 * (PS_SQR(u + xStamp) + PS_SQR(v + yStamp)) / PS_SQR(sigma));340 expf(-0.5 * (PS_SQR(u + xStamp) + PS_SQR(v + yStamp)) / PS_SQR(sigma)); 340 341 } 341 342 } -
trunk/psModules/src/imcombine/pmSubtractionStamps.h
r14514 r14533 56 56 /// Generate target for stamps based on list 57 57 bool pmSubtractionGenerateStamps(psArray *stamps, ///< Stamps 58 float sigma, ///< Gaussian widthfor each stamp58 float fwhm, ///< FWHM for each stamp 59 59 int footprint, ///< Stamp footprint size 60 60 const pmSubtractionKernels *kernels ///< Kernel basis functions
Note:
See TracChangeset
for help on using the changeset viewer.
