IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2021, 2:21:37 PM (5 years ago)
Author:
eugene
Message:

pass in additional orders to psPlaneTransformInvert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryWCS.c

    r40553 r41533  
    606606    psRegion *region = pmChipPixels (chip);
    607607
     608    // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear)
    608609    psFree (chip->fromFPA);
    609     assert (chip->fromFPA == NULL);
    610     chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50);
     610    chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, 4);
    611611    psFree (region);
    612612
     
    666666    psRegion *region = pmChipPixels (chip);
    667667
     668    // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear)
    668669    psFree (chip->fromFPA);
    669     chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50);
     670    chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, 4);
    670671    psFree (region);
    671672
     
    691692        }
    692693    }
     694
     695    // XXX the way this is coded, updates will NOT have the same behavior as with the
     696    // original code: the if ADDITIONAL_WCS_ORDERS is not found, the default
     697    // should be 0 (or else we need some way to detect the update version)
    693698
    694699    // the transformation used the region to define the inversion grid
     
    701706      additional_orders = config_additional_orders;
    702707    }
    703    
    704     psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+additional_orders, fpa->toTPA->x->nY+additional_orders);
    705 
    706     fpa->fromTPA = psPlaneTransformInvert(myPT, fpa->toTPA, region, 50);
    707     psFree (myPT);
     708    fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, region, 50, additional_orders);
    708709    return true;
    709710}
     
    10301031    }
    10311032
    1032     psPlaneTransform *outFromFPA = psPlaneTransformInvert(NULL, outToFPA, *outputBounds, 50);
     1033    // NOTE: the extraOrders value (4) should be ignored since outToFPA is specified to be linear
     1034    psPlaneTransform *outFromFPA = psPlaneTransformInvert(NULL, outToFPA, *outputBounds, 50, 4);
    10331035    if (!outFromFPA) {
    10341036        psFree(outToFPA);
     
    11471149
    11481150    // this is a linear transformation
    1149     psPlaneTransform *newFromFPA = psPlaneTransformInvert(NULL, newToFPA, *bounds, 1);
     1151    psPlaneTransform *newFromFPA = psPlaneTransformInvert(NULL, newToFPA, *bounds, 1, 0);
    11501152    if (!newFromFPA) {
    11511153        psFree(newToFPA);
Note: See TracChangeset for help on using the changeset viewer.