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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size samplestamps-0.2.3-py3-none-any.whl (8.3 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size samplestamps-0.2.3.tar.gz (383.4 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for samplestamps-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 619fca0f88ced3879f5165f569dab55f6a66353541cac50e4c20aaf8bc89c634 |
|
MD5 | 93aedb64bcb436cdf2ff632f6fa05e89 |
|
BLAKE2-256 | b17217f8212db0008b3c8457f3e3a73ca0548a146d6b86f87527ffe590a4fc90 |