mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-05-31 17:48:27 +02:00
Merge branch 'main' into dev/strixels/remap_simple
This commit is contained in:
+12
-9
@@ -1,21 +1,24 @@
|
||||
# Release notes
|
||||
|
||||
## head
|
||||
## 2026.3.17
|
||||
|
||||
### New Features:
|
||||
|
||||
- Expanding 24 to 32 bit data
|
||||
- Decoding digital data from Mythen 302
|
||||
- added ``transform_eta_values``. Function transforms :math:`\eta` to uniform spatial coordinates. Should only be used for easier debugging.
|
||||
- New to_string, string_to for aare
|
||||
- Decoding transceiver data from Matterhorn10 ``transformed_data = aare.transform.Matterhorn10Transform(num_counters=2, dynamic_range=16)(data)``
|
||||
- Expanding 24 to 32 bit data ``aare._aare.expand24to32bit(data, offset=4)``
|
||||
- Decoding digital data from Mythen 302 ``transformed_data = aare.transform.Mythen302Transform(offset=4)(data)``
|
||||
- added ``aare.Interpolator.transform_eta_values``. Function transforms $`\eta`$-values to uniform spatial coordinates. Should only be used for easier debugging.
|
||||
- New ``to_string``, ``string_to``
|
||||
- Added exptime and period members to RawMasterFile including decoding
|
||||
- Removed redundant arr.value(ix,iy...) on NDArray use arr(ix,iy...)
|
||||
- Removed Print/Print_some/Print_all form NDArray (operator << still works)
|
||||
- Removed redundant ``arr.value(ix,iy...)`` on NDArray use ``arr(ix,iy...)``
|
||||
- Removed Print/Print_some/Print_all form NDArray (operator ``<<`` still works)
|
||||
- Added const* version of .data()
|
||||
- reading multiple ROI's supported for aare.
|
||||
- Use ``read_roi/rois`` to read multiple ROIs for one frame, the index of a specific ROI to only read that ROI
|
||||
- Use ``read_n_with_roi`` to read multiple frames for a specific ROI.
|
||||
- Use ``aare.RawFile.read_roi(roi_index=0)`` to read a specific ROI for the current frame
|
||||
- Use ``aare.RawFile.read_rois()`` to read multiple ROIs for the current frame
|
||||
- Use ``aare.RawFile.read_n_with_roi(num_frames = 2, roi_index = 0)`` to read multiple frames for a specific ROI.
|
||||
- Note ``read_frame`` and ``read_n`` is not supported for multiple ROI's.
|
||||
- Building conda/pypi pkgs for python 3.14. Removing 3.11 builds.
|
||||
|
||||
### Bugfixes:
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
python:
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
- 3.14
|
||||
|
||||
c_compiler:
|
||||
- gcc # [linux]
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ license = { file = "LICENSE" }
|
||||
|
||||
[tool.cibuildwheel]
|
||||
|
||||
build = "cp{311,312,313}-manylinux_x86_64"
|
||||
build = "cp{312,313,314}-manylinux_x86_64"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Make the compiled classes that live in _aare available from aare.
|
||||
from . import _aare
|
||||
|
||||
from . import transform
|
||||
|
||||
from ._aare import File, RawMasterFile, RawSubFile, JungfrauDataFile
|
||||
from ._aare import Pedestal_d, Pedestal_f, ClusterFinder_Cluster3x3i, VarClusterFinder
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
import numpy as np
|
||||
from . import _aare
|
||||
from aare import ReadoutMode
|
||||
from aare._aare import ReadoutMode
|
||||
from aare._aare import Matterhorn10
|
||||
|
||||
class AdcSar04Transform64to16:
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import pytest
|
||||
import numpy as np
|
||||
from aare import CtbRawFile, transform
|
||||
|
||||
@pytest.mark.withdata
|
||||
def test_matterhorn10_16bit(test_data_path):
|
||||
"""Matterhorn10Transform 1 counter 16 bit dynamic range"""
|
||||
with CtbRawFile(test_data_path / "raw/Matterhorn10/16bit_master_0.json", transform = transform.Matterhorn10Transform(dynamic_range=16, num_counters=1)) as f:
|
||||
headers, frames = f.read_frame()
|
||||
|
||||
assert frames.shape == (256, 256)
|
||||
assert frames.dtype == np.uint16
|
||||
|
||||
expected_data = np.tile(np.arange(255, -1, -1,dtype=np.uint16), (256, 1)) # TODO: endianess issue ?
|
||||
|
||||
assert np.all(frames == expected_data)
|
||||
|
||||
|
||||
@pytest.mark.withdata
|
||||
def test_matterhorn10_8bit(test_data_path):
|
||||
"""Matterhorn10Transform 1 counter 8 bit dynamic range"""
|
||||
with CtbRawFile(test_data_path / "raw/Matterhorn10/8bit_master_1.json", transform = transform.Matterhorn10Transform(dynamic_range=8, num_counters=1)) as f:
|
||||
headers, frames = f.read_frame()
|
||||
|
||||
assert frames.shape == (256, 256)
|
||||
assert frames.dtype == np.uint8
|
||||
|
||||
expected_data = np.tile(np.arange(255, -1, -1,dtype=np.uint8), (256, 1)) # TODO: endianess issue ?
|
||||
|
||||
assert np.all(frames == expected_data)
|
||||
|
||||
|
||||
@pytest.mark.withdata
|
||||
def test_matterhorn10_4bit(test_data_path):
|
||||
""" Matterhorn10Transform 1 counter 4 bit dynamic range """
|
||||
with CtbRawFile(test_data_path / "raw/Matterhorn10/newnewrun_4bit_1counter_master_0.json", transform = transform.Matterhorn10Transform(dynamic_range=4, num_counters=1)) as f:
|
||||
headers, frames = f.read_frame()
|
||||
|
||||
assert frames.shape == (256, 256)
|
||||
assert frames.dtype == np.uint8
|
||||
|
||||
expected_data = np.tile(np.tile(np.arange(15, -1, -1, dtype=np.uint8), 16), (256, 1)) # TODO: endianess issue ?
|
||||
|
||||
assert np.all(frames == expected_data)
|
||||
|
||||
@pytest.mark.withdata
|
||||
def test_matterhorn10_16bit_4counters(test_data_path):
|
||||
"""Matterhorn10Transform 4 counters 16 bit dynamic range"""
|
||||
|
||||
with CtbRawFile(test_data_path / "raw/Matterhorn10/4counter_16bit_master_4.json", transform = transform.Matterhorn10Transform(dynamic_range=16, num_counters=4)) as f:
|
||||
headers, frames = f.read_frame()
|
||||
|
||||
assert frames.shape == (4*256, 256)
|
||||
assert frames.dtype == np.uint16
|
||||
|
||||
expected_data = np.tile(np.arange(255, -1, -1,dtype=np.uint16), (4*256, 1)) # TODO: endianess issue ?
|
||||
|
||||
assert np.all(frames == expected_data)
|
||||
Reference in New Issue
Block a user