Skip to content

Commit

Permalink
feat: qutools file reader
Browse files Browse the repository at this point in the history
file reader for qutools files added, further support of qutag models
added although not currently available to end users as it requires testing
  • Loading branch information
Peter-Barrow committed Sep 11, 2024
1 parent 84a92dd commit c4f034f
Show file tree
Hide file tree
Showing 18 changed files with 1,222 additions and 966 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "tangy"
version = "0.8.2"
version = "0.9.0"
description = "Timetag analysing library"
authors = [
{name = "Peter Thomas Barrow", email = "peter.barrow.93@gmail.com"}
Expand Down
23 changes: 22 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@
)
extensions.append(uqd)

# qutag = Extension(
# "tangy._qutag",
# sources=[
# os.path.join(cython_dir, "_qutag.py"),
# ],
# include_dirs=[
# get_include(),
# "./opt/QUTAG-HR/userlib/inc",
# ".",
# "./tangy_src",
# "./tangy_src/src/",
# ],
# libraries=[libusb, 'tdcbase'],
# library_dirs=['.', './opt/QUTAG-HR/userlib/lib'],
# extra_compile_args=compiler_flags,
# define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')],
# optional=os.environ.get('CIBUILDWHEEL', '0') != '1',
# )
# extensions.append(qutag)

if "Windows" in platform.platform():
# these are needed for local development
# os.environ["CC"] = "x86_64-w64-mingw32-gcc"
Expand Down Expand Up @@ -95,4 +115,5 @@
compiler_directives={'language_level': '3'},
annotate=True)

setup(ext_modules=ext_modules, include_package_data=True)
# setup(ext_modules=ext_modules, include_package_data=True)
setup(ext_modules=ext_modules)
8 changes: 6 additions & 2 deletions tangy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
from ._tangy import buffer_list_append, buffer_list_show, buffer_list_delete_all
from ._tangy import Records
from ._tangy import TangyBuffer, TangyBufferType
from ._tangy import PTUFile
from ._tangy import PTUFile, QuToolsFile

from sys import platform
from ctypes.util import find_library

_uqd_lib = None
_qutag_lib = None

if platform.startswith("linux"):
_uqd_lib = find_library("timetag64")
_qutag_lib = find_library("tdcbase")

if platform.startswith("win32"):
_uqd_lib = find_library("CTimeTagLib")
from ._uqd import UQDLogic16

if _uqd_lib is not None:
from ._uqd import UQDLogic16

if _qutag_lib is not None:
from ._qutag import QuTagHR, DeviceChannel, SignalEdge, SignalConditioning
5 changes: 0 additions & 5 deletions tangy/__init__.pyi

This file was deleted.

Loading

0 comments on commit c4f034f

Please sign in to comment.