Dev/decode my302 (#254)
Some checks failed
Build on RHEL8 / build (push) Failing after 0s
Build on RHEL9 / build (push) Failing after 0s

This PR adds support for decoding digital data from the my320 test chip.
- Added BitOffset (strong type)
- Expand 24 to 32 bit 
- Python bindings for decoding my302
- Improved docs
This commit is contained in:
Erik Fröjdh
2025-12-09 18:27:02 +01:00
committed by GitHub
parent e795310b16
commit 80a2b02345
27 changed files with 427 additions and 41 deletions

View File

@@ -22,21 +22,14 @@ AARE
.. toctree::
:caption: Python API
:maxdepth: 1
pyFile
pycalibration
pyCtbRawFile
pyClusterFile
pyClusterVector
pyCluster
pyInterpolation
pyJungfrauDataFile
pyRawFile
pyRawMasterFile
pyVarClusterFinder
:maxdepth: 3
:hidden:
pycalibration
python/cluster/index
python/file/index
pyFit
.. toctree::

View File

@@ -1,11 +0,0 @@
CtbRawFile
============
.. py:currentmodule:: aare
.. autoclass:: CtbRawFile
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

View File

@@ -0,0 +1,11 @@
Cluster & Interpolation
==========================
.. toctree::
:caption: Cluster & Interpolation
:maxdepth: 1
pyCluster
pyClusterVector
pyInterpolation
pyVarClusterFinder

View File

@@ -21,8 +21,8 @@ Supported are the following :math:`\eta`-functions:
.. py:currentmodule:: aare
.. image:: ../figures/Eta2x2.png
:target: ../figures/Eta2x2.png
.. image:: ../../../figures/Eta2x2.png
:target: ../../../figures/Eta2x2.png
:width: 650px
:align: center
:alt: Eta2x2
@@ -35,8 +35,8 @@ Supported are the following :math:`\eta`-functions:
.. autofunction:: calculate_eta2
.. image:: ../figures/Eta2x2Full.png
:target: ../figures/Eta2x2Full.png
.. image:: ../../../figures/Eta2x2Full.png
:target: ../../../figures/Eta2x2Full.png
:width: 650px
:align: center
:alt: Eta2x2 Full
@@ -49,8 +49,8 @@ Supported are the following :math:`\eta`-functions:
.. autofunction:: calculate_full_eta2
.. image:: ../figures/Eta3x3.png
:target: ../figures/Eta3x3.png
.. image:: ../../../figures/Eta3x3.png
:target: ../../../figures/Eta3x3.png
:width: 650px
:align: center
:alt: Eta3x3
@@ -63,8 +63,8 @@ Supported are the following :math:`\eta`-functions:
.. autofunction:: calculate_eta3
.. image:: ../figures/Eta3x3Cross.png
:target: ../figures/Eta3x3Cross.png
.. image:: ../../../figures/Eta3x3Cross.png
:target: ../../../figures/Eta3x3Cross.png
:width: 650px
:align: center
:alt: Cross Eta3x3

View File

@@ -0,0 +1,14 @@
File I/O
===================
.. toctree::
:caption: File I/O
:maxdepth: 1
pyClusterFile
pyCtbRawFile
pyFile
pyJungfrauDataFile
pyRawFile
pyRawMasterFile
pyTransform

View File

@@ -0,0 +1,25 @@
CtbRawFile
============
Read analog, digital and transceiver samples from a raw file containing
data from the Chip Test Board. Uses :mod:`aare.transform` to decode the
data into a format that the user can work with.
.. code:: python
import aare
from aare.transform import Mythen302Transform
my302 = Mythen302Transform(offset = 4)
with aare.CtbRawFile(fname, transform = my302) as f:
for header, data in f:
#do something with the data
.. py:currentmodule:: aare
.. autoclass:: CtbRawFile
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

View File

@@ -0,0 +1,27 @@
Transform
===================
The transform module takes data read by :class:`aare.CtbRawFile` and decodes it
to a useful image format. Depending on detector it supports both analog
and digital samples.
For convenience the following transform objects are defined with a short name
.. code:: python
moench05 = Moench05Transform()
moench05_1g = Moench05Transform1g()
moench05_old = Moench05TransformOld()
matterhorn02 = Matterhorn02Transform()
adc_sar_04_64to16 = AdcSar04Transform64to16()
adc_sar_05_64to16 = AdcSar05Transform64to16()
.. py:currentmodule:: aare
.. automodule:: aare.transform
:members:
:undoc-members:
:private-members:
:special-members: __call__
:show-inheritance:
:inherited-members: