Working on Python, I need to convert an array of datetime values into sample times, because I want to treat the corresponding time of the time series as sampletime [0..T].
[2013/11/09 14:29:54.660, 2013/11/09 14:29:54.680, ... T]
where T> 1000. So I have an array of >1000 date time values, pretty big
I come up with the following code:
tiempos= [datetime.strptime(x,"%Y/%m/%d %H:%M:%S.%f") for x in csvTimeColum]
sampletime= [(t- tiempos[0]).microseconds/1000 for t in tiempos]
This piece of code seem to work well, but I have batches of 1000 samples within the signal:
[0,20,...,980,0,20,...,980,0,20,...,980,...]
So, my resulting signal is not a continuos one. How do I properly do this conversion in order to keep a continuous signal? Anybody has a good idea on how to solve this?