Merge remote-tracking branch 'origin/main' into dev/multifit
Build on RHEL9 / build (push) Successful in 2m52s
Build on RHEL8 / build (push) Successful in 3m30s
Run tests using data on local RHEL8 / build (push) Failing after 4m34s

# Conflicts:
#	RELEASE.md
#	docs/src/pyFit.rst
This commit is contained in:
Erik Fröjdh committed 2026-09-25 19:12:45 +02:00
commit d1bfc85c8f
26 files changed
+597 -280

No files matched your search

+18
View File
@@ -162,3 +162,21 @@ def test_3x3_reduction():
@pytest.mark.parametrize(
"cluster_type, n_pixels",
[(_aare.Cluster3x3i, 9), (_aare.Cluster2x2i, 4)],
)
def test_cluster_constructor_requires_exact_data_length(cluster_type, n_pixels):
"""Data must hold exactly one value per pixel"""
for bad in (
np.ones(n_pixels - 1, dtype=np.int32),
np.ones(n_pixels + 1, dtype=np.int32),
np.ones((n_pixels, 1), dtype=np.int32),
):
with pytest.raises(ValueError, match=f"{n_pixels} values"):
cluster_type(0, 0, bad)
cluster = cluster_type(0, 0, np.arange(n_pixels, dtype=np.int32))
assert (cluster.data.ravel() == np.arange(n_pixels)).all()
+1 -1
View File
@@ -146,7 +146,7 @@ def test_masking_requires_c_contiguous_array():
mask = np.array([True, False, True, False], dtype=bool)[::2]
assert not mask.flags.c_contiguous
with pytest.raises(TypeError):
with pytest.raises(ValueError, match="C-contiguous"):
cv(mask)
+2 -3
View File
@@ -172,7 +172,7 @@ def test_pedestal_rejects_noncontiguous_inputs(dtype, input_name, layout):
invalid = np.ones((4, 6), dtype=input_dtype)[:2, :3][:, ::-1]
assert not invalid.flags.c_contiguous
with pytest.raises(TypeError):
with pytest.raises(ValueError, match="C-contiguous"):
if input_name == "push_frame":
pedestal.push(invalid)
elif input_name == "threshold_frame":
@@ -192,9 +192,8 @@ def test_pedestal_rejects_inputs_with_wrong_ndim(dtype, input_name, shape):
threshold = np.full((2, 3), 10, dtype=dtype)
input_dtype = dtype if input_name == "threshold" else np.uint16
invalid = np.ones(shape, dtype=input_dtype)
name = "Threshold" if input_name == "threshold" else "Frame"
with pytest.raises(ValueError, match=f"{name} must be 2-dimensional"):
with pytest.raises(ValueError):
if input_name == "push_frame":
pedestal.push(invalid)
elif input_name == "threshold_frame":