Nanosecond times in Python (#522)

* initital implementation

* datetime replaces with sls::Duration in Python C bindings

* using custom type caster

* fix for conversion to seconds

* added set_count in python

* common header for pybind11 includes

authored-by: Erik Frojdh <erik.frojdh@psi.ch>
This commit is contained in:
Erik Fröjdh
2022-08-26 11:48:40 +02:00
committed by GitHub
parent 3970ed2560
commit 045a28b5de
21 changed files with 2081 additions and 1800 deletions

View File

@ -3,22 +3,20 @@
import os
import sys
import numpy as np
from pathlib import Path
sys.path.append(os.path.join(os.getcwd(), 'bin'))
# from pathlib import Path
# sys.path.append(os.path.join(os.getcwd(), 'bin'))
from slsdet import Detector, Mythen3, Eiger, Jungfrau, DetectorDacs, Dac, Ctb, Gotthard2, Moench
from slsdet import dacIndex, readoutMode
from slsdet.lookup import view, find
import slsdet
from slsdet import DurationWrapper
d = Detector()
e = Eiger()
c = Ctb()
g = Gotthard2()
# j = Jungfrau()
# m = Mythen3()
m = Moench()
t = DurationWrapper(1.0)
d.setExptime(t)
# d.setExptime(0.3)