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.6.0.tar.gz
(386.6 kB
view details)
Built Distribution
File details
Details for the file samplestamps-0.6.0.tar.gz
.
File metadata
- Download URL: samplestamps-0.6.0.tar.gz
- Upload date:
- Size: 386.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a0cd42bddf9e06c27c79344e9c68d13014808fbaf8ac2e7aa9b7afb7337dc8 |
|
MD5 | 54337f750f3ed421af1be03280aa8355 |
|
BLAKE2b-256 | 4208f5fd941362aa7319a6923b2368c8da04dbc6d9d6a16d69a7f42931582ad6 |
File details
Details for the file samplestamps-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: samplestamps-0.6.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9ab4e9c0d992b73b8bef955cddfda5fa6683244b96cf9f5b640f7d6411fd006 |
|
MD5 | c199225657f01ecac0d268e30b0c9b26 |
|
BLAKE2b-256 | 796dab13810e7499d85bb51d75af55184143135dbaf0bf4ad55ca96f9280e677 |