IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23448


Ignore:
Timestamp:
Mar 19, 2009, 4:53:34 PM (17 years ago)
Author:
Paul Price
Message:

There's a difference between pmFPAfileDefineOutput and
pmFPAfileDefineFromFile --- the latter puts the template in the 'src'
entry, rather than binding the two together.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubCamera.c

    r23399 r23448  
    6666static pmFPAfile *defineOutputFile(pmConfig *config, // Configuration
    6767                                   pmFPAfile *template,    // File to use as basis for definition
     68                                   bool source, // Is template a source (T), or for binding (F)?
    6869                                   char *filerule,     // Name of file rule
    69                                    pmFPAfileType fileType // Type of file
     70                                   pmFPAfileType fileType, // Type of file
    7071    )
    7172{
    7273
    73     pmFPAfile *file = pmFPAfileDefineFromFile(config, template, 1, 1, filerule);
     74    pmFPAfile *file = source ? pmFPAfileDefineFromFile(config, template, 1, 1, filerule) :
     75        pmFPAfileDefineOutput(config, template->fpa, filerule);
    7476    if (!file) {
    7577        psError(PS_ERR_IO, false, _("Unable to generate output file from %s"), filerule);
     
    160162
    161163    // Output image
    162     pmFPAfile *output = defineOutputFile(config, input, "PPSUB.OUTPUT", PM_FPA_FILE_IMAGE);
    163     pmFPAfile *outMask = defineOutputFile(config, output, "PPSUB.OUTPUT.MASK", PM_FPA_FILE_MASK);
     164    pmFPAfile *output = defineOutputFile(config, input, true, "PPSUB.OUTPUT", PM_FPA_FILE_IMAGE);
     165    pmFPAfile *outMask = defineOutputFile(config, output, false, "PPSUB.OUTPUT.MASK", PM_FPA_FILE_MASK);
    164166    if (!output || !outMask) {
    165167        psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     
    170172    pmFPAfile *outVar = NULL;
    171173    if (inVar && refVar) {
    172         outVar = defineOutputFile(config, output, "PPSUB.OUTPUT.VARIANCE", PM_FPA_FILE_VARIANCE);
     174        outVar = defineOutputFile(config, output, false, "PPSUB.OUTPUT.VARIANCE", PM_FPA_FILE_VARIANCE);
    173175        if (!outVar) {
    174176            psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     
    180182
    181183    // Convolved input image
    182     pmFPAfile *inConvImage = defineOutputFile(config, input, "PPSUB.INPUT.CONV", PM_FPA_FILE_IMAGE);
    183     pmFPAfile *inConvMask = defineOutputFile(config, input, "PPSUB.INPUT.CONV.MASK", PM_FPA_FILE_MASK);
     184    pmFPAfile *inConvImage = defineOutputFile(config, input, true, "PPSUB.INPUT.CONV", PM_FPA_FILE_IMAGE);
     185    pmFPAfile *inConvMask = defineOutputFile(config, inConvImage, false, "PPSUB.INPUT.CONV.MASK",
     186                                             PM_FPA_FILE_MASK);
    184187    if (!inConvImage || !inConvMask) {
    185188        psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     
    187190    }
    188191    if (inVar) {
    189         pmFPAfile *inConvVar = defineOutputFile(config, input, "PPSUB.INPUT.CONV.VARIANCE",
     192        pmFPAfile *inConvVar = defineOutputFile(config, inConvImage, false, "PPSUB.INPUT.CONV.VARIANCE",
    190193                                                PM_FPA_FILE_VARIANCE);
    191194        if (!inConvVar) {
     
    196199
    197200    // Convolved ref image
    198     pmFPAfile *refConvImage = defineOutputFile(config, input, "PPSUB.REF.CONV", PM_FPA_FILE_IMAGE);
    199     pmFPAfile *refConvMask = defineOutputFile(config, input, "PPSUB.REF.CONV.MASK", PM_FPA_FILE_MASK);
     201    pmFPAfile *refConvImage = defineOutputFile(config, input, true, "PPSUB.REF.CONV", PM_FPA_FILE_IMAGE);
     202    pmFPAfile *refConvMask = defineOutputFile(config, refConvImage, false, "PPSUB.REF.CONV.MASK",
     203                                              PM_FPA_FILE_MASK);
    200204    if (!refConvImage || !refConvMask) {
    201205        psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     
    203207    }
    204208    if (refVar) {
    205         pmFPAfile *refConvVar = defineOutputFile(config, input, "PPSUB.REF.CONV.VARIANCE",
     209        pmFPAfile *refConvVar = defineOutputFile(config, refConvImage, false, "PPSUB.REF.CONV.VARIANCE",
    206210                                                 PM_FPA_FILE_VARIANCE);
    207211        if (!refConvVar) {
Note: See TracChangeset for help on using the changeset viewer.