IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 29, 2009, 8:04:00 AM (17 years ago)
Author:
eugene
Message:

modify preCalc to carry a specific structure to avoid confusion of array elements; update to use deconvolved hermitians

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionKernels.h

    r26486 r26491  
    1111    PM_SUBTRACTION_KERNEL_ISIS,         ///< Traditional kernel --- gaussians modified by polynomials
    1212    PM_SUBTRACTION_KERNEL_HERM,         ///< Hermitian polynomial kernels
    13     PM_SUBTRACTION_KERNEL_DECON_HERM,   ///< Deconvolved Hermitian polynomial kernels
     13    PM_SUBTRACTION_KERNEL_DECONV_HERM,  ///< Deconvolved Hermitian polynomial kernels
    1414    PM_SUBTRACTION_KERNEL_SPAM,         ///< Summed Pixels for Advanced Matching --- summed delta functions
    1515    PM_SUBTRACTION_KERNEL_FRIES,        ///< Fibonacci Radius Increases Excellence of Subtraction
     
    3232    psString description;               ///< Description of the kernel parameters
    3333    long num;                           ///< Number of kernel components (not including the spatial ones)
    34     psVector *u, *v;                    ///< Offset (for POIS) or polynomial order (for ISIS, HERM or DECON_HERM)
    35     psVector *widths;                   ///< Gaussian FWHMs (ISIS, HERM or DECON_HERM)
     34    psVector *u, *v;                    ///< Offset (for POIS) or polynomial order (for ISIS, HERM or DECONV_HERM)
     35    psVector *widths;                   ///< Gaussian FWHMs (ISIS, HERM or DECONV_HERM)
    3636    psVector *uStop, *vStop;            ///< Width of kernel element (SPAM,FRIES only)
    37     psArray *preCalc;                   ///< Array of images containing pre-calculated kernel (for ISIS, HERM or DECON_HERM)
     37    psArray *preCalc;                   ///< Array of images containing pre-calculated kernel (for ISIS, HERM or DECONV_HERM)
    3838    float penalty;                      ///< Penalty for wideness
    3939    psVector *penalties;                ///< Penalty for each kernel component
     
    4949    int numStamps;                      ///< Number of good stamps
    5050} pmSubtractionKernels;
     51
     52// pmSubtractionKernels->preCalc is an array of pmSubtractionKernelPreCalc structures
     53typedef struct {
     54    psVector *uCoords;                  // used by RINGS
     55    psVector *vCoords;                  // used by RINGS
     56    psVector *poly;                     // used by RINGS
     57
     58    psVector *xKernel;                  // used by ISIS, HERM, DECONV_HERM
     59    psVector *yKernel;                  // used by ISIS, HERM, DECONV_HERM
     60    psKernel *kernel;                   // used by ISIS, HERM, DECONV_HERM
     61} pmSubtractionKernelPreCalc;
    5162
    5263// Assertion to check pmSubtractionKernels
     
    7182        PS_ASSERT_VECTOR_SIZE((KERNELS)->widths, (KERNELS)->num, RETURNVALUE); \
    7283    } \
    73     if ((KERNELS)->type == PM_SUBTRACTION_KERNEL_DECON_HERM) { \
     84    if ((KERNELS)->type == PM_SUBTRACTION_KERNEL_DECONV_HERM) { \
    7485        PS_ASSERT_VECTOR_NON_NULL((KERNELS)->widths, RETURNVALUE); \
    7586        PS_ASSERT_VECTOR_TYPE((KERNELS)->widths, PS_TYPE_F32, RETURNVALUE); \
     
    139150    );
    140151
     152/// Allocator for pre-calculated kernel data structure
     153pmSubtractionKernelPreCalc *pmSubtractionKernelPreCalcAlloc(
     154    pmSubtractionKernelsType type, ///< type of kernel to allocate (not all can be pre-calculated)
     155    int uOrder,                    ///< order in x-direction
     156    int vOrder,                    ///< order in x-direction
     157    int size,                      ///< Half-size of the kernel
     158    float sigma                    ///< sigma of gaussian kernel
     159    );
     160
     161
    141162/// Generate POIS kernels
    142163pmSubtractionKernels *pmSubtractionKernelsPOIS(int size, ///< Half-size of the kernel (in both dims)
     
    173194                                               );
    174195
    175 /// Generate DECON_HERM kernels
    176 pmSubtractionKernels *pmSubtractionKernelsDECON_HERM(int size, ///< Half-size of the kernel
     196/// Generate DECONV_HERM kernels
     197pmSubtractionKernels *pmSubtractionKernelsDECONV_HERM(int size, ///< Half-size of the kernel
    177198                                                     int spatialOrder, ///< Order of spatial variations
    178199                                                     const psVector *fwhms, ///< Gaussian FWHMs
Note: See TracChangeset for help on using the changeset viewer.