IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11104


Ignore:
Timestamp:
Jan 15, 2007, 11:59:31 AM (19 years ago)
Author:
magnier
Message:

creating pmConceptsFilterIDfromConcept

Location:
trunk/psModules/src
Files:
3 edited

Legend:

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

    r10966 r11104  
    254254    if (strstr (newName, "{FILTER.ID}") != NULL) {
    255255        if (file->fpa != NULL) {
    256             char *filterName = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.FILTER");
    257             psMetadata *filterTable = psMetadataLookupPtr (NULL, file->camera, "FILTER.ID");
    258             if (filterName && *filterName && filterTable) {
    259                 char *ID = psMetadataLookupStr (NULL, filterTable, filterName);
    260                 if (ID && *ID) {
    261                     psStringSubstitute(&newName, ID, "{FILTER.ID}");
    262                 }
     256            char *filterID = pmConceptsFilterIDfromConcept ("FPA.FILTER", file->fpa->concepts, file->camera);
     257            if (filterID && *filterID) {
     258                psStringSubstitute(&newName, filterID, "{FILTER.ID}");
    263259            }
    264260        }
  • trunk/psModules/src/concepts/pmConceptsPhotcode.c

    r9572 r11104  
    4040    return photcode;
    4141}
     42
     43char *pmConceptsFilterIDfromConcept (char *concept, psMetadata *concepts, psMetadata *camera)
     44{
     45
     46    bool status;
     47
     48    char *filterName = psMetadataLookupStr (&status, concepts, concept);
     49    if (!status)
     50        psAbort ("psModules", "missing concept %s", concept);
     51    psMetadata *filterTable = psMetadataLookupPtr (&status, camera, "FILTER.ID");
     52    if (!status)
     53        psAbort ("ppImage", "missing FILTER.ID table");
     54    char *filter = psMetadataLookupStr (&status, filterTable, filterName);
     55    if (!status)
     56        psAbort ("ppImage", "FILTER %s not found in FILTER.ID table", filterName);
     57
     58    return filter;
     59}
     60
  • trunk/psModules/src/concepts/pmConceptsPhotcode.h

    r9581 r11104  
    77/// @author Eugene Magnier, IfA
    88///
    9 /// @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    10 /// @date $Date: 2006-10-16 22:03:56 $
     9/// @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     10/// @date $Date: 2007-01-15 21:59:31 $
    1111///
    1212/// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
     
    2727/// the PHASE2 recipe.  Interpolation using the usual syntax (e.g., "{CHIP.NAME}") is permitted.
    2828psString pmConceptsPhotcodeForView(pmConfig *config, pmFPAfile *file, pmFPAview *view);
     29char *pmConceptsFilterIDfromConcept (char *concept, psMetadata *concepts, psMetadata *camera);
    2930
    3031# endif
Note: See TracChangeset for help on using the changeset viewer.