Skip to content

Commit

Permalink
deploy: b8bb830
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaratomaiuolo committed Jun 11, 2024
0 parents commit b166bb7
Show file tree
Hide file tree
Showing 102 changed files with 19,360 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
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 added .doctrees/analysis.doctree
Binary file not shown.
Binary file added .doctrees/api.doctree
Binary file not shown.
Binary file added .doctrees/clustering.doctree
Binary file not shown.
Binary file added .doctrees/digi.doctree
Binary file not shown.
Binary file added .doctrees/display.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/fileio.doctree
Binary file not shown.
Binary file added .doctrees/fitting.doctree
Binary file not shown.
Binary file added .doctrees/hexagon.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/install.doctree
Binary file not shown.
Binary file added .doctrees/mc.doctree
Binary file not shown.
Binary file added .doctrees/modeling.doctree
Binary file not shown.
Binary file added .doctrees/pprint.doctree
Binary file not shown.
Binary file added .doctrees/readout.doctree
Binary file not shown.
Binary file added .doctrees/recon.doctree
Binary file not shown.
Binary file added .doctrees/release.doctree
Binary file not shown.
Binary file added .doctrees/rng.doctree
Binary file not shown.
Binary file added .doctrees/roi.doctree
Binary file not shown.
Binary file added .doctrees/sensor.doctree
Binary file not shown.
Binary file added .doctrees/source.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/hexagonal_layouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions _sources/analysis.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:mod:`hexsample.analysis` --- Analysis facilities
=================================================


Module documentation
--------------------

.. automodule:: hexsample.analysis
40 changes: 40 additions & 0 deletions _sources/api.rst.txt
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
8 changes: 8 additions & 0 deletions _sources/clustering.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:mod:`hexsample.clustering` --- Clustering facilities
=====================================================


Module documentation
--------------------

.. automodule:: hexsample.clustering
20 changes: 20 additions & 0 deletions _sources/digi.rst.txt
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
9 changes: 9 additions & 0 deletions _sources/display.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:mod:`hexsample.display` --- Display facilities
===============================================



Module documentation
--------------------

.. automodule:: hexsample.display
80 changes: 80 additions & 0 deletions _sources/fileio.rst.txt
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
8 changes: 8 additions & 0 deletions _sources/fitting.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:mod:`hexsample.fitting` --- Advanced fitting
=============================================


Module documentation
--------------------

.. automodule:: hexsample.fitting
32 changes: 32 additions & 0 deletions _sources/hexagon.rst.txt
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
26 changes: 26 additions & 0 deletions _sources/index.rst.txt
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`
4 changes: 4 additions & 0 deletions _sources/install.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _install:

Installation
============
9 changes: 9 additions & 0 deletions _sources/mc.rst.txt
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
9 changes: 9 additions & 0 deletions _sources/modeling.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:mod:`hexsample.modeling` --- Fitting models
============================================



Module documentation
--------------------

.. automodule:: hexsample.modeling
15 changes: 15 additions & 0 deletions _sources/pprint.rst.txt
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
15 changes: 15 additions & 0 deletions _sources/readout.rst.txt
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
8 changes: 8 additions & 0 deletions _sources/recon.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:mod:`hexsample.recon` --- Event reconstruction
===============================================


Module documentation
--------------------

.. automodule:: hexsample.recon
Loading

0 comments on commit b166bb7

Please sign in to comment.