mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
Fixed radar data
This commit is contained in:
parent
35f3568d24
commit
ac7ddd17e1
2 changed files with 6 additions and 9 deletions
|
@ -60,14 +60,14 @@ def get_hdf5_data(idra):
|
||||||
threshVals = []
|
threshVals = []
|
||||||
if len(idra) > 0:
|
if len(idra) > 0:
|
||||||
for ii in range(len(idra)):
|
for ii in range(len(idra)):
|
||||||
if idra[ii].getName() == "Data":
|
if idra[ii].getName() == b"Data":
|
||||||
rdat = idra[ii]
|
rdat = idra[ii]
|
||||||
elif idra[ii].getName() == "Angles":
|
elif idra[ii].getName() == b"Angles":
|
||||||
azdat = idra[ii]
|
azdat = idra[ii]
|
||||||
dattyp = "radial"
|
dattyp = "radial"
|
||||||
elif idra[ii].getName() == "DependentValues":
|
elif idra[ii].getName() == b"DependentValues":
|
||||||
depVals = idra[ii].getShortData()
|
depVals = idra[ii].getShortData()
|
||||||
elif idra[ii].getName() == "Thresholds":
|
elif idra[ii].getName() == b"Thresholds":
|
||||||
threshVals = idra[ii].getShortData()
|
threshVals = idra[ii].getShortData()
|
||||||
|
|
||||||
return rdat,azdat,depVals,threshVals
|
return rdat,azdat,depVals,threshVals
|
||||||
|
|
|
@ -154,18 +154,15 @@ class ThriftSerializationContext(object):
|
||||||
name = self.protocol.readStructBegin()
|
name = self.protocol.readStructBegin()
|
||||||
name = name.replace(b'_', b'.')
|
name = name.replace(b'_', b'.')
|
||||||
name = name.decode('cp437')
|
name = name.decode('cp437')
|
||||||
print(name, name in adapters.classAdapterRegistry)
|
|
||||||
if name.isdigit():
|
if name.isdigit():
|
||||||
print("before deserialize", name)
|
|
||||||
obj = self._deserializeType(int(name))
|
obj = self._deserializeType(int(name))
|
||||||
print("Object", obj, name)
|
|
||||||
return obj
|
return obj
|
||||||
elif name in adapters.classAdapterRegistry:
|
elif name in adapters.classAdapterRegistry:
|
||||||
return adapters.classAdapterRegistry[name].deserialize(self)
|
return adapters.classAdapterRegistry[name].deserialize(self)
|
||||||
elif name.find('$') > -1:
|
elif name.find('$') > -1:
|
||||||
# it's an inner class, we're going to hope it's an enum, treat it special
|
# it's an inner class, we're going to hope it's an enum, treat it special
|
||||||
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
||||||
if fieldName != '__enumValue__':
|
if fieldName != b'__enumValue__':
|
||||||
raise dynamiceserialize.SerializationException("Expected to find enum payload. Found: " + fieldName)
|
raise dynamiceserialize.SerializationException("Expected to find enum payload. Found: " + fieldName)
|
||||||
obj = self.protocol.readString()
|
obj = self.protocol.readString()
|
||||||
self.protocol.readFieldEnd()
|
self.protocol.readFieldEnd()
|
||||||
|
@ -184,7 +181,7 @@ class ThriftSerializationContext(object):
|
||||||
if b in self.typeDeserializationMethod:
|
if b in self.typeDeserializationMethod:
|
||||||
return self.typeDeserializationMethod[b]()
|
return self.typeDeserializationMethod[b]()
|
||||||
else:
|
else:
|
||||||
raise SerializationException("Unsupported type value " + str(b))
|
raise dynamiceserialize.SerializationException("Unsupported type value " + str(b))
|
||||||
|
|
||||||
|
|
||||||
def _deserializeField(self, structname, obj):
|
def _deserializeField(self, structname, obj):
|
||||||
|
|
Loading…
Add table
Reference in a new issue