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 = []
|
||||
if len(idra) > 0:
|
||||
for ii in range(len(idra)):
|
||||
if idra[ii].getName() == "Data":
|
||||
if idra[ii].getName() == b"Data":
|
||||
rdat = idra[ii]
|
||||
elif idra[ii].getName() == "Angles":
|
||||
elif idra[ii].getName() == b"Angles":
|
||||
azdat = idra[ii]
|
||||
dattyp = "radial"
|
||||
elif idra[ii].getName() == "DependentValues":
|
||||
elif idra[ii].getName() == b"DependentValues":
|
||||
depVals = idra[ii].getShortData()
|
||||
elif idra[ii].getName() == "Thresholds":
|
||||
elif idra[ii].getName() == b"Thresholds":
|
||||
threshVals = idra[ii].getShortData()
|
||||
|
||||
return rdat,azdat,depVals,threshVals
|
||||
|
|
|
@ -154,18 +154,15 @@ class ThriftSerializationContext(object):
|
|||
name = self.protocol.readStructBegin()
|
||||
name = name.replace(b'_', b'.')
|
||||
name = name.decode('cp437')
|
||||
print(name, name in adapters.classAdapterRegistry)
|
||||
if name.isdigit():
|
||||
print("before deserialize", name)
|
||||
obj = self._deserializeType(int(name))
|
||||
print("Object", obj, name)
|
||||
return obj
|
||||
elif name in adapters.classAdapterRegistry:
|
||||
return adapters.classAdapterRegistry[name].deserialize(self)
|
||||
elif name.find('$') > -1:
|
||||
# it's an inner class, we're going to hope it's an enum, treat it special
|
||||
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
||||
if fieldName != '__enumValue__':
|
||||
if fieldName != b'__enumValue__':
|
||||
raise dynamiceserialize.SerializationException("Expected to find enum payload. Found: " + fieldName)
|
||||
obj = self.protocol.readString()
|
||||
self.protocol.readFieldEnd()
|
||||
|
@ -184,7 +181,7 @@ class ThriftSerializationContext(object):
|
|||
if b in self.typeDeserializationMethod:
|
||||
return self.typeDeserializationMethod[b]()
|
||||
else:
|
||||
raise SerializationException("Unsupported type value " + str(b))
|
||||
raise dynamiceserialize.SerializationException("Unsupported type value " + str(b))
|
||||
|
||||
|
||||
def _deserializeField(self, structname, obj):
|
||||
|
|
Loading…
Add table
Reference in a new issue