Skip to content

Commit a5f9013

Browse files
deploy: ba75793
0 parents  commit a5f9013

File tree

102 files changed

+19360
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+19360
-0
lines changed

.buildinfo

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 27c76b3c1c517459923e4f0fb00a7617
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

.doctrees/analysis.doctree

42.3 KB
Binary file not shown.

.doctrees/api.doctree

5.72 KB
Binary file not shown.

.doctrees/clustering.doctree

36.1 KB
Binary file not shown.

.doctrees/digi.doctree

83.2 KB
Binary file not shown.

.doctrees/display.doctree

66.2 KB
Binary file not shown.

.doctrees/environment.pickle

2.01 MB
Binary file not shown.

.doctrees/fileio.doctree

200 KB
Binary file not shown.

.doctrees/fitting.doctree

14.2 KB
Binary file not shown.

.doctrees/hexagon.doctree

113 KB
Binary file not shown.

.doctrees/index.doctree

4.95 KB
Binary file not shown.

.doctrees/install.doctree

2.83 KB
Binary file not shown.

.doctrees/mc.doctree

29.8 KB
Binary file not shown.

.doctrees/modeling.doctree

220 KB
Binary file not shown.

.doctrees/pprint.doctree

69.1 KB
Binary file not shown.

.doctrees/readout.doctree

142 KB
Binary file not shown.

.doctrees/recon.doctree

41.4 KB
Binary file not shown.

.doctrees/release.doctree

37.4 KB
Binary file not shown.

.doctrees/rng.doctree

23.4 KB
Binary file not shown.

.doctrees/roi.doctree

56.7 KB
Binary file not shown.

.doctrees/sensor.doctree

81.6 KB
Binary file not shown.

.doctrees/source.doctree

108 KB
Binary file not shown.

.nojekyll

Whitespace-only changes.

_images/hexagonal_layouts.png

74 KB
Loading

_sources/analysis.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:mod:`hexsample.analysis` --- Analysis facilities
2+
=================================================
3+
4+
5+
Module documentation
6+
--------------------
7+
8+
.. automodule:: hexsample.analysis

_sources/api.rst.txt

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _api:
2+
3+
API
4+
===
5+
6+
Top-level indices
7+
-----------------
8+
9+
* :ref:`genindex`
10+
* :ref:`modindex`
11+
* :ref:`search`
12+
13+
14+
List of modules
15+
---------------
16+
17+
.. toctree::
18+
:maxdepth: 2
19+
20+
analysis
21+
clustering
22+
digi
23+
display
24+
fileio
25+
fitting
26+
hexagon
27+
mc
28+
modeling
29+
pprint
30+
readout
31+
recon
32+
rng
33+
roi
34+
sensor
35+
source
36+
37+
38+
.. toctree::
39+
:maxdepth: 2
40+
:caption: Utils

_sources/clustering.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:mod:`hexsample.clustering` --- Clustering facilities
2+
=====================================================
3+
4+
5+
Module documentation
6+
--------------------
7+
8+
.. automodule:: hexsample.clustering

_sources/digi.rst.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:mod:`hexsample.digi` --- Digitization facilities
2+
=================================================
3+
4+
This module contains...
5+
6+
Digi event structure
7+
--------------------
8+
9+
.. literalinclude:: ../hexsample/digi.py
10+
:pyobject: DigiEventRectangular
11+
:end-before: __post_init__
12+
13+
14+
15+
16+
17+
Module documentation
18+
--------------------
19+
20+
.. automodule:: hexsample.digi

_sources/display.rst.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:mod:`hexsample.display` --- Display facilities
2+
===============================================
3+
4+
5+
6+
Module documentation
7+
--------------------
8+
9+
.. automodule:: hexsample.display

_sources/fileio.rst.txt

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
:mod:`hexsample.fileio` --- Input/Output
2+
========================================
3+
4+
This module contains all the I/O related facilities, that is, the basic definition
5+
of the file format and the proper classes to create and read back data files.
6+
7+
.. warning::
8+
We have made the provisional decision to have all the I/O implemented in the
9+
HDF5 format, which seems to be widely used and to support all the basic
10+
features that we need. That said, there seems to be two actively maintained
11+
Python interfaces to the HDF5 standard, implemented according to radically ]
12+
different design principle, namely:
13+
14+
* `pytables <https://www.pytables.org/index.html>`_;
15+
* `h5py <https://www.h5py.org/>`_.
16+
17+
It is not trivial for a non expert to really understand which one is more
18+
suited to our purposes, and we opted for ``pytables``, but this is a part of
19+
the package that might see drastic changes in the future.
20+
21+
22+
Base classes
23+
------------
24+
25+
The module provides base classes for input and output files, than are then
26+
specialized for, e.g., digitized or reconstructed data.
27+
28+
:class:`OutputFileBase <hexsample.fileio.OutputFileBase>` is the base class for
29+
output files. Instantiating an object of this class causes the output file to
30+
be opened in write mode, and a ``header`` node to be created that can be
31+
used to store arbitrary user attributes---typically to keep track of the
32+
simulation or reconstruction settings. The file header can bu updated via the
33+
:meth:`update_header() <hexsample.fileio.OutputFileBase.update_header>` call, which
34+
loops over the keyword arguments and set the attributes one at a time.
35+
36+
:class:`InputFileBase <hexsample.fileio.InputFileBase>` is the base class for
37+
input files. Instantiating an object of this class causes the input file to be
38+
opened in read mode and the header information to be rebuilt in the form of a
39+
dictionary.
40+
41+
42+
Digitized data
43+
--------------
44+
45+
The basic content of a digitized event contains all the event-by-event data that
46+
would ordinarily be written out by the DAQ, i.e., the trigger identifier, the
47+
timestamp, and all the quantities that are necessary in order to uniquely identify
48+
the region of interest:
49+
50+
.. literalinclude:: ../hexsample/fileio.py
51+
:pyobject: DigiDescription
52+
53+
In addition, the PHA content of the ROI (which is a variable-length array by its
54+
very nature), is encapsulated in a separate ``VLArray`` object in the same
55+
group holding the digi table.
56+
57+
For simulated data, digitized files contain an additional table encapsulating the
58+
ground truth information for the event.
59+
60+
.. literalinclude:: ../hexsample/fileio.py
61+
:pyobject: MonteCarloDescription
62+
63+
64+
Reconstructed data
65+
------------------
66+
67+
Reconstructed files contain all the reconstruction output, that is: all the quantities
68+
in the underlying digi file that are relevant for science analysis (i.e., timestamp
69+
and ROI size), and all the additional quantities that are calculated as part of
70+
the standard reconstruction (i.e., energy and position).
71+
72+
.. literalinclude:: ../hexsample/fileio.py
73+
:pyobject: ReconDescription
74+
75+
76+
77+
Module documentation
78+
--------------------
79+
80+
.. automodule:: hexsample.fileio

_sources/fitting.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:mod:`hexsample.fitting` --- Advanced fitting
2+
=============================================
3+
4+
5+
Module documentation
6+
--------------------
7+
8+
.. automodule:: hexsample.fitting

_sources/hexagon.rst.txt

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
:mod:`hexsample.hexagon` --- Hexagonal sampling
2+
===============================================
3+
4+
5+
The module is an attempt at having a fully-fledged version of all the necessary
6+
facilities related to the geometry on an hexagonal grid all in the same place,
7+
most of the information coming from https://www.redblobgames.com/grids/hexagons/.
8+
9+
10+
As a very quick, top level recap, hexagonal grids are classified according
11+
to their orientation as either pointy-top (with staggered rows, in a vertical layout)
12+
or flat-top (with staggered columns, in a horizontal layout).
13+
Each layout comes into versions, depending on whether even or odd rows/columns
14+
are shoved right/down. We end up with the four basic arrangements shown in the
15+
figure below, all of which are supported.
16+
17+
.. figure:: figures/hexagonal_layouts.png
18+
19+
The module provides a :class:`HexagonalGrid <hexsample.hexagon.HexagonalGrid>` class,
20+
representing an hexagonal grid, whose main public interfaces,
21+
:meth:`pixel_to_world(col, row) <hexsample.hexagon.HexagonalGrid.pixel_to_world>`
22+
and :meth:`world_to_pixel(x, y) <hexsample.hexagon.HexagonalGrid.world_to_pixel>`,
23+
allow to go back and forth from logical to physical coordinates and vice versa.
24+
It is worth pointing out that, in all four cases, the origin of the physical
25+
reference system is assumed to be at the center of the grid, as illustrated in the
26+
image.
27+
28+
29+
Module documentation
30+
--------------------
31+
32+
.. automodule:: hexsample.hexagon

_sources/index.rst.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. hexsample documentation master file, created by
2+
sphinx-quickstart on Sun Sep 24 08:14:51 2023.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
7+
====================================
8+
hexsample (X-ray hexagonal sampling)
9+
====================================
10+
11+
.. toctree::
12+
:maxdepth: 2
13+
:caption: Contents:
14+
15+
install
16+
api
17+
release
18+
19+
20+
21+
Indices and tables
22+
==================
23+
24+
* :ref:`genindex`
25+
* :ref:`modindex`
26+
* :ref:`search`

_sources/install.rst.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _install:
2+
3+
Installation
4+
============

_sources/mc.rst.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:mod:`hexsample.mc` --- Monte Carlo facilities
2+
==============================================
3+
4+
5+
6+
Module documentation
7+
--------------------
8+
9+
.. automodule:: hexsample.mc

_sources/modeling.rst.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:mod:`hexsample.modeling` --- Fitting models
2+
============================================
3+
4+
5+
6+
Module documentation
7+
--------------------
8+
9+
.. automodule:: hexsample.modeling

_sources/pprint.rst.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:mod:`hexsample.pprint` --- Pretty printing
2+
===========================================
3+
4+
This module provides facilities for pretty printing, including support for
5+
colors and special effects in the terminal, and other functions that are useful
6+
for ASCII-art like rendering. Most notably, this is useful in
7+
:class:`DigiEvent <hexsample.digi.DigiEvent>`.
8+
9+
.. seealso:: :mod:`hexsample.digi`
10+
11+
12+
Module documentation
13+
--------------------
14+
15+
.. automodule:: hexsample.pprint

_sources/readout.rst.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:mod:`hexsample.readout` --- Readout facilities
2+
===============================================
3+
4+
This module contains...
5+
6+
7+
Digitization process
8+
--------------------
9+
10+
11+
12+
Module documentation
13+
--------------------
14+
15+
.. automodule:: hexsample.readout

_sources/recon.rst.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:mod:`hexsample.recon` --- Event reconstruction
2+
===============================================
3+
4+
5+
Module documentation
6+
--------------------
7+
8+
.. automodule:: hexsample.recon

0 commit comments

Comments
 (0)