IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 12, 2007, 12:22:15 PM (19 years ago)
Author:
Paul Price
Message:

Adding fix to bug 853: when CELL.BIASSEC or CELL.TRIMSEC are specified by value in the CELLS part of the camera format, then they need to be updated by the binning. Added pmConceptsUpdate, which is run after concepts are read, and seaches for concepts to update (e.g., dependent on other concepts, which may not be available at read time --- just like CELL.TRIMSEC and CELL.XBIN/CELL.YBIN). To use this, changed the functions that parse/format standard concepts to receive the source of the concept. CELL.TRIMSEC and CELL.BIASSEC are updated for the binning if CELL.TRIMSEC.UPDATE or CELL.BIASSEC.UPDATE are set. Tested this quickly, and it seems to work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsRead.c

    r11404 r11749  
    5353static bool conceptParse(pmConceptSpec *spec, // The concept specification
    5454                         psMetadataItem *concept, // The concept to parse
     55                         pmConceptSource source, // The concept source
    5556                         psMetadata *cameraFormat, // The camera format
    5657                         psMetadata *target, // The target
     
    7172    psMetadataItem *parsed = NULL;  // The parsed concept
    7273    if (spec->parse) {
    73         parsed = spec->parse(concept, spec->blank, cameraFormat, fpa, chip, cell);
     74        parsed = spec->parse(concept, spec->blank, source, cameraFormat, fpa, chip, cell);
    7475    } else {
    7576        parsed = parsePlain(concept, spec->blank);
     
    144145                psString source = psMetadataLookupStr(&mdok, cell->config, nameSource); // The source
    145146                psFree(nameSource);
    146                 if (mdok && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) {
    147                     if (!conceptParse(spec, conceptItem, cameraFormat, target, NULL, NULL, cell)) {
     147                if (mdok && source && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) {
     148                    if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_CELLS,
     149                                      cameraFormat, target, NULL, NULL, cell)) {
    148150                        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from camera "
    149151                                "configuration\n", name);
     
    158160            } else {
    159161                // Another type --- should be OK
    160                 if (!conceptParse(spec, conceptItem, cameraFormat, target, NULL, NULL, cell)) {
     162                if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_CELLS,
     163                                  cameraFormat, target, NULL, NULL, cell)) {
    161164                    psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from camera "
    162165                            "configuration.\n", name);
     
    241244            // Now we can parse this as we would ordinarily
    242245        }
    243         if (conceptItem && !conceptParse(spec, conceptItem, cameraFormat, target, fpa, chip, cell)) {
     246        if (conceptItem && !conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_DEFAULTS,
     247                                         cameraFormat, target, fpa, chip, cell)) {
    244248            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from DEFAULTS.\n", name);
    245249            status = false;
     
    340344        // This will also clean up the name
    341345        if (headerItem) {
    342             if (!conceptParse(spec, headerItem, cameraFormat, target, fpa, chip, cell)) {
     346            if (!conceptParse(spec, headerItem, PM_CONCEPT_SOURCE_HEADER,
     347                              cameraFormat, target, fpa, chip, cell)) {
    343348                psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from header.\n", name);
    344349                status = false;
     
    459464
    460465                    // Now we have the result
    461                     if (!conceptParse(spec, conceptItem, cameraFormat, target, fpa, chip, cell)) {
     466                    if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_DATABASE,
     467                                      cameraFormat, target, fpa, chip, cell)) {
    462468                        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from database.\n",
    463469                                name);
Note: See TracChangeset for help on using the changeset viewer.