IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 16, 2006, 3:50:43 PM (20 years ago)
Author:
magnier
Message:

updates from day when MHPCC CVS was down

File:
1 edited

Legend:

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

    r7278 r7589  
    1212* XXX: Should we implement non-linear cell->chip transforms?
    1313*
    14 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2006-06-02 00:55:22 $
     14*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2006-06-17 01:50:43 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    619619}
    620620
    621 
     621static char *NameNONE = "NONE";
     622static char *NameFPA = "FPA";
     623static char *NameCHIP = "CHIP";
     624static char *NameCELL = "CELL";
     625static char *NameREADOUT = "READOUT";
     626
     627char *pmFPALevelToName(pmFPALevel level)
     628{
     629
     630    switch (level) {
     631    case PM_FPA_LEVEL_NONE:
     632        return NameNONE;
     633    case PM_FPA_LEVEL_FPA:
     634        return NameFPA;
     635    case PM_FPA_LEVEL_CHIP:
     636        return NameCHIP;
     637    case PM_FPA_LEVEL_CELL:
     638        return NameCELL;
     639    case PM_FPA_LEVEL_READOUT:
     640        return NameREADOUT;
     641    default:
     642        psAbort(PS_FILE_LINE, "You can't get here; level = %d", level);
     643    }
     644    return NULL;
     645}
     646
     647pmFPALevel pmFPALevelFromName(const char *name)
     648{
     649    pmFPALevel val;
     650
     651    if (name == NULL) {
     652        val = PM_FPA_LEVEL_NONE;
     653    } else if (!strcasecmp(name, "FPA"))     {
     654        val = PM_FPA_LEVEL_FPA;
     655    } else if (!strcasecmp(name, "CHIP"))    {
     656        val = PM_FPA_LEVEL_CHIP;
     657    } else if (!strcasecmp(name, "CELL"))    {
     658        val = PM_FPA_LEVEL_CELL;
     659    } else if (!strcasecmp(name, "READOUT")) {
     660        val = PM_FPA_LEVEL_READOUT;
     661    } else {
     662        val = PM_FPA_LEVEL_NONE;
     663    }
     664
     665    return val;
     666}
     667
Note: See TracChangeset for help on using the changeset viewer.