Changeset 11101
- Timestamp:
- Jan 15, 2007, 11:58:15 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseCamera.c
r11095 r11101 18 18 19 19 // determine filter from the concepts 20 char *filter = p sMetadataLookupStr (&status, input->fpa->concepts, "FPA.FILTER");20 char *filter = pmConceptsFilterIDfromConcept ("FPA.FILTER", input->fpa->concepts, config->camera); 21 21 22 22 #if 0 … … 87 87 88 88 if (options->doFlat) { 89 // select FLAT.FILTERS from the recipe and test if the filter matches 90 // is the mdi saved with psList or string? 91 psMetadataItem *mdi = psMetadataLookup (recipe, "FLAT.FILTERS"); 92 if (mdi == NULL) { 93 // no valid filters for flat data for this camera 94 options->doFlat = false; 95 goto skip_flat; 96 } 97 // place entry on a list regardless of type 98 psList *filters = NULL; 99 if (mdi->type == PS_DATA_STRING) { 100 filters = psListAlloc(NULL); 101 psListAdd (filters, PS_LIST_HEAD, mdi); 102 } else { 103 if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("ppImage", "invalid type for FLAT.FILTERS"); 104 filter = psMemIncrRefCounter(mdi->data.list); 105 } 106 107 // search through list to find the current filter 108 psListIterator *iter = psListIteratorAlloc (filters, PS_LIST_HEAD, FALSE); 109 options->doFlat = false; 110 for (int i = 0; !options->doFlat && (i < filters->n); i++) { 111 psMetadataItem *item = psListGetAndIncrement (iter); 112 char *validFilter = item->data.V; 113 if (strcmp (validFilter, filter)) continue; 114 options->doFlat = true; 115 } 116 } 117 skip_flat: 118 if (options->doFlat) { 89 // if we fail to find the item in Args, we try again in Conf, then DetDB 90 // we need to handle the errors and catch serious errors, as opposed to 91 // data-not-found errors 119 92 bool status = false; 120 93 pmFPAfileDefineFromArgs (&status, config, "PPIMAGE.FLAT", "FLAT"); 94 psErrorClear(); 121 95 pmFPAfileDefineFromConf (&status, config, "PPIMAGE.FLAT"); 96 psErrorClear(); 122 97 pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.FLAT", input->fpa, PM_DETREND_TYPE_FLAT); 123 98 if (!status) { … … 127 102 } 128 103 104 // fringe frame are only applied for a subset of the filters. 105 // if the filter is one of those identified by a FRINGE.FILTERS metadata entry 106 // in ppImage.config, apply the fringe frame 129 107 if (options->doFringe) { 130 108 // select FRINGE.FILTERS from the recipe and test if the filter matches … … 143 121 } else { 144 122 if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("ppImage", "invalid type for FRINGE.FILTERS"); 145 filter = psMemIncrRefCounter(mdi->data.list);123 filters = psMemIncrRefCounter(mdi->data.list); 146 124 } 147 125
Note:
See TracChangeset
for help on using the changeset viewer.
