IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 15, 2006, 7:34:54 PM (20 years ago)
Author:
magnier
Message:

polynomial fits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/astrom/tap_pmAstrometryWCS_DVO2.c

    r10711 r10775  
    2424int main (void)
    2525{
    26     plan_tests(984);
     26    plan_tests(1472);
    2727
    2828    diag("pmAstromReadWCS tests compared with DVO coords routines");
     
    474474{
    475475    diag("test the inversion of the non-linear polynomial for toFPA -> fromFPA in pmAstromReadWCS");
     476    diag("note that the tolerance for these tests are rather loose");
     477    diag("a 2nd order polynomial is not a great approximate to 1 over a 2nd order polynomial");
     478    diag("unless the non-linear terms are quite small");
    476479    psMemId id = psMemGetId();
    477480
     
    533536            psPlaneTransformApply (bChip, chip->fromFPA, bFPA);
    534537
    535             ok_float(aChip->x, bChip->x, "coordinate match: %f vs %f (delta = %f)", aChip->x, bChip->x, aChip->x - bChip->x);
    536             ok_float(aChip->y, bChip->y, "coordinate match: %f vs %f (delta = %f)", aChip->y, bChip->y, aChip->y - bChip->y);
    537 
    538             // ok_float(aFPA->x, bFPA->x, "coordinate match: %f vs %f (delta = %f)", aFPA->x, bFPA->x, aFPA->x - bFPA->x);
    539             // ok_float(aFPA->y, bFPA->y, "coordinate match: %f vs %f (delta = %f)", aFPA->y, bFPA->y, aFPA->y - bFPA->y);
     538            // calculate appropriate tol values as f(x,y)
     539            ok_float_tol(aChip->x, bChip->x, 1.0, "coordinate match: %f vs %f (delta = %f)", aChip->x, bChip->x, aChip->x - bChip->x);
     540            ok_float_tol(aChip->y, bChip->y, 1.0, "coordinate match: %f vs %f (delta = %f)", aChip->y, bChip->y, aChip->y - bChip->y);
     541
     542            ok_float(aFPA->x, bFPA->x, "coordinate match: %f vs %f (delta = %f)", aFPA->x, bFPA->x, aFPA->x - bFPA->x);
     543            ok_float(aFPA->y, bFPA->y, "coordinate match: %f vs %f (delta = %f)", aFPA->y, bFPA->y, aFPA->y - bFPA->y);
    540544
    541545            // in this example, TPA coordinates are 10 arcsec/mm; the tol. below represent 1nano-arcsec
    542             // ok_float_tol(aTPA->x, bTPA->x, 1e-10, "coordinate match: %f vs %f (delta = %g)", aTPA->x, bTPA->x, aTPA->x - bTPA->x);
    543             // ok_float_tol(aTPA->y, bTPA->y, 1e-10, "coordinate match: %f vs %f (delta = %g)", aTPA->y, bTPA->y, aTPA->y - bTPA->y);
     546            ok_float_tol(aTPA->x, bTPA->x, 1e-10, "coordinate match: %f vs %f (delta = %g)", aTPA->x, bTPA->x, aTPA->x - bTPA->x);
     547            ok_float_tol(aTPA->y, bTPA->y, 1e-10, "coordinate match: %f vs %f (delta = %g)", aTPA->y, bTPA->y, aTPA->y - bTPA->y);
    544548        }
    545549    }
Note: See TracChangeset for help on using the changeset viewer.