Example #1
0
    def __init__(self, family='', name=''):
        # There is an hack to set the first latitude and longitude (see setters) so coord1 and 2
        # need to be defined when calling Configurable.__init__ which will try to call the setters
        self.catalog = {}
        self.descriptionOfVariables = {}
        self.descriptionOfFacilities = {}
        self._dictionaryOfFacilities = {}

        self.typeOfVariables = {}
        self.unitsOfVariables = {}
        self.dictionaryOfOutputVariables = {}
        self.dictionaryOfVariables = {}
        self.mandatoryVariables = []
        self.optionalVariables = []

        # since we hacked the with to call coord1 the facilities need to be defined when calling
        # Configurable.__init__
        self._facilities()

        self.updateParameters()
        DataAccessor.__init__(self)
        Configurable.__init__(self,
                              family if family else self.__class__.family,
                              name=name)
        self._instanceInit()
        self._isFinalized = False
        return None
Example #2
0
 def __init__(self, name=None):
     DataAccessor.__init__(self)
     Configurable.__init__(self, 'image', name)
     self._instanceInit()
     return None
Example #3
0
# # Map various byte order codes to Image's.
ENDIAN = {
    'l': 'l',
    'L': 'l',
    '<': 'l',
    'little': 'l',
    'Little': 'l',
    'b': 'b',
    'B': 'b',
    '>': 'b',
    'big': 'b',
    'Big': 'b'
}

# long could be machine dependent
sizeLong = DataAccessor.getTypeSizeS('LONG')
TO_NUMPY = {
    'BYTE': 'i1',
    'SHORT': 'i2',
    'INT': 'i4',
    'LONG': 'i' + str(sizeLong),
    'FLOAT': 'f4',
    'DOUBLE': 'f8',
    'CFLOAT': 'c8',
    'CDOUBLE': 'c16'
}

BYTE_ORDER = Component.Parameter('byteOrder',
                                 public_name='BYTE_ORDER',
                                 default=sys.byteorder[0].lower(),
                                 type=str,