IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2007, 3:57:15 PM (19 years ago)
Author:
Paul Price
Message:

Implementing dual-convolution. This required reworking those
functions involved with calculating and solving the equations; moved
these into a separate file and made various other cleanups (e.g.,
assertions for pmSubtractionKernels). Removed the normalisation
(central pixel) term from all kernels, because this shouldn't be in
the second kernel (there's only one normalisation term between the two
kernels); the normalisation is treated explicitly in the equations,
along with the background (still only a constant background is
supported for now, but there's a lot of support for a polynomial
background for when I get around to putting it in the equations).
Tested the single convolution, and it's working; same results as
before, apparently. Haven't tested dual convolution yet.

File:
1 edited

Legend:

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

    r15443 r15756  
    2323    psArray *x, *y;                     ///< Coordinates for possible stamps (or NULL)
    2424    psArray *flux;                      ///< Fluxes for possible stamps (or NULL)
     25    int footprint;                      ///< Half-size of stamps
    2526} pmSubtractionStampList;
    2627
     
    2930                                                    int numRows, // Number of rows in image
    3031                                                    const psRegion *region, // Region for stamps, or NULL
     32                                                    int footprint, // Half-size of stamps
    3133                                                    float spacing // Rough average spacing between stamps
    3234    );
     
    4042    PS_ASSERT_ARRAY_SIZE((LIST)->stamps, (LIST)->num, RETURNVALUE); \
    4143    PS_ASSERT_ARRAY_SIZE((LIST)->regions, (LIST)->num, RETURNVALUE); \
     44    PS_ASSERT_INT_NONNEGATIVE((LIST)->footprint, RETURNVALUE); \
    4245    if ((LIST)->x || (LIST)->y || (LIST)->flux) { \
    4346        PS_ASSERT_ARRAY_NON_NULL((LIST)->x, RETURNVALUE); \
     
    5760    psKernel *image1;                   ///< Reference image postage stamp
    5861    psKernel *image2;                   ///< Input image postage stamp
    59     psKernel *weight;                   ///< Weight image postage stamp
    60     psArray *convolutions1;             ///< Convolutions of image 1 for each kernel component
    61     psArray *convolutions2;             ///< Convolutions of image 2 for each kernel component
    62     psImage *matrix;                    ///< Associated matrix
    63     psVector *vector;                   ///< Assoicated vector
     62    psKernel *weight;                   ///< Weight image postage stamp, or NULL
     63    psArray *convolutions1;             ///< Convolutions of image 1 for each kernel component, or NULL
     64    psArray *convolutions2;             ///< Convolutions of image 2 for each kernel component, or NULL
     65    psImage *matrix1, *matrix2;         ///< Matrices for each image, or NULL
     66    psImage *matrixX;                   ///< Cross-matrix (for mode DUAL), or NULL
     67    psVector *vector;                   ///< Associated vector (when mode not DUAL), or NULL
    6468    pmSubtractionStampStatus status;    ///< Status of stamp
    6569} pmSubtractionStamp;
     
    7478                                                const psRegion *region, ///< Region to search, or NULL
    7579                                                float threshold, ///< Threshold for stamps in the image
     80                                                int footprint, ///< Half-size for stamps
    7681                                                float spacing, ///< Rough spacing for stamps
    7782                                                pmSubtractionMode mode ///< Mode for subtraction
     
    8590                                               const psImage *mask, ///< Mask, or NULL
    8691                                               const psRegion *region, ///< Region to search, or NULL
     92                                               int footprint, ///< Half-size for stamps
    8793                                               float spacing, ///< Rough spacing for stamps
    8894                                               pmSubtractionMode mode ///< Mode for subtraction
     
    94100    const psImage *subMask,             ///< Mask, or NULL
    95101    const psRegion *region,             ///< Region to search, or NULL
     102    int footprint,                      ///< Half-size for stamps
    96103    float spacing,                      ///< Rough spacing for stamps
    97104    pmSubtractionMode mode              ///< Mode for subtraction
     
    103110    const psImage *subMask,             ///< Mask, or NULL
    104111    const psRegion *region,             ///< Region to search, or NULL
     112    int footprint,                      ///< Half-size for stamps
    105113    float spacing,                      ///< Rough spacing for stamps
    106114    pmSubtractionMode mode              ///< Mode for subtraction
     
    109117/// Extract stamps from the images
    110118bool pmSubtractionStampsExtract(pmSubtractionStampList *stamps, ///< Stamps
    111                                 psImage *reference, ///< Reference image
    112                                 psImage *input, ///< Input image (or NULL)
     119                                psImage *image1, ///< Reference image
     120                                psImage *image2, ///< Input image (or NULL)
    113121                                psImage *weight, ///< Weight (variance) map
    114                                 int footprint, ///< Stamp footprint size
    115122                                int kernelSize ///< Kernel half-size
    116123    );
Note: See TracChangeset for help on using the changeset viewer.