IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14371


Ignore:
Timestamp:
Jul 24, 2007, 3:39:58 PM (19 years ago)
Author:
Paul Price
Message:

Parse out path:// etc in the catdir.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroLoadRefstars.c

    r12806 r14371  
    1919    // XXX CATDIR needs to look up abstracted name from psastro.config
    2020    // XXX which is then selected from the top-level ipprc.config
    21     char *CATDIR = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
     21    char *catdir = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
     22    psString CATDIR = pmConfigConvertFilename(catdir, config, false); // Resolved filename
    2223    PS_ASSERT (CATDIR, NULL);
    2324
     
    3132    if ((fd = mkstemp (tempFile)) == -1) {
    3233        psError(PSASTRO_ERR_REFSTARS, true, "error creating temp output file\n");
     34        psFree(CATDIR);
    3335        return NULL;
    3436    }
     
    4749    if (strcasecmp(CATDIR, "NONE")) {
    4850        psStringAppend (&getstarCommand, " -D CATDIR %s", CATDIR);
    49     }
     51    }
     52    psFree(CATDIR);
    5053
    5154    // psStringAppend (&getstarCommand, " -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
     
    8184
    8285    if (table == NULL) {
    83         psError(PSASTRO_ERR_REFSTARS, true, "failure to load astrometric reference\n");
     86        psError(PSASTRO_ERR_REFSTARS, true, "failure to load astrometric reference\n");
    8487        return NULL;
    8588    }
     
    119122    // dump or plot the available refstars
    120123    if (psTraceGetLevel("psastro.dump") > 0) {
    121         psastroDumpRefstars (refstars, "refstars.dat");
     124        psastroDumpRefstars (refstars, "refstars.dat");
    122125    }
    123126
    124127    if (psTraceGetLevel("psastro.plot") > 0) {
    125         psastroPlotRefstars (refstars);
     128        psastroPlotRefstars (refstars);
    126129    }
    127130
Note: See TracChangeset for help on using the changeset viewer.