From a3d9f68a69aa8f20a205d98957a6d58e310a8c69 Mon Sep 17 00:00:00 2001
From: "Antonello, Dr. Massimiliano" <massimiliano.antonello@uni-hamburg.de>
Date: Mon, 21 Oct 2024 18:34:13 +0200
Subject: [PATCH] Added readme.md

---
 README.md | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..78384e7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+# PeakOTron
+
+A tool to perform automated fits of Silicon Photo-Multiplier charge spectra to extract useful parameters from experiments. PeakOTron can be used for detailed analyses of single spectra, and also for the automatic characterisation of large samples of SiPMs.
+
+The starting values of the fit parameters are extracted from the charge spectra. The entire data, including the intervals in-between the photoelectron peaks, are fitted to determine parameters such as the mean number of detected photons, gain, gain spread, prompt cross-talk, pedestal, electronics noise, dark-count rate as well as probability and time constant of after-pulses. 
+
+## Getting Started
+
+1. Install Python 3.12
+2. From the main PeakOTron folder, run:
+   ```
+   pip install -r requirements.txt
+   ```
+3. To run the example, use:
+   ```
+   python user/example.py
+   ```
+
+You can customize the run using the following command-line arguments:
+
+```
+-V_bd_hmt FLOAT         V_bd_hmt value (default: 26.1)
+-V_0_hmt FLOAT          V_0_hmt value (default: 1.4)
+-tau FLOAT              SLOW COMPONENT OF SIPM PULSE (default: 146.0)
+-t_0 FLOAT              PRE-INTEGRATION TIME (default: 100.0)
+-t_gate FLOAT           GATE LENGTH (default: 100.0)
+-bin_0 FLOAT            SELECT FIRST BIN OF SPECTRUM (default: -100.0)
+-truncate_nsigma0_up FLOAT  SCAN SPECTRUM FROM Q < Q_0 - 4 sigma_0 (default: 2.0)
+-truncate_nsigma0_do FLOAT  EVALUATE SPECTRUM CHI2 IN Q_0 - x*sigma_0 < Q < Q_0 + 2*sigma_0 (default: 2.0)
+-prefit_only            FIT THE WHOLE SPECTRUM (flag, default: False)
+-folder STR             Directory containing the data files (default: 'data/ketek')
+```
+
+Example usage with custom parameters:
+```
+python user/example.py -tau 150 -t_gate 110 -folder data/custom_folder
+```
+
+## References
+
+Jack Rolph, Erika Garutti, Robert Klanner, Tobias Quadfasel, Jörn Schwandt: _PeakOTron: A Python module for fitting charge spectra of Silicon Photomultipliers_.  [doi.org/10.1016/j.nima.2023.168544](https://doi.org/10.1016/j.nima.2023.168544)
\ No newline at end of file
-- 
GitLab