IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 13, 2006, 12:15:55 PM (20 years ago)
Author:
Paul Price
Message:

Adding FRINGE type to pmFPAfile, which reads from/writes to FITS tables at the cell level.

File:
1 edited

Legend:

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

    r9903 r9950  
    7171    file->extxtra  = psMemIncrRefCounter(psMetadataLookupStr (&status, data, "EXTNAME.XTRA"));
    7272
    73     file->type = PM_FPA_FILE_NONE;
    7473    type = psMetadataLookupStr (&status, data, "FILE.TYPE");
    75     if (type != NULL) {
    76         if (!strcasecmp (type, "SX"))     {
    77             file->type = PM_FPA_FILE_SX;
    78         } else if (!strcasecmp (type, "OBJ"))     {
    79             file->type = PM_FPA_FILE_OBJ;
    80         } else if (!strcasecmp (type, "CMP"))     {
    81             file->type = PM_FPA_FILE_CMP;
    82         } else if (!strcasecmp (type, "CMF"))     {
    83             file->type = PM_FPA_FILE_CMF;
    84         } else if (!strcasecmp (type, "RAW"))     {
    85             file->type = PM_FPA_FILE_RAW;
    86         } else if (!strcasecmp (type, "IMAGE"))     {
    87             file->type = PM_FPA_FILE_IMAGE;
    88         } else if (!strcasecmp (type, "PSF"))     {
    89             file->type = PM_FPA_FILE_PSF;
    90         } else if (!strcasecmp (type, "JPEG"))     {
    91             file->type = PM_FPA_FILE_JPEG;
    92         }
    93     }
     74    file->type = pmFPAfileTypeFromString(type);
    9475    if (file->type == PM_FPA_FILE_NONE) {
    9576        psError(PS_ERR_IO, true, "FILE.TYPE is not defined for %s\n", name);
     
    167148    file->extxtra  = psMemIncrRefCounter(psMetadataLookupStr (&status, data, "EXTNAME.XTRA"));
    168149
    169     file->type = PM_FPA_FILE_NONE;
    170150    type = psMetadataLookupStr (&status, data, "FILE.TYPE");
    171     if (type != NULL) {
    172         if (!strcasecmp (type, "SX"))     {
    173             file->type = PM_FPA_FILE_SX;
    174         } else if (!strcasecmp (type, "OBJ"))     {
    175             file->type = PM_FPA_FILE_OBJ;
    176         } else if (!strcasecmp (type, "CMP"))     {
    177             file->type = PM_FPA_FILE_CMP;
    178         } else if (!strcasecmp (type, "CMF"))     {
    179             file->type = PM_FPA_FILE_CMF;
    180         } else if (!strcasecmp (type, "RAW"))     {
    181             file->type = PM_FPA_FILE_RAW;
    182         } else if (!strcasecmp (type, "IMAGE"))     {
    183             file->type = PM_FPA_FILE_IMAGE;
    184         } else if (!strcasecmp (type, "PSF"))     {
    185             file->type = PM_FPA_FILE_PSF;
    186         } else if (!strcasecmp (type, "JPEG"))     {
    187             file->type = PM_FPA_FILE_JPEG;
    188         }
    189     }
     151    file->type = pmFPAfileTypeFromString(type);
    190152    if (file->type == PM_FPA_FILE_NONE) {
    191153        psError(PS_ERR_IO, true, "FILE.TYPE is not defined for %s\n", name);
Note: See TracChangeset for help on using the changeset viewer.