IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2007, 11:50:56 AM (18 years ago)
Author:
eugene
Message:

require CLASSID for detrend lookup, check for too many returned files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r15674 r15812  
    685685        psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "CLASSID"); // Menu of class IDs
    686686        if (!status || !menu) {
    687             psWarning("Unable to find CLASSID metadata in camera configuration --- "
    688                       "assuming no class identifier required.");
    689         } else {
    690             const char *rule = psMetadataLookupStr(&status, menu, file->detrend->level); // Rule for class_id
    691             if (!status || !rule || strlen(rule) == 0) {
    692                 psWarning("Unable to find %s in CLASSID within camera configuration --- "
    693                           "attempting to proceed without it.", file->detrend->level);
    694             } else {
    695                 classId = pmFPAfileNameFromRule(rule, file, view);
    696                 if (!classId) {
    697                     psError(PS_ERR_IO, false, "error converting CLASSID rule to name: %s\n", rule);
    698                     return false;
    699                 }
    700             }
    701         }
     687            psError(PS_ERR_IO, false, "Unable to find CLASSID metadata in camera configuration");
     688            return false;
     689        }
     690        const char *rule = psMetadataLookupStr(&status, menu, file->detrend->level); // Rule for class_id
     691        if (!status || !rule || strlen(rule) == 0) {
     692            psError(PS_ERR_IO, false, "Unable to find %s in CLASSID in camera configuration", file->detrend->level);
     693            return false;
     694        }
     695        classId = pmFPAfileNameFromRule(rule, file, view);
     696        if (!classId) {
     697            psError(PS_ERR_IO, false, "error converting CLASSID rule to name: %s\n", rule);
     698            return false;
     699        }
    702700        psTrace ("psModules.camera", 6, "looking for detrend (%s, %s)\n", file->detrend->detID, classId);
    703701        psFree (file->filename);
Note: See TracChangeset for help on using the changeset viewer.