Jim Paris
211b652f8c
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10323 ddd99763-3ecb-0310-9145-efcb8ce7c51f
17 lines
405 B
Python
17 lines
405 B
Python
import tables
|
|
import numpy
|
|
|
|
class RawSample(tables.IsDescription):
|
|
timestamp = tables.UInt64Col()
|
|
voltage = tables.UInt16Col(shape = 3)
|
|
current = tables.UInt16Col(shape = 3)
|
|
|
|
h5file = tables.openFile("test.h5", mode = "w", title = "Test")
|
|
group = h5file.createGroup("/", "raw", "Raw Data")
|
|
table = h5file.createTable(group, "nilm1", RawSample, "NILM 1")
|
|
|
|
print repr(h5file)
|
|
|
|
# write rows
|
|
|