IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39724


Ignore:
Timestamp:
Sep 25, 2016, 6:47:47 PM (10 years ago)
Author:
eugene
Message:

distortion map inverse needs to have higher order than forward transform

Location:
branches/czw_branch/20160809/psastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/psastro/src/psastroMosaicAstrom.c

    r39699 r39724  
    280280
    281281    // psPlaneTransformInvert will generate a new fromTPA with order to match toTPA
    282     fpa->fromTPA = psPlaneTransformInvert (fpa->fromTPA, fpa->toTPA, fitRegion, 100);
     282    psFree (fpa->fromTPA);
     283    psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4);
     284
     285    fpa->fromTPA = psPlaneTransformInvert (myPT, fpa->toTPA, fitRegion, 100);
     286    psFree (myPT);
    283287
    284288    psFree (fpa->toSky);
     
    291295
    292296    psFree (view);
     297
     298    if (!psastroMosaicSetAstrom (fpa)) {
     299        psError(PSASTRO_ERR_UNKNOWN, false, "failed to apply mosaic distortion terms\n");
     300        return false;
     301    }
     302
    293303    return true;
    294304}
  • branches/czw_branch/20160809/psastro/src/psastroMosaicCorrectDistortion.c

    r21409 r39724  
    6262
    6363    psFree (fpa->fromTPA);
    64     fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, *region, 50);
     64    psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4);
     65    fpa->fromTPA = psPlaneTransformInvert(myPT, fpa->toTPA, *region, 50);
     66    psFree (myPT);
    6567    psFree (region);
    6668
Note: See TracChangeset for help on using the changeset viewer.