-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b166bb7
Showing
102 changed files
with
19,360 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 27c76b3c1c517459923e4f0fb00a7617 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:mod:`hexsample.analysis` --- Analysis facilities | ||
================================================= | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.analysis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _api: | ||
|
||
API | ||
=== | ||
|
||
Top-level indices | ||
----------------- | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
||
|
||
List of modules | ||
--------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
analysis | ||
clustering | ||
digi | ||
display | ||
fileio | ||
fitting | ||
hexagon | ||
mc | ||
modeling | ||
pprint | ||
readout | ||
recon | ||
rng | ||
roi | ||
sensor | ||
source | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:mod:`hexsample.clustering` --- Clustering facilities | ||
===================================================== | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.clustering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:mod:`hexsample.digi` --- Digitization facilities | ||
================================================= | ||
|
||
This module contains... | ||
|
||
Digi event structure | ||
-------------------- | ||
|
||
.. literalinclude:: ../hexsample/digi.py | ||
:pyobject: DigiEventRectangular | ||
:end-before: __post_init__ | ||
|
||
|
||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.digi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:mod:`hexsample.display` --- Display facilities | ||
=============================================== | ||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
:mod:`hexsample.fileio` --- Input/Output | ||
======================================== | ||
|
||
This module contains all the I/O related facilities, that is, the basic definition | ||
of the file format and the proper classes to create and read back data files. | ||
|
||
.. warning:: | ||
We have made the provisional decision to have all the I/O implemented in the | ||
HDF5 format, which seems to be widely used and to support all the basic | ||
features that we need. That said, there seems to be two actively maintained | ||
Python interfaces to the HDF5 standard, implemented according to radically ] | ||
different design principle, namely: | ||
|
||
* `pytables <https://www.pytables.org/index.html>`_; | ||
* `h5py <https://www.h5py.org/>`_. | ||
|
||
It is not trivial for a non expert to really understand which one is more | ||
suited to our purposes, and we opted for ``pytables``, but this is a part of | ||
the package that might see drastic changes in the future. | ||
|
||
|
||
Base classes | ||
------------ | ||
|
||
The module provides base classes for input and output files, than are then | ||
specialized for, e.g., digitized or reconstructed data. | ||
|
||
:class:`OutputFileBase <hexsample.fileio.OutputFileBase>` is the base class for | ||
output files. Instantiating an object of this class causes the output file to | ||
be opened in write mode, and a ``header`` node to be created that can be | ||
used to store arbitrary user attributes---typically to keep track of the | ||
simulation or reconstruction settings. The file header can bu updated via the | ||
:meth:`update_header() <hexsample.fileio.OutputFileBase.update_header>` call, which | ||
loops over the keyword arguments and set the attributes one at a time. | ||
|
||
:class:`InputFileBase <hexsample.fileio.InputFileBase>` is the base class for | ||
input files. Instantiating an object of this class causes the input file to be | ||
opened in read mode and the header information to be rebuilt in the form of a | ||
dictionary. | ||
|
||
|
||
Digitized data | ||
-------------- | ||
|
||
The basic content of a digitized event contains all the event-by-event data that | ||
would ordinarily be written out by the DAQ, i.e., the trigger identifier, the | ||
timestamp, and all the quantities that are necessary in order to uniquely identify | ||
the region of interest: | ||
|
||
.. literalinclude:: ../hexsample/fileio.py | ||
:pyobject: DigiDescription | ||
|
||
In addition, the PHA content of the ROI (which is a variable-length array by its | ||
very nature), is encapsulated in a separate ``VLArray`` object in the same | ||
group holding the digi table. | ||
|
||
For simulated data, digitized files contain an additional table encapsulating the | ||
ground truth information for the event. | ||
|
||
.. literalinclude:: ../hexsample/fileio.py | ||
:pyobject: MonteCarloDescription | ||
|
||
|
||
Reconstructed data | ||
------------------ | ||
|
||
Reconstructed files contain all the reconstruction output, that is: all the quantities | ||
in the underlying digi file that are relevant for science analysis (i.e., timestamp | ||
and ROI size), and all the additional quantities that are calculated as part of | ||
the standard reconstruction (i.e., energy and position). | ||
|
||
.. literalinclude:: ../hexsample/fileio.py | ||
:pyobject: ReconDescription | ||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.fileio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:mod:`hexsample.fitting` --- Advanced fitting | ||
============================================= | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.fitting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
:mod:`hexsample.hexagon` --- Hexagonal sampling | ||
=============================================== | ||
|
||
|
||
The module is an attempt at having a fully-fledged version of all the necessary | ||
facilities related to the geometry on an hexagonal grid all in the same place, | ||
most of the information coming from https://www.redblobgames.com/grids/hexagons/. | ||
|
||
|
||
As a very quick, top level recap, hexagonal grids are classified according | ||
to their orientation as either pointy-top (with staggered rows, in a vertical layout) | ||
or flat-top (with staggered columns, in a horizontal layout). | ||
Each layout comes into versions, depending on whether even or odd rows/columns | ||
are shoved right/down. We end up with the four basic arrangements shown in the | ||
figure below, all of which are supported. | ||
|
||
.. figure:: figures/hexagonal_layouts.png | ||
|
||
The module provides a :class:`HexagonalGrid <hexsample.hexagon.HexagonalGrid>` class, | ||
representing an hexagonal grid, whose main public interfaces, | ||
:meth:`pixel_to_world(col, row) <hexsample.hexagon.HexagonalGrid.pixel_to_world>` | ||
and :meth:`world_to_pixel(x, y) <hexsample.hexagon.HexagonalGrid.world_to_pixel>`, | ||
allow to go back and forth from logical to physical coordinates and vice versa. | ||
It is worth pointing out that, in all four cases, the origin of the physical | ||
reference system is assumed to be at the center of the grid, as illustrated in the | ||
image. | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.hexagon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. hexsample documentation master file, created by | ||
sphinx-quickstart on Sun Sep 24 08:14:51 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
==================================== | ||
hexsample (X-ray hexagonal sampling) | ||
==================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
install | ||
api | ||
release | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.. _install: | ||
|
||
Installation | ||
============ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:mod:`hexsample.mc` --- Monte Carlo facilities | ||
============================================== | ||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.mc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:mod:`hexsample.modeling` --- Fitting models | ||
============================================ | ||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.modeling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:mod:`hexsample.pprint` --- Pretty printing | ||
=========================================== | ||
|
||
This module provides facilities for pretty printing, including support for | ||
colors and special effects in the terminal, and other functions that are useful | ||
for ASCII-art like rendering. Most notably, this is useful in | ||
:class:`DigiEvent <hexsample.digi.DigiEvent>`. | ||
|
||
.. seealso:: :mod:`hexsample.digi` | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.pprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:mod:`hexsample.readout` --- Readout facilities | ||
=============================================== | ||
|
||
This module contains... | ||
|
||
|
||
Digitization process | ||
-------------------- | ||
|
||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.readout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:mod:`hexsample.recon` --- Event reconstruction | ||
=============================================== | ||
|
||
|
||
Module documentation | ||
-------------------- | ||
|
||
.. automodule:: hexsample.recon |
Oops, something went wrong.