...
NOTE: The unique identifiers are CASE-SENSITIVE
The returned data structure gives you information about:
Import extra libraries
import numpy import matplotlib.pyplot as plt
Data for only one parameter
dataStructArray=client.getData('POST.PROCESSED.DENSITY','0x0000', 17898) dataStruct=dataStructArray[0] density=dataStruct.getData() tstart = dataStruct.getTStart() tend = dataStruct.getTEnd()
Calculate the time between samples
tbs = (tend.getTimeInMicros() - tstart.getTimeInMicros())/len(density)
Get the events associated with this data
events = dataStruct.get('events')
The event time (I’m assuming the event I want is at the index 0, but I should check first...)
tevent = TimeStamp(tstamp=events[0].get('tstamp'))
The delay of the start time relative to the event time
delay = tstart.getTimeInMicros() - tevent.getTimeInMicros()
Finally create the time array
times = numpy.linspace(delay,delay+tbs*(len(density)-1),len(density))
And plot the data
plt.plot(times, density); plt.show()
...
...
NOTE: The unique identifiers are CASE-SENSITIVE
The returned data structure gives you information about:
Import extra libraries
import numpy import matplotlib.pyplot as plt
Data for only one parameter
dataStructArray=client.getData('POST.PROCESSED.DENSITY','0x0000', 17898) dataStruct=dataStructArray[0] density=dataStruct.getData() tstart = dataStruct.getTStart() tend = dataStruct.getTEnd()
Calculate the time between samples
tbs = (tend.getTimeInMicros() - tstart.getTimeInMicros())/len(density)
Get the events associated with this data
events = dataStruct.get('events')
The event time (I’m assuming the event I want is at the index 0, but I should check first...)
tevent = TimeStamp(tstamp=events[0].get('tstamp'))
The delay of the start time relative to the event time
delay = tstart.getTimeInMicros() - tevent.getTimeInMicros()
Finally create the time array
times = numpy.linspace(delay,delay+tbs*(len(density)-1),len(density))
And plot the data
plt.plot(times, density); plt.show()