mirror of
https://github.com/echemdata/galvani.git
synced 2025-12-14 01:15:34 +00:00
Formatting
This commit is contained in:
@@ -144,7 +144,8 @@ VMPmodule_hdr = np.dtype([('shortname', 'S10'),
|
||||
('version', '<u4'),
|
||||
('date', 'S8')])
|
||||
|
||||
data_dtype_dict = {
|
||||
# Maps from colID to a tuple defining a numpy dtype
|
||||
VMPdata_colID_dtype_map = {
|
||||
4: ('time/s', '<f8'),
|
||||
5: ('control/V/mA', '<f4'),
|
||||
6: ('Ewe/V', '<f4'),
|
||||
@@ -185,7 +186,7 @@ data_dtype_dict = {
|
||||
477: ('NSD I/%', '<f4'),
|
||||
479: ('NSR Ewe/%', '<f4'),
|
||||
480: ('NSR I/%', '<f4'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def VMPdata_dtype_from_colIDs(colIDs):
|
||||
@@ -214,11 +215,11 @@ def VMPdata_dtype_from_colIDs(colIDs):
|
||||
raise NotImplementedError("flag %d not implemented" % colID)
|
||||
else:
|
||||
try:
|
||||
field = data_dtype_dict[colID][0]
|
||||
field = VMPdata_colID_dtype_map[colID][0]
|
||||
if field in field_list:
|
||||
field += str(len(field_list))
|
||||
field_list.append(field)
|
||||
type_list.append(data_dtype_dict[colID][1])
|
||||
type_list.append(VMPdata_colID_dtype_map[colID][1])
|
||||
except KeyError:
|
||||
print(list(zip(field_list, type_list)))
|
||||
raise NotImplementedError("column type %d not implemented"
|
||||
|
||||
Reference in New Issue
Block a user