Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

s_thyme: rounding error when creating the time grid #147

Closed
spribitzer opened this issue Oct 23, 2019 · 2 comments
Closed

s_thyme: rounding error when creating the time grid #147

spribitzer opened this issue Oct 23, 2019 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@spribitzer
Copy link
Contributor

In very rare cases a bug appears when using indirect dimensions. This mostly happens in combination with moving pulses. It is possible, that the total length of detection (in microseconds) stays constant but the number of detected points change. This is illustrated in the following example, where signals are detected during two consecutive events:

1st Acquisition point of indirect dimension:
tau1 = 0.5 μs, tau2 = 0.5 μs, dt = 0.2 μs
total detection time = 0.5 + 0.5 = 1 μs
total number of data points = 2 + 2 = 4

2nd Acquisition point of indirect dimension:
tau1 = 0.4 μs, tau2 = 0.6 μs, dt = 0.2 μs
total detection time = 0.4 + 0.6 = 1 μs
total number of data points = 2 + 3 = 5

Initially, s_thyme notices that the total length of detection is constant, and creates an n-dimensional vector array to store all the traces. However, during evaluation of the second acquisition point, the size of the array won't be able to accommodate the trace, which throws an error.

@spribitzer spribitzer added this to the 6.0 milestone Oct 23, 2019
@spribitzer spribitzer self-assigned this Oct 23, 2019
@spribitzer
Copy link
Contributor Author

improved handling with commit 62d01c5.
This fix appears to not work with all MATLAB versions though.

@stestoll stestoll added the bug Something isn't working label Oct 31, 2019
@spribitzer
Copy link
Contributor Author

Bug fixed with commit 68cfc47. Tests added with commit 98aa7ec.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants