IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42295


Ignore:
Timestamp:
Oct 14, 2022, 4:50:00 PM (4 years ago)
Author:
eugene
Message:

if the subkernel listed in the input mdc file is missing or corrupt, regenerate it; added an option -require-subkernel to enable the old behavior of failing if the subkernel is missing

Location:
trunk/ppSub/src
Files:
2 edited

Legend:

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

    r38709 r42295  
    104104    psMetadataAddBool(arguments, PS_LIST_TAIL, "-visual", 0, "Show diagnostic plots", NULL);
    105105    psMetadataAddBool(arguments, PS_LIST_TAIL, "-updatemode", 0, "update mode?", false);
     106    psMetadataAddBool(arguments, PS_LIST_TAIL, "-require-subkernel", 0, "do not regenerate subkernel if missing?", false);
    106107
    107108    if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 2) {
  • trunk/ppSub/src/ppSubCamera.c

    r42279 r42295  
    119119
    120120
    121 // Define an output file that will be used in a calculation
    122 // This means it might already be available in the RUN metadata
     121// Define an output file that will be used in a calculation. This means it might already be
     122// available in the RUN metadata
     123
     124// EAM 2022.10.14 : If the file is not found, treat it as if it did not exist in the input
     125// RUN metadata.  Currently, this is only used in this file to select
     126// PPSUB.OUTPUT.KERNELS.
    123127static pmFPAfile *defineCalcFile(pmConfig *config, // Configuration
    124128                                 pmFPAfile *bind,    // File to which to bind, or NULL
     
    133137    pmFPAfile *file = pmFPAfileDefineFromRun(&status, NULL, config, filerule); // File to return
    134138    if (!status) {
    135         psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule);
    136         return NULL;
     139      bool requireSubkernel = psMetadataLookupBool(NULL, config->arguments, "-require-subkernel");
     140      if (requireSubkernel) {
     141        psError(psErrorCodeLast(), false, "Failed to load file definition for %s", filerule);
     142        return NULL;
     143      } else {
     144        psWarning("Failed to load file definition for %s, regenerate", filerule);
     145      }
    137146    }
    138147    file = pmFPAfileBindFromArgs(&status, bind, config, filerule, argname);
Note: See TracChangeset for help on using the changeset viewer.