mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
merge from 7.0.0.rc
This commit is contained in:
commit
3bf6be41b4
Binary file not shown.
Before Width: | Height: | Size: 334 KiB After Width: | Height: | Size: 299 KiB |
@ -31,7 +31,7 @@ alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
|||||||
alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||||
|
|
||||||
# Loop colors and line styles (6 needed from 0 to 5)
|
# Loop colors and line styles (6 needed from 0 to 5)
|
||||||
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:ping', 'tab:grey']
|
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:grey']
|
||||||
linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.']
|
linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.']
|
||||||
alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
||||||
alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||||
|
@ -12,6 +12,7 @@ void init_duration(py::module &m) {
|
|||||||
.def("total_seconds", &DurationWrapper::total_seconds)
|
.def("total_seconds", &DurationWrapper::total_seconds)
|
||||||
.def("count", &DurationWrapper::count)
|
.def("count", &DurationWrapper::count)
|
||||||
.def("set_count", &DurationWrapper::set_count)
|
.def("set_count", &DurationWrapper::set_count)
|
||||||
|
.def("__eq__", &DurationWrapper::operator==)
|
||||||
.def("__repr__", [](const DurationWrapper &self) {
|
.def("__repr__", [](const DurationWrapper &self) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()
|
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()
|
||||||
|
@ -8,7 +8,7 @@ Testing functions from utils.py
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from slsdet.utils import *
|
from slsdet.utils import *
|
||||||
from slsdet import IpAddr, MacAddr
|
from slsdet import IpAddr, MacAddr, DurationWrapper
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
import pathlib
|
import pathlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -22,7 +22,11 @@ def test_iterable():
|
|||||||
|
|
||||||
|
|
||||||
def test_reduce_time_to_single_value_from_list():
|
def test_reduce_time_to_single_value_from_list():
|
||||||
t = 3 * [dt.timedelta(seconds=1)]
|
t = [dt.timedelta(seconds=1) for i in range(3)]
|
||||||
|
assert reduce_time(t) == 1
|
||||||
|
|
||||||
|
def test_reduce_time_to_single_value_from_list_DurationWrapper():
|
||||||
|
t = [DurationWrapper(1) for i in range(3)]
|
||||||
assert reduce_time(t) == 1
|
assert reduce_time(t) == 1
|
||||||
|
|
||||||
|
|
||||||
@ -83,6 +87,12 @@ def test_all_equal_str_fails():
|
|||||||
assert all_equal('aaab') == False
|
assert all_equal('aaab') == False
|
||||||
|
|
||||||
|
|
||||||
|
def test_all_equal_DurationWrapper():
|
||||||
|
assert all_equal([DurationWrapper(1), DurationWrapper(1)])
|
||||||
|
|
||||||
|
def test_all_equal_DurationWrapper_fail():
|
||||||
|
assert not all_equal([DurationWrapper(1), DurationWrapper(2)])
|
||||||
|
|
||||||
def test_element_if_equal_int():
|
def test_element_if_equal_int():
|
||||||
assert element_if_equal([5, 5]) == 5
|
assert element_if_equal([5, 5]) == 5
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1007,7 +1007,9 @@ int setDelayAfterTrigger(int64_t val) {
|
|||||||
// validate for tolerance
|
// validate for tolerance
|
||||||
int64_t retval = getDelayAfterTrigger();
|
int64_t retval = getDelayAfterTrigger();
|
||||||
val /= (1E-9 * CLK_FREQ);
|
val /= (1E-9 * CLK_FREQ);
|
||||||
val -= masterdefaultdelay;
|
if (master) {
|
||||||
|
val -= masterdefaultdelay;
|
||||||
|
}
|
||||||
if (val != retval) {
|
if (val != retval) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -313,7 +313,7 @@ patternParameters *setChannelRegisterChip(int ichip, char *mask,
|
|||||||
chanReg, ichip * NCHAN + ich * NCOUNTERS,
|
chanReg, ichip * NCHAN + ich * NCOUNTERS,
|
||||||
ichip * NCHAN_1_COUNTER + ich, ichip, ich));
|
ichip * NCHAN_1_COUNTER + ich, ichip, ich));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 24; i++) {
|
for (int i = 0; i < 23; i++) {
|
||||||
patword = clearBit(SIGNAL_clk, patword);
|
patword = clearBit(SIGNAL_clk, patword);
|
||||||
pat->word[iaddr++] = patword;
|
pat->word[iaddr++] = patword;
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
#define RELEASE "developer"
|
#define RELEASE "developer"
|
||||||
#define APILIB "developer 0x221213"
|
#define APILIB "developer 0x221213"
|
||||||
#define APIRECEIVER "developer 0x221213"
|
#define APIRECEIVER "developer 0x221213"
|
||||||
|
|
||||||
#define APICTB "developer 0x221213"
|
#define APICTB "developer 0x221213"
|
||||||
#define APIGOTTHARD "developer 0x221213"
|
|
||||||
#define APIGOTTHARD2 "developer 0x221213"
|
#define APIGOTTHARD2 "developer 0x221213"
|
||||||
#define APIJUNGFRAU "developer 0x221213"
|
#define APIJUNGFRAU "developer 0x221213"
|
||||||
#define APIMYTHEN3 "developer 0x221213"
|
|
||||||
#define APIMOENCH "developer 0x221213"
|
#define APIMOENCH "developer 0x221213"
|
||||||
#define APIEIGER "developer 0x221213"
|
#define APIEIGER "developer 0x221213"
|
||||||
|
|
||||||
|
#define APIGOTTHARD "developer 0x230117"
|
||||||
|
#define APIMYTHEN3 "developer 0x230117"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user