IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11376


Ignore:
Timestamp:
Jan 29, 2007, 12:26:24 PM (19 years ago)
Author:
magnier
Message:

added CAMERA, INSTRUMENT, DETECTOR, TELESCOPE to filerule lookups

File:
1 edited

Legend:

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

    r11255 r11376  
    241241        }
    242242    }
     243    if (strstr (newName, "{FILTER.ID}") != NULL) {
     244        if (file->fpa != NULL) {
     245            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.FILTERID");
     246            if (name && *name) {
     247                psStringSubstitute(&newName, name, "{FILTER.ID}");
     248            }
     249        }
     250    }
    243251    if (strstr (newName, "{CAMERA}") != NULL) {
    244252        if (file->fpa != NULL) {
    245             // XXX this concept does not exist...
    246             // char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.CAMERA");
    247             char *name = psStringCopy ("isp");
     253            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.INSTRUMENT");
    248254            if (name && *name) {
    249255                psStringSubstitute(&newName, name, "{CAMERA}");
    250256            }
    251             psFree (name);
     257        }
     258    }
     259    if (strstr (newName, "{INSTRUMENT}") != NULL) {
     260        if (file->fpa != NULL) {
     261            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.INSTRUMENT");
     262            if (name && *name) {
     263                psStringSubstitute(&newName, name, "{INSTRUMENT}");
     264            }
     265        }
     266    }
     267    if (strstr (newName, "{DETECTOR}") != NULL) {
     268        if (file->fpa != NULL) {
     269            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.DETECTOR");
     270            if (name && *name) {
     271                psStringSubstitute(&newName, name, "{DETECTOR}");
     272            }
     273        }
     274    }
     275    if (strstr (newName, "{TELESCOPE}") != NULL) {
     276        if (file->fpa != NULL) {
     277            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.TELESCOPE");
     278            if (name && *name) {
     279                psStringSubstitute(&newName, name, "{TELESCOPE}");
     280            }
    252281        }
    253282    }
Note: See TracChangeset for help on using the changeset viewer.