For converting between timestamps.
Project description
Samplestamps
Code for converting between time stamps and samples/frames.
Installation
pip install samplestamps
Usage
from samplestamps import SampStamp
ss = SampStamp(sample_times=daq_stamps[:,0],
frame_times=cam_stamps[:,0],
sample_numbers=daq_samplenumber[:,0])
ledonset_sample = 80000.0+np.argmax(daq_samples[80000:,-1]>0.05)
print(f'led onset at sample {ledonset_sample} corresponding to')
print(f' seconds: {ss.sample_time(ledonset_sample):1.3f}')
print(f' frame: {ss.frame(ledonset_sample):1.0f}.')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
samplestamps-0.4.4.tar.gz
(386.2 kB
view hashes)
Built Distribution
Close
Hashes for samplestamps-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fefd1f8db7fcf342a4b2bd06edf43dea1e92c120ff050c8bdaea4c9532f5fcd |
|
MD5 | 6f895f3feed5498194fd3f15e2daf39a |
|
BLAKE2b-256 | 7d4a16a250e9835be4212215286a1ef999c8683b3dc3d497a1bbac87c081b8bb |