IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2021, 11:35:13 AM (5 years ago)
Author:
eugene
Message:

explicitly use Ordinary polynomials for forward astrometry transformations (chip->fpa->tpa->sky)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-dev-20210817/psModules/src/astrom/pmAstrometryUtils.c

    r41826 r41832  
    131131
    132132// convert a transformation L(x,y) to L'(x-xo,y-yo)
     133// is this used for an upward (e.g., chip->fpa) or a downward (fpa->chip) transform?
    133134psPlaneTransform *psPlaneTransformSetCenter (psPlaneTransform *output, psPlaneTransform *input, double Xo, double Yo)
    134135{
    135136
    136     // validate fit order
     137    // validate fit type:
     138    // polynomial in input transforms must match type -- and for now be ORD
     139    psAssert (input->x->type == PS_POLYNOMIAL_ORD, "fix for CHEB");
     140    psAssert (input->y->type == PS_POLYNOMIAL_ORD, "fix for CHEB");
    137141
    138142    if (output == NULL) {
    139         output = psPlaneTransformAlloc(input->x->nX, input->x->nY);
     143        output = psPlaneTransformAlloc(input->x->nX, input->x->nY, PS_POLYNOMIAL_ORD);
    140144    }
    141145
     
    180184
    181185// rotate a transformation L(x,y) by theta
    182 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta)
     186psPlaneTransform *psPlaneTransformRotate  (psPlaneTransform *output, psPlaneTransform *input, double theta)
    183187{
    184188    /* given the polynomial transformations:
     
    192196
    193197    if (output == NULL) {
    194         output = psPlaneTransformAlloc(input->x->nX, input->x->nY);
     198        // generate a new transform using the same order and type as the input
     199        output = psPlaneTransformAlloc(input->x->nX, input->x->nY, input->x->type);
    195200    }
    196201
     
    227232
    228233    // all coeffs and masks initially set to 0
    229     transform = psPlaneTransformAlloc (order, order);
     234    transform = psPlaneTransformAlloc (order, order, PS_POLYNOMIAL_ORD);
    230235
    231236    for (int i = 0; i <= order; i++) {
Note: See TracChangeset for help on using the changeset viewer.