IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30864


Ignore:
Timestamp:
Mar 10, 2011, 5:19:52 PM (15 years ago)
Author:
eugene
Message:

use the "original name" (the pre-nebulous resolution name) of the file to save in the header; use the psLib version of psStrinFileBasename to get the basename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/ppSub/src/ppSubDefineOutput.c

    r28255 r30864  
    7373    pmFPAfile *inFile = psMetadataLookupPtr(NULL, config->files, "PPSUB.INPUT"); // Input file
    7474
    75     // We should be using the GNU version of basename() which doesn't modify its argument, but just in case,
    76     // we'll copy the string.
    77     psString refName = psStringCopy(refFile->filename); // Filename of reference
    78     const char *refBase = basename(refName);            // Basename of reference
    79     psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.REFERENCE", 0,
    80                      "Subtraction reference", refBase);
    81     psFree(refName);
    82     psString inName = psStringCopy(inFile->filename);   // Filename of input
    83     const char *inBase = basename(inName);              // Basename of input
    84     psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.INPUT", 0,
    85                      "Subtraction input", inBase);
    86     psFree(inName);
     75    // save the names of the input and reference image in the header
     76    psString refBase = psStringFileBasename(refFile->origname);            // Basename of reference
     77    psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.REFERENCE", 0, "Subtraction reference", refBase);
     78    psFree(refBase);
     79
     80    psString inBase = psStringFileBasename(inFile->origname);              // Basename of input
     81    psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.INPUT", 0, "Subtraction input", inBase);
     82    psFree(inBase);
    8783
    8884    ppSubVersionHeader(outHDU->header);
Note: See TracChangeset for help on using the changeset viewer.