Skip to content

Commit

Permalink
PRJ: rename project to pymosa_mimosa26_interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
laborleben committed Apr 27, 2020
1 parent 4ce892d commit 4deb29f
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ deploy:
secure: EOfeXP4oyoNLY8Ot2/pX3k2Acvk5Xn0VkBeqXHND/rjm4iveUGrLbMDOffDnvkFgSYQ6PO/UqZjSb8vPd5nQ1Uhw8YyEhXUTPVWOz7ebq/xOmI8DIpFQH24/u7K3D9ygm7mlN3ozz9/6Gvk2VXk8OUT8csMtIJ586FnNBFdq0XVXzneHx6Ppr4GvAvh5Li5dd0ZqL1Cd2JZZyhWbQzidJgBkU1NOD7pRmEPh7dfG23rOEuzHQPyip8PKw86ErbjRD6WevjyFsetT66je3G8+ZSvJIDNVQ95oohhBZ7bRA+VwHnt2MdWxBYSAq7ZxbNmcs5LsvuNiJRyGo9Iue97yKI/EX0GzK/mA0pO/kdu0n1BzXxVePtxBOxLgzmEKs2S0IV45zdlAIfOjs7gLM8mHjiFC6oFuDddKPp5dYRMpOERt3jfQVBbSWpGkN4tcwXZ/1xMm1IxTaU06YQMLKtRqo2N5k9aWMSsvFfagQ44WW658ra/15TdaZyniBCiYQ0a3NDYEpjZX4n4Sh0JDcGqlyOJcpcq+gl2NaIADX+X6Qoe6C7s036LowfoTDh83X72hjvm8smrdGL1op7DQo3dGxwU6FRvf78Qw528v2CkrdTHzIOr5IEuZkh+xGiGJE2UDTwHdq/nAr+O79s2yAakvf/DL/s8ZU+MvZ21dobtnLAg=
on:
tags: true
repo: SiLab-Bonn/pyBAR_mimosa26_interpreter
repo: SiLab-Bonn/pymosa_mimosa26_interpreter
skip_existing: true
distributions: sdist bdist_wheel
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Mimosa26 Interpreter [![Build Status](https://travis-ci.org/SiLab-Bonn/pyBAR_mimosa26_interpreter.svg?branch=master)](https://travis-ci.org/SiLab-Bonn/pyBAR_mimosa26_interpreter) [![Build status](https://ci.appveyor.com/api/projects/status/6ur82s62x9hs7mj4?svg=true)](https://ci.appveyor.com/project/laborleben/pybar-mimosa26-interpreter)
# Mimosa26 Interpreter [![Build Status](https://travis-ci.org/SiLab-Bonn/pymosa_mimosa26_interpreter.svg?branch=master)](https://travis-ci.org/SiLab-Bonn/pymosa_mimosa26_interpreter) [![Build status](https://ci.appveyor.com/api/projects/status/6ur82s62x9hs7mj4?svg=true)](https://ci.appveyor.com/project/laborleben/pymosa-mimosa26-interpreter)


pyBAR_mimosa26_interpreter - A Mimosa26 raw data interpreter in Python.
pymosa_mimosa26_interpreter - A Mimosa26 raw data interpreter in Python.

Interpreter for [Mimosa26](http://www.iphc.cnrs.fr/List-of-MIMOSA-chips.html) raw data recorded with [pymosa](https://github.com/SiLab-Bonn/pymosa) DAQ.

Expand All @@ -26,8 +26,8 @@ pip install .
## Usage

An example script which does the raw data interpretation as well as the creation of a hit table
is located in the [`examples`](https://github.com/SiLab-Bonn/pyBAR_mimosa26_interpreter/blob/master/examples/) folder. The ouput file can be used with [Beam Telescope Analysis (BTA)](https://github.com/SiLab-Bonn/beam_telescope_analysis).
is located in the [`examples`](https://github.com/SiLab-Bonn/pymosa_mimosa26_interpreter/blob/master/examples/) folder. The ouput file can be used with [Beam Telescope Analysis (BTA)](https://github.com/SiLab-Bonn/beam_telescope_analysis).

## Support

Please use GitHub's [issue tracker](https://github.com/SiLab-Bonn/pyBAR_mimosa26_interpreter/issues) for bug reports/feature requests/questions.
Please use GitHub's [issue tracker](https://github.com/SiLab-Bonn/pymosa_mimosa26_interpreter/issues) for bug reports/feature requests/questions.
24 changes: 12 additions & 12 deletions docs/m26_interpreter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation
Install the required packages:

.. code-block:: bash
conda install numba numpy tables matplotlib tqdm
Then install the Mimosa26 interpreter:
Expand All @@ -14,7 +14,7 @@ Then install the Mimosa26 interpreter:
python setup.py develop
.. toctree::
:numbered:
Expand All @@ -27,16 +27,16 @@ Due to the fact that `pymosa <https://github.com/SiLab-Bonn/pymosa>`_ features c
Within this package the event building is done by assigning trigger words (from TLU) to data of one Mimosa26 frame, see the event building section.

Notes:
- Due to the fact that trigger words have to be assigned to Mimosa26 frame data it is mandatory to choose the combined
(15 bit trigger timestamp and 16 bit trigger number) trigger data format (trigger data format : 2).
- Due to the fact that trigger words have to be assigned to Mimosa26 frame data it is mandatory to choose the combined
(15 bit trigger timestamp and 16 bit trigger number) trigger data format (trigger data format : 2).
This is default data format used in `pymosa <https://github.com/SiLab-Bonn/pymosa>`_.


Raw data interpretation
========================

The result of the raw data analysis is stored into a hit table containing events of all Mimosa26 planes. The event building is done using the TLU words (see Event building section)
Additionally, for each plane an occupancy map is stored and an event status histogram is created.
Additionally, for each plane an occupancy map is stored and an event status histogram is created.

The raw data structure of Mimosa26 data looks as follows:
- Frame header HIGH and LOW (contains timestamp, generated from R/O, indicates the start of a Mimosa26 frame)
Expand All @@ -46,7 +46,7 @@ The raw data structure of Mimosa26 data looks as follows:
- ...
- ...
- Frame tailer HIGH and LOW (indicates the end of a Mimosa26 frame)


Every Mimosa26 raw data word (32 bit) is composed as follows

Expand All @@ -59,8 +59,8 @@ The trigger word (32 bit) is composed as follows
+--------------------+--------------------+
| HEADER (1 bit) = 1 | DATA WORD (31 bit) |
+--------------------+--------------------+


Note:
- HEADER = 0x20 (from R/0)
- IDENTYFIER = 1 - 6 (plane identyfier, from R/0)
Expand Down Expand Up @@ -88,7 +88,7 @@ In analogy to this the stop timestamp of the integration time is calculated by

.. math::
T_\text{stop} = T_\text{start} + f_0 + T_\text{offset}.
Using the readout window for each row (frame) data for every readout window one (or multiple) trigger timestamp(s) can be assigned to it, if the trigger timestamp lies within this specific row window.
In this way to each Mimosa26 frame data a trigger timestamp is assigned defining one event.

Expand Down Expand Up @@ -130,8 +130,8 @@ The following table shows the possible event stati (8 bit):
Methods
-------

.. autofunction:: pyBAR_mimosa26_interpreter.raw_data_interpreter._interpret_raw_data
.. autofunction:: pyBAR_mimosa26_interpreter.raw_data_interpreter._build_events
.. autofunction:: pymosa_mimosa26_interpreter.raw_data_interpreter._interpret_raw_data
.. autofunction:: pymosa_mimosa26_interpreter.raw_data_interpreter._build_events

Usage
======
Expand All @@ -149,6 +149,6 @@ A full example which interpretes the raw data and converts the hit tables into a
Methods
-------

.. autoclass:: pyBAR_mimosa26_interpreter.data_interpreter.DataInterpreter
.. autoclass:: pymosa_mimosa26_interpreter.data_interpreter.DataInterpreter


12 changes: 6 additions & 6 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from contextlib2 import ExitStack

from pyBAR_mimosa26_interpreter import data_interpreter
from pyBAR_mimosa26_interpreter import raw_data_interpreter
from pymosa_mimosa26_interpreter import data_interpreter
from pymosa_mimosa26_interpreter import raw_data_interpreter

from beam_telescope_analysis.hit_analysis import default_hits_dtype

Expand All @@ -37,9 +37,9 @@ def process_dut(raw_data_file, output_filename=None, output_filenames=None, anal
Trigger/TLU FSM data mode.
analyze_m26_header_ids : list
List of Mimosa26 header IDs that will be interpreted.
If None, the value defaults to the global value pyBAR_mimosa26_interpreter.raw_data_interpreter.DEFAULT_PYMOSA_M26_HEADER_IDS.
If None, the value defaults to the global value pymosa_mimosa26_interpreter.raw_data_interpreter.DEFAULT_PYMOSA_M26_HEADER_IDS.
timing_offset : int
Timing offset for the pyBAR_mimosa26_interpreter. The value has impact on the start of frame to trigger word alignment.
Timing offset for the pymosa_mimosa26_interpreter. The value has impact on the start of frame to trigger word alignment.
Returns
-------
Expand Down Expand Up @@ -69,7 +69,7 @@ def format_hit_table(input_filename, output_filenames=None, analyze_m26_header_i
If None, the filenames will be generated.
analyze_m26_header_ids : list
List of Mimosa26 header IDs that will be interpreted.
If None, the value defaults to the global value pyBAR_mimosa26_interpreter.raw_data_interpreter.DEFAULT_PYMOSA_M26_HEADER_IDS.
If None, the value defaults to the global value pymosa_mimosa26_interpreter.raw_data_interpreter.DEFAULT_PYMOSA_M26_HEADER_IDS.
chunk_size : uint
Chunk size of the data when reading from file.
Expand Down Expand Up @@ -133,5 +133,5 @@ def format_hit_table(input_filename, output_filenames=None, analyze_m26_header_i
if __name__ == "__main__":
# Single file processing
# Input raw data filename
raw_data_file = '../pyBAR_mimosa26_interpreter/testing/anemone_raw_data.h5'
raw_data_file = '../pymosa_mimosa26_interpreter/testing/anemone_raw_data.h5'
process_dut(raw_data_file=raw_data_file, output_filename="./anemone_interpreted.h5", trigger_data_format=2)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# http://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package
from pkg_resources import get_distribution
__version__ = get_distribution('pyBAR_mimosa26_interpreter').version
__version__ = get_distribution('pymosa_mimosa26_interpreter').version
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
except ImportError:
pass

from pyBAR_mimosa26_interpreter import raw_data_interpreter
from pymosa_mimosa26_interpreter import raw_data_interpreter
try:
from pyBAR_mimosa26_interpreter import plotting
from pymosa_mimosa26_interpreter import plotting
except ImportError:
pass

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import tables as tb
import numpy as np

from pyBAR_mimosa26_interpreter import data_interpreter
from pyBAR_mimosa26_interpreter import raw_data_interpreter
# from pyBAR_mimosa26_interpreter.testing.tools.test_tools import compare_h5_files
from pymosa_mimosa26_interpreter import data_interpreter
from pymosa_mimosa26_interpreter import raw_data_interpreter
# from pymosa_mimosa26_interpreter.testing.tools.test_tools import compare_h5_files

testing_path = os.path.dirname(__file__) # Get file path
tests_data_folder = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(testing_path)) + r'/testing/')) # Set test data path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import unittest

from pyBAR_mimosa26_interpreter import data_interpreter
from pyBAR_mimosa26_interpreter.testing.tools.test_tools import compare_h5_files
from pymosa_mimosa26_interpreter import data_interpreter
from pymosa_mimosa26_interpreter.testing.tools.test_tools import compare_h5_files


class TestRawChunkSize(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
install_requires = f.read().splitlines()

setup(
name='pyBAR_mimosa26_interpreter',
name='pymosa_mimosa26_interpreter',
version=version,
description='Interpreter for Mimosa26 raw data recorded with pymosa DAQ',
url='https://github.com/SiLab-Bonn/pyBAR_mimosa26_interpreter',
url='https://github.com/SiLab-Bonn/pymosa_mimosa26_interpreter',
license='BSD 3-Clause License',
long_description='',
author=author,
Expand Down

0 comments on commit 4deb29f

Please sign in to comment.