Skip to content

Commit

Permalink
fix: delay calculation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Barrow committed Jun 12, 2024
1 parent b36d774 commit 4d51c85
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 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.5.0"
version = "0.5.1"
description = "Timetag analysing library"
authors = [
{name = "Peter Thomas Barrow", email = "peter.barrow.93@gmail.com"}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from Cython.Build import cythonize
from setuptools import setup, Extension

local = True
local = False
cython_dir = os.path.join("tangy_src")

compiler_flags = []
Expand Down
4 changes: 2 additions & 2 deletions tangy_src/_tangy.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _make_slice(self, key: Union[int, slice]):
raise IndexError("out of range")
start = key.start
stop = key.stop
print("here", start, stop, stop)
# print("here", start, stop, stop)
return (start, stop, step)

# if key.start < self.begin:
Expand Down Expand Up @@ -1008,7 +1008,7 @@ def timetrace(self, channels: Union[int, List[int]], read_time: float,
channels_arr = zeros(n_channels, dtype=u8n)
channels_arr[0] = channels

print(n_channels, channels_arr)
# print(n_channels, channels_arr)

# channels_view: cython.uchar[::1] = asarray(channels, dtype=u8n)
channels_view: cython.uchar[::1] = channels_arr
Expand Down
1 change: 1 addition & 0 deletions tangy_src/src/analysis_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ JOIN(stub, current_time)(ring_buffer* buf, slice* data) {

static inline u64
JOIN(stub, lower_bound)(ring_buffer* buf, const slice* data, u64 key) {
// FIX: add bounds checks, mid should not exceed valid range
u64 capacity = rb_get_capacity(buf);
u64 count = rb_get_count(buf) - 1;
u64 conversion_factor = rb_get_conversion_factor(buf);
Expand Down

0 comments on commit 4d51c85

Please sign in to comment.