Skip to content

Commit

Permalink
Improve Beersheba's docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Apr 25, 2024
1 parent 38f4832 commit 1b5941d
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions invisible_cities/cities/beersheba.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
"""
-----------------------------------------------------------------------
Beersheba
Beersheba
-----------------------------------------------------------------------
Beersheba, a city suspended from the heavens, inhabited only by idealists.
This city interpolates corrected hits and applies Lucy-Richardson deconvolution
to the interpolated signal.
The input is esmeralda output containing hits, kdst global information and mc info.
The city outputs :
- DECO deconvolved hits table
- MC info (if run number <=0)
Beersheba, a city suspended from the heavens, inhabited only by
idealists.
This city applies a Lucy-Rihcardson (LR) algorithm to reconstruct the
electron cloud density.
It reads hDSTs produced by Sophronia and produces deconvolved
hits. The LR deconvolution finds the (discretized) charge distribution
that generates the input image based on the PSF of the system. Each
bin in the charge distribution is interpreted as a (deconvolved)
hit.
The workflow of Beersheba can be summarized as:
- Apply geometrical and lifetime corrections
- Apply a low charge threshold to the input hits. If this leaves
behind a slice with no hits, a fake hit (NN-hit) is temporarily
created.
- Merge NN-hits: The NN-hits' energy is reassigned to the closest
non-NN-hits
- Apply a second charge threshold with a slightly different energy
redistribution
- Drops isolated sensors (*)
- Normalizes charge within each S2 peak
- For each slice
- Interpolates the hits to obtain a continuous image (real_image)
- Generate a flat charge distribution as a seed
- Do the following until a maximum number of iterations is reached
or the difference between consecutive images is smaller than a
threshold
- Convolve the charge distribution with the PSF (new_image)
- Update the charge distribution according to the difference
between new_image and real_image
- Clean up the image by applying a cut on the fraction of energy
of the resulting charge-distribution hits
"""

import numpy as np
Expand Down

0 comments on commit 1b5941d

Please sign in to comment.