mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-11 06:47:14 +02:00
Adding support for Jungfrau .dat files (#152)
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m48s
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m48s
closes #150 **Not addressed in this PR:** - pixels_per_frame, bytes_per_frame and tell should be made cost in FileInterface
This commit is contained in:
25
docs/src/JungfrauDataFile.rst
Normal file
25
docs/src/JungfrauDataFile.rst
Normal file
@ -0,0 +1,25 @@
|
||||
JungfrauDataFile
|
||||
==================
|
||||
|
||||
JungfrauDataFile is a class to read the .dat files that are produced by Aldo's receiver.
|
||||
It is mostly used for calibration.
|
||||
|
||||
The structure of the file is:
|
||||
|
||||
* JungfrauDataHeader
|
||||
* Binary data (256x256, 256x1024 or 512x1024)
|
||||
* JungfrauDataHeader
|
||||
* ...
|
||||
|
||||
There is no metadata indicating number of frames or the size of the image, but this
|
||||
will be infered by this reader.
|
||||
|
||||
.. doxygenstruct:: aare::JungfrauDataHeader
|
||||
:members:
|
||||
:undoc-members:
|
||||
:private-members:
|
||||
|
||||
.. doxygenclass:: aare::JungfrauDataFile
|
||||
:members:
|
||||
:undoc-members:
|
||||
:private-members:
|
47
docs/src/Tests.rst
Normal file
47
docs/src/Tests.rst
Normal file
@ -0,0 +1,47 @@
|
||||
****************
|
||||
Tests
|
||||
****************
|
||||
|
||||
We test the code both from the C++ and Python API. By default only tests that does not require image data is run.
|
||||
|
||||
C++
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DAARE_TESTS=ON
|
||||
make -j 4
|
||||
|
||||
export AARE_TEST_DATA=/path/to/test/data
|
||||
./run_test [.files] #or using ctest, [.files] is the option to include tests needing data
|
||||
|
||||
|
||||
|
||||
Python
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#From the root dir of the library
|
||||
python -m pytest python/tests --files # passing --files will run the tests needing data
|
||||
|
||||
|
||||
|
||||
Getting the test data
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attention ::
|
||||
|
||||
The tests needing the test data are not run by default. To make the data available, you need to set the environment variable
|
||||
AARE_TEST_DATA to the path of the test data directory. Then pass either [.files] for the C++ tests or --files for Python
|
||||
|
||||
The image files needed for the test are large and are not included in the repository. They are stored
|
||||
using GIT LFS in a separate repository. To get the test data, you need to clone the repository.
|
||||
To do this, you need to have GIT LFS installed. You can find instructions on how to install it here: https://git-lfs.github.com/
|
||||
Once you have GIT LFS installed, you can clone the repository like any normal repo using:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://gitea.psi.ch/detectors/aare-test-data.git
|
5
docs/src/algorithm.rst
Normal file
5
docs/src/algorithm.rst
Normal file
@ -0,0 +1,5 @@
|
||||
algorithm
|
||||
=============
|
||||
|
||||
.. doxygenfile:: algorithm.hpp
|
||||
|
@ -20,9 +20,6 @@ AARE
|
||||
Requirements
|
||||
Consume
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:caption: Python API
|
||||
:maxdepth: 1
|
||||
@ -31,6 +28,7 @@ AARE
|
||||
pyCtbRawFile
|
||||
pyClusterFile
|
||||
pyClusterVector
|
||||
pyJungfrauDataFile
|
||||
pyRawFile
|
||||
pyRawMasterFile
|
||||
pyVarClusterFinder
|
||||
@ -42,6 +40,7 @@ AARE
|
||||
:caption: C++ API
|
||||
:maxdepth: 1
|
||||
|
||||
algorithm
|
||||
NDArray
|
||||
NDView
|
||||
Frame
|
||||
@ -51,6 +50,7 @@ AARE
|
||||
ClusterFinderMT
|
||||
ClusterFile
|
||||
ClusterVector
|
||||
JungfrauDataFile
|
||||
Pedestal
|
||||
RawFile
|
||||
RawSubFile
|
||||
@ -59,4 +59,8 @@ AARE
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:caption: Developer
|
||||
:maxdepth: 3
|
||||
|
||||
Tests
|
10
docs/src/pyJungfrauDataFile.rst
Normal file
10
docs/src/pyJungfrauDataFile.rst
Normal file
@ -0,0 +1,10 @@
|
||||
JungfrauDataFile
|
||||
===================
|
||||
|
||||
.. py:currentmodule:: aare
|
||||
|
||||
.. autoclass:: JungfrauDataFile
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
Reference in New Issue
Block a user