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/pmAstrometryWCS.c

    r41826 r41832  
    554554        // apply the exiting fromTPA transformation to make the new toFPA consistent with the toTPA layter
    555555        // XXX this only works if toTPA is at most a linear transformation
    556         psPlaneTransform *toFPAnew = psPlaneTransformAlloc(toFPA->x->nX, toFPA->x->nY);
     556        psPlaneTransform *toFPAnew = psPlaneTransformAlloc(toFPA->x->nX, toFPA->x->nY, PS_POLYNOMIAL_ORD);
    557557        for (int i = 0; i <= toFPA->x->nX; i++) {
    558558            for (int j = 0; j <= toFPA->x->nY; j++) {
     
    656656      chip->toFPA = psPlaneTransformSetCenter (NULL, wcs->trans, -wcs->crpix1, -wcs->crpix2);
    657657    } else {
    658       chip->toFPA = psPlaneTransformAlloc(wcs->trans->x->nX, wcs->trans->x->nY);
     658      chip->toFPA = psPlaneTransformAlloc(wcs->trans->x->nX, wcs->trans->x->nY, PS_POLYNOMIAL_ORD);
    659659
    660660      // copy the toFPA x,y, transformations to the wcs version
     
    743743    // XXX require fpa->toTPA->nX == 1
    744744
    745     psPlaneTransform *toTPA = psPlaneTransformAlloc(chip->toFPA->x->nX, chip->toFPA->x->nY);
     745    psPlaneTransform *toTPA = psPlaneTransformAlloc(chip->toFPA->x->nX, chip->toFPA->x->nY, PS_POLYNOMIAL_ORD);
    746746
    747747    for (int i = 0; i <= toTPA->x->nX; i++) {
     
    962962    }
    963963
    964     psPlaneTransform *newTrans = psPlaneTransformAlloc(1, 1);
     964    psPlaneTransform *newTrans = psPlaneTransformAlloc(1, 1, PS_POLYNOMIAL_ORD);
    965965
    966966    if (!psPlaneTransformFit(newTrans, src, dst, 0, 0)) {
     
    11221122    }
    11231123
    1124     psPlaneTransform *newToFPA = psPlaneTransformAlloc(1, 1);
     1124    psPlaneTransform *newToFPA = psPlaneTransformAlloc(1, 1, PS_POLYNOMIAL_ORD);
    11251125    newToFPA->x->coeffMask[1][1] = 1;
    11261126    newToFPA->y->coeffMask[1][1] = 1;
     
    11931193    psMemSetDeallocator(wcs, (psFreeFunc) pmAstromWCSFree);
    11941194
    1195     wcs->trans = psPlaneTransformAlloc (nXorder, nYorder);
     1195    // note: WCS transforms are always defined as chip to sky
     1196    wcs->trans = psPlaneTransformAlloc (nXorder, nYorder, PS_POLYNOMIAL_ORD);
    11961197    wcs->toSky = NULL;
    11971198    wcs->wcsCDkeys = 0;
Note: See TracChangeset for help on using the changeset viewer.