IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2007, 11:27:39 AM (19 years ago)
Author:
Paul Price
Message:

Resolving file names, so as to be suitable for use with Nebulous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeCheckInputs.c

    r13230 r13246  
    2323    psString outName = psMetadataLookupStr(NULL, config->arguments, "OUTPUT"); // The output file name
    2424    assert(outName);                    // It should be there!
     25    outName = pmConfigConvertFilename(outName, config, true);
    2526    data->outFile = psFitsOpen(outName, "w"); // Output FITS file
    2627    if (!data->outFile) {
    2728        // There's no point in continuing if we can't open the output
    2829        psErrorStackPrint(stderr, "Can't open output image: %s\n", outName);
     30        psFree(outName);
    2931        exit(EXIT_FAILURE);
    3032    }
     33    psFree(outName);
    3134
    3235    // Statistics file
     
    5962        }
    6063        psTrace("ppMerge", 1, "Checking input file %s....\n", name);
    61         psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
     64        psString resolved = pmConfigConvertFilename(name, config, false); // Resolved file name
     65        psFits *inFile = psFitsOpen(resolved, "r"); // The FITS file to read
    6266        if (!inFile) {
    63             psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", name);
     67            psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", resolved);
    6468            // Kick it out
    6569            psFree(filenames->data[i]);
     
    6771            continue;
    6872        }
     73        psFree(resolved);
    6974        psMetadata *header = psFitsReadHeader(NULL, inFile); // The FITS (primary) header
    7075        data->files->data[i] = inFile;
Note: See TracChangeset for help on using the changeset viewer.