- Timestamp:
- Apr 3, 2021, 2:21:37 PM (5 years ago)
- Location:
- trunk/psModules/src/astrom
- Files:
-
- 3 edited
-
pmAstrometryDistortion.c (modified) (1 diff)
-
pmAstrometryModel.c (modified) (3 diffs)
-
pmAstrometryWCS.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryDistortion.c
r41496 r41533 340 340 psRegion *region = pmAstromFPAExtent (fpa); 341 341 342 // XXX psFree (fpa->fromTPA); 343 // XXX psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4); 344 // XXX fpa->fromTPA = psPlaneTransformInvert(myPT, fpa->toTPA, *region, 50); 345 // XXX psFree (myPT); 346 347 // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear) 342 348 psFree (fpa->fromTPA); 343 psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4); 344 fpa->fromTPA = psPlaneTransformInvert(myPT, fpa->toTPA, *region, 50); 345 psFree (myPT); 349 fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, *region, 50, 4); 346 350 psFree (region); 347 351 -
trunk/psModules/src/astrom/pmAstrometryModel.c
r41286 r41533 518 518 519 519 // convert the toFPA transfomations to fromFPA transformations 520 // we need a higher order transformation to model the inverse transformation521 // is +4 too large?522 // XXX EAM : hold off on high-order inverse chip fromFPA523 520 for (int i = 0; i < file->fpa->chips->n; i++) { 524 521 pmChip *chip = file->fpa->chips->data[i]; 525 522 if (!chip->toFPA) continue; 526 523 psRegion *region = pmChipPixels (chip); 524 525 // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear) 527 526 psFree (chip->fromFPA); 528 // psPlaneTransform *myPT = psPlaneTransformAlloc(chip->toFPA->x->nX+4, chip->toFPA->x->nY+4); 529 psPlaneTransform *myPT = NULL; 530 chip->fromFPA = psPlaneTransformInvert(myPT, chip->toFPA, *region, 50); 527 chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, 4); 528 531 529 psFree (region); 532 530 } … … 586 584 587 585 psRegion *region = pmAstromFPAExtent (file->fpa); 586 587 // XXX psFree (file->fpa->fromTPA); 588 // XXX psPlaneTransform *myPT = psPlaneTransformAlloc(file->fpa->toTPA->x->nX+4, file->fpa->toTPA->x->nY+4); 589 // XXX file->fpa->fromTPA = psPlaneTransformInvert(myPT, file->fpa->toTPA, *region, 50); 590 // XXX psFree (myPT); 591 592 // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear) 588 593 psFree (file->fpa->fromTPA); 589 psPlaneTransform *myPT = psPlaneTransformAlloc(file->fpa->toTPA->x->nX+4, file->fpa->toTPA->x->nY+4); 590 file->fpa->fromTPA = psPlaneTransformInvert(myPT, file->fpa->toTPA, *region, 50); 591 psFree (myPT); 594 file->fpa->fromTPA = psPlaneTransformInvert(NULL, file->fpa->toTPA, *region, 50, 4); 592 595 593 596 psFree (model); … … 735 738 // the inverse transformation requires a higher order model to fit the direct transformation sufficiently well 736 739 psRegion *region = pmAstromFPAExtent (file->fpa); 740 741 // XXX psFree (file->fpa->fromTPA); 742 // XXX psPlaneTransform *myPT = psPlaneTransformAlloc(file->fpa->toTPA->x->nX+4, file->fpa->toTPA->x->nY+4); 743 // XXX file->fpa->fromTPA = psPlaneTransformInvert(myPT, file->fpa->toTPA, *region, 50); 744 // XXX psFree (myPT); 745 737 746 psFree (file->fpa->fromTPA); 738 psPlaneTransform *myPT = psPlaneTransformAlloc(file->fpa->toTPA->x->nX+4, file->fpa->toTPA->x->nY+4); 739 file->fpa->fromTPA = psPlaneTransformInvert(myPT, file->fpa->toTPA, *region, 50); 740 psFree (myPT); 747 file->fpa->fromTPA = psPlaneTransformInvert(NULL, file->fpa->toTPA, *region, 50, 4); 748 741 749 psFree (region); 742 750 -
trunk/psModules/src/astrom/pmAstrometryWCS.c
r40553 r41533 606 606 psRegion *region = pmChipPixels (chip); 607 607 608 // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear) 608 609 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); 611 611 psFree (region); 612 612 … … 666 666 psRegion *region = pmChipPixels (chip); 667 667 668 // as of r40806, psPlaneTransformInvert supplies the extra order (if non-linear) 668 669 psFree (chip->fromFPA); 669 chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50 );670 chip->fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50, 4); 670 671 psFree (region); 671 672 … … 691 692 } 692 693 } 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) 693 698 694 699 // the transformation used the region to define the inversion grid … … 701 706 additional_orders = config_additional_orders; 702 707 } 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); 708 709 return true; 709 710 } … … 1030 1031 } 1031 1032 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); 1033 1035 if (!outFromFPA) { 1034 1036 psFree(outToFPA); … … 1147 1149 1148 1150 // this is a linear transformation 1149 psPlaneTransform *newFromFPA = psPlaneTransformInvert(NULL, newToFPA, *bounds, 1 );1151 psPlaneTransform *newFromFPA = psPlaneTransformInvert(NULL, newToFPA, *bounds, 1, 0); 1150 1152 if (!newFromFPA) { 1151 1153 psFree(newToFPA);
Note:
See TracChangeset
for help on using the changeset viewer.
