IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14533


Ignore:
Timestamp:
Aug 16, 2007, 10:43:42 AM (19 years ago)
Author:
Paul Price
Message:

Using FWHM instead of sigma.

Location:
trunk/psModules/src/imcombine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionKernels.h

    r14525 r14533  
    2121    long num;                           ///< Number of kernel components (not including the spatial ones)
    2222    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)
    2424    psVector *uStop, *vStop;            ///< Width of kernel element (SPAM,FRIES only)
    2525    int subIndex;                       ///< Index of kernel to be subtracted (to maintain flux conservation)
     
    4949pmSubtractionKernels *pmSubtractionKernelsISIS(int size, ///< Half-size of the kernel
    5050                                               int spatialOrder, ///< Order of spatial variations
    51                                                const psVector *sigmas, ///< Gaussian widths
     51                                               const psVector *fwhms, ///< Gaussian FWHMs
    5252                                               const psVector *orders ///< Polynomial order of gaussians
    5353                                               );
     
    6969pmSubtractionKernels *pmSubtractionKernelsGUNK(int size, ///< Half-size of the kernel
    7070                                               int spatialOrder, ///< Order of spatial variations
    71                                                const psVector *sigmas, ///< Gaussian widths
     71                                               const psVector *fwhms, ///< Gaussian FWHMs
    7272                                               const psVector *orders, ///< Polynomial order of gaussians
    7373                                               int inner ///< Inner radius containing grid of delta functions
     
    8686                                                   int size, ///< Half-size of the kernel
    8787                                                   int spatialOrder, ///< Order of spatial variations
    88                                                    const psVector *sigmas, ///< Gaussian widths
     88                                                   const psVector *fwhms, ///< Gaussian FWHMs
    8989                                                   const psVector *orders, ///< Polynomial order of gaussians
    9090                                                   int inner, ///< Inner radius to preserve unbinned
  • trunk/psModules/src/imcombine/pmSubtractionStamps.c

    r14519 r14533  
    303303
    304304
    305 bool pmSubtractionGenerateStamps(psArray *stamps, float sigma, int footprint,
     305bool pmSubtractionGenerateStamps(psArray *stamps, float fwhm, int footprint,
    306306                                 const pmSubtractionKernels *kernels)
    307307{
     
    312312    int size = kernels->size + footprint; // Size of postage stamps
    313313    int num = stamps->n;                // Number of stamps
     314    float sigma = fwhm / (2.0 * sqrtf(2.0 * ln(2.0))); // Gaussian sigma
    314315
    315316    for (int i = 0; i < num; i++) {
     
    337338            for (int u = -size; u <= size; u++) {
    338339                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));
    340341            }
    341342        }
  • trunk/psModules/src/imcombine/pmSubtractionStamps.h

    r14514 r14533  
    5656/// Generate target for stamps based on list
    5757bool pmSubtractionGenerateStamps(psArray *stamps, ///< Stamps
    58                                  float sigma, ///< Gaussian width for each stamp
     58                                 float fwhm, ///< FWHM for each stamp
    5959                                 int footprint, ///< Stamp footprint size
    6060                                 const pmSubtractionKernels *kernels ///< Kernel basis functions
Note: See TracChangeset for help on using the changeset viewer.