IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 15, 2023, 4:43:48 PM (3 years ago)
Author:
eugene
Message:

fix print type for rowcount in psDB.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/psLib/test/math/tap_psMatrix08.c

    r24087 r42500  
    2020psS32 main( psS32 argc, char* argv[] )
    2121{
     22    fprintf (stderr, "path: %s\n", argv[0]);
     23
     24    char imApath[1024];
     25    char imBpath[1024];
     26    char topPath[1024];
     27    char *libpath = strstr (argv[0], ".libs/");
     28    if (!libpath) {
     29        fprintf (stderr, "ERROR: cannot find input data\n");
     30        exit (2);
     31    }
     32
     33    // if (strncmp(argv[0], ".libs/", 6))
     34    int nTopPath = libpath - argv[0]; //
     35    if (nTopPath) {
     36        ps_strncpy_nowarn (topPath, argv[0], nTopPath); topPath[nTopPath] = 0;
     37        ps_snprintf_nowarn (imApath, 1024, "%s/%s", topPath, "data/Agj.fits");
     38        ps_snprintf_nowarn (imBpath, 1024, "%s/%s", topPath, "data/Bgj.fits");
     39    } else {
     40        ps_snprintf_nowarn (imApath, 1024, "%s", "data/Agj.fits");
     41        ps_snprintf_nowarn (imBpath, 1024, "%s", "data/Bgj.fits");
     42    }
     43
    2244    plan_tests(23);
    2345    // psTraceSetLevel("psLib.math.psMatrixGJSolve", 4);
     
    3254        // XXX this is an ill-conditioned matrix.  LU Decomposition does not inform us that it is ill-conditioned. 
    3355        // the result solves the equation, but what are the errors on the values?
    34         fits = psFitsOpen ("data/Agj.fits", "r");
     56        fits = psFitsOpen (imApath, "r");
    3557        ok(fits, "opened test image Agj.fits");
    3658
     
    4365        psFitsClose (fits);
    4466
    45         fits = psFitsOpen ("data/Bgj.fits", "r");
     67        fits = psFitsOpen (imBpath, "r");
    4668        ok(fits, "opened test image Bgj.fits");
    4769
     
    98120
    99121        // we have a specific ill-conditioned matrix in Agj.fits. psMatrixGJSolve detects this and reports a failure.
    100         fits = psFitsOpen ("data/Agj.fits", "r");
     122        fits = psFitsOpen (imApath, "r");
    101123        ok(fits, "opened test image Agj.fits");
    102124
     
    106128        psFitsClose (fits);
    107129
    108         fits = psFitsOpen ("data/Bgj.fits", "r");
     130        fits = psFitsOpen (imBpath, "r");
    109131        ok(fits, "opened test image Bgj.fits");
    110132
     
    147169
    148170        // we have a specific ill-conditioned matrix in Agj.fits. psMatrixGJSolve detects this and reports a failure.
    149         fits = psFitsOpen ("data/Agj.fits", "r");
     171        fits = psFitsOpen (imApath, "r");
    150172        ok(fits, "opened test image Agj.fits");
    151173
     
    158180        psFitsClose (fits);
    159181
    160         fits = psFitsOpen ("data/Bgj.fits", "r");
     182        fits = psFitsOpen (imBpath, "r");
    161183        ok(fits, "opened test image Bgj.fits");
    162184
Note: See TracChangeset for help on using the changeset viewer.