IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 1, 2021, 9:50:01 AM (5 years ago)
Author:
eugene
Message:

add method to set the extra orders for inverse transformations

File:
1 edited

Legend:

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

    r41823 r41826  
    501501    psPlaneTransform *toFPA;
    502502
     503    int ExtraOrders = pmAstrometryGetExtraOrders();
     504
    503505    // create transformation with 0,0 reference pixel and units of degrees/pixel
    504506    toFPA = psPlaneTransformSetCenter (NULL, wcs->trans, -wcs->crpix1, -wcs->crpix2);
     
    608610    // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear)
    609611    psFree (chip->fromFPA);
    610     chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, EXTRA_ORDERS);
     612    chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, ExtraOrders);
    611613    psFree (region);
    612614
     
    648650     */
    649651
     652    int ExtraOrders = pmAstrometryGetExtraOrders();
     653
    650654    psFree (chip->toFPA);
    651655    if ((fabs(wcs->crpix1) > 0.01) || (fabs(wcs->crpix2) > 0.01)) {
     
    668672    // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear)
    669673    psFree (chip->fromFPA);
    670     chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, EXTRA_ORDERS);
     674    chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, ExtraOrders);
    671675    psFree (region);
    672676
     
    700704    // the region defines the FPA pixels covered by the tranformation
    701705    psFree (fpa->fromTPA);
    702     int additional_orders = EXTRA_ORDERS;  // This is the number of orders that should be added.
     706    int additional_orders = pmAstrometryGetExtraOrders();  // This is the number of orders that should be added.
    703707    bool status = false;
    704708    int config_additional_orders = psMetadataLookupS32(&status,fpa->analysis, "ADDITIONAL_WCS_ORDERS");
     
    9971001    PS_ASSERT_PTR_NON_NULL(inChip, NULL);
    9981002
     1003    int ExtraOrders = pmAstrometryGetExtraOrders();
     1004
    9991005    if (outFPA == NULL) {
    10001006        outFPA = inFPA;
     
    10321038
    10331039    // NOTE: the extraOrders value (4) should be ignored since outToFPA is specified to be linear
    1034     psPlaneTransform *outFromFPA = psPlaneTransformInvert(NULL, outToFPA, *outputBounds, 50, EXTRA_ORDERS);
     1040    psPlaneTransform *outFromFPA = psPlaneTransformInvert(NULL, outToFPA, *outputBounds, 50, ExtraOrders);
    10351041    if (!outFromFPA) {
    10361042        psFree(outToFPA);
Note: See TracChangeset for help on using the changeset viewer.