Skip to main content

For converting between timestamps.

Project description


Code for converting between time stamps and samples/frames.


pip install samplestamps


from samplestamps import SampStamp
ss = SampStamp(sample_times=daq_stamps[:,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.

Source Distribution

samplestamps-0.4.4.tar.gz (386.2 kB view hashes)

Uploaded source

Built Distribution

samplestamps-0.4.4-py3-none-any.whl (8.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page