Skip to content
Snippets Groups Projects
Commit f23025fa authored by Steffen Hauf's avatar Steffen Hauf
Browse files

More docs

parent 29437f9e
No related branches found
No related tags found
1 merge request!5Clean
......@@ -8,7 +8,7 @@ Offline Calibration tool chain.
LPD
---
----
Dark Images Evaluation
~~~~~~~~~~~~~~~~~~~~~~
......@@ -19,67 +19,7 @@ dark images for one capacitor setting.
.. code::
% python calibrate_nbc.py LPD dark --help
usage: calibrate_nbc.py [-h] [--cluster-profile str] --in-folder str
--out-folder str [--sequences int [int ...]]
--capacitor-setting int --run-high int --run-med int
--run-low int [--mem-cells int] [--local-output]
[--db-output] [--bias-voltage int]
[--cal-db-interface str]
[--thresholds-offset-sigma float]
[--thresholds-offset-hard int [int ...]]
[--thresholds-noise-sigma float]
[--thresholds-noise-hard int [int ...]]
[--skip-first-ntrains int] [--use-dir-creation-date]
[--instrument str] [--ntrains int]
[--high-res-badpix-3d]
DETECTOR TYPE
Main entry point for offline calibration
positional arguments:
DETECTOR The detector to calibrate
TYPE Type of calibration: AGIPD,LPD
optional arguments:
-h, --help show this help message and exit
--cluster-profile str
The ipcluster profile to use. Default: noDB
--in-folder str path to input data, required. Default: None
--out-folder str path to output to, required. Default: None
--sequences int [int ...]
sequence files to evaluate.. Default: [0]
--capacitor-setting int
capacitor_setting for which data was taken, required.
Default: None
--run-high int run number in which high gain data was recorded,
required. Default: None
--run-med int run number in which medium gain data was recorded,
required. Default: None
--run-low int run number in which low gain data was recorded,
required. Default: None
--mem-cells int number of memory cells used. Default: 128
--local-output output constants locally. Default: True
--db-output output constants to database. Default: True
--bias-voltage int detector bias voltage. Default: 500
--cal-db-interface str
the database interface to use. Default: tcp://max-
exfl015:5005
--thresholds-offset-sigma float
Default: 3.0
--thresholds-offset-hard int [int ...]
Default: [400, 1500]
--thresholds-noise-sigma float
Default: 7.0
--thresholds-noise-hard int [int ...]
Default: [1, 35]
--skip-first-ntrains int
Default: 10
--use-dir-creation-date
use the creation date of the directory for database
time derivation. Default: True
--instrument str Default: FXE
--ntrains int Default: 300
--high-res-badpix-3d Default: False
Pulse Capacitor Evaluation
......@@ -92,49 +32,7 @@ It requires offset maps as input.
.. code::
% python calibrate_nbc.py LPD PC --help
usage: calibrate_nbc.py [-h] [--cluster-profile str] --in-folder str
--out-folder str [--offset-store str]
[--modules int [int ...]] --capacitor-setting int
[--mem-cells int] [--local-output] [--db-output]
[--db-input] [--bias-voltage int]
[--cal-db-interface str] [--use-dir-creation-date]
[--instrument str] [--high-res-badpix-3d]
DETECTOR TYPE
Main entry point for offline calibration
positional arguments:
DETECTOR The detector to calibrate
TYPE Type of calibration: AGIPD,LPD
optional arguments:
-h, --help show this help message and exit
--cluster-profile str
The ipcluster profile to use. Default: noDB555
--in-folder str path to input data, required. Default: None
--out-folder str path to output to, required. Default: None
--offset-store str path to offset store, overwrite use_db_input. Default:
/gpfs/exfel/exp/FXE/201830/p900020/proc/calibration/da
rk/lpd_offset_store_r0206_r0207_r0208_5pf.h5
--modules int [int ...]
Default: None
--capacitor-setting int
capacitor_setting for which data was taken, required.
Default: None
--mem-cells int number of memory cells used. Default: 128
--local-output output constants locally. Default: True
--db-output output constants to database. Default: False
--db-input Default: True
--bias-voltage int detector bias voltage. Default: 500
--cal-db-interface str
the database interface to use. Default: tcp://max-
exfl015:5005
--use-dir-creation-date
use the creation date of the directory for database
time derivation. Default: True
--instrument str Default: FXE
--high-res-badpix-3d Default: False
Correction
~~~~~~~~~~
......@@ -144,61 +42,62 @@ Corrects an LPD run with calibration constants from the database and/or files.
.. code::
% python calibrate_nbc.py LPD correct --help
usage: calibrate_nbc.py [-h] --in-folder str --run int --out-folder str
[--relgain-store str] --offset-store str
[--ff-store str] [--sequences str [str ...]]
[--mem-cells int] [--overwrite] [--no-relative-gain]
[--no-flat-fields] [--cluster-profile str]
[--max-pulses int] [--use-dir-creation-date]
[--max-cells-db int] [--rawversion int]
[--instrument str] [--local-input] [--db-input]
[--bias-voltage int] [--cal-db-interface str]
[--geometry-file str]
[--beam-center-offset float [float ...]]
DETECTOR TYPE
Main entry point for offline calibration
positional arguments:
DETECTOR The detector to calibrate
TYPE Type of calibration: LPD,AGIPD
optional arguments:
-h, --help show this help message and exit
--in-folder str the folder to read data from, required. Default: None
--run int runs to process, required. Default: None
--out-folder str the folder to output to, required. Default: None
--relgain-store str path to base constant store. Default: /gpfs/exfel/exp/
FXE/201830/p900020/proc/calibration/CI5pf_pp/lpd_ci_st
ore_CHANID_16_5pf.h5
--offset-store str path to offset constant store, required. Default: None
--ff-store str path to flat fields. Default: /gpfs/exfel/exp/FXE/2018
30/p900020/proc/calibration/flat_field_ci_pp/lpd_flatf
ield_store_r0230.h5
--sequences str [str ...]
sequences to correct, set to -1 for all, range
allowed. Default: [-1]
--mem-cells int memory cells in data. Default: 512
--overwrite set to True if existing data should be overwritten.
Default: False
--no-relative-gain do not do relative gain correction. Default: False
--no-flat-fields do not do flat field correction. Default: False
--cluster-profile str
Default: noDB
--max-pulses int Default: 128
--use-dir-creation-date
Default: False
--max-cells-db int Default: 128
--rawversion int Default: 2
--instrument str Default: FXE
--local-input output constants locally. Default: True
--db-input output constants to database. Default: True
--bias-voltage int detector bias voltage. Default: 500
--cal-db-interface str
the database interface to use. Default: tcp://max-
exfl014:5005
--geometry-file str the geometry file to use, MAR 2018. Default:
/gpfs/exfel/d/cal/exchange/lpdMF_00.h5
--beam-center-offset float [float ...]
offset from the beam center, MAR 2018. Default: [1.5,
1]
AGIPD
-----
Dark Images Evaluation
~~~~~~~~~~~~~~~~~~~~~~
This notebook produces offset, noise and derived bad pixel data from AGIPD
dark images.
.. code::
% python calibrate_nbc.py AGIPD dark --help
Pulse Capacitor Evaluation
~~~~~~~~~~~~~~~~~~~~~~~~~~
This notebook produces per-pixel relative gain, normalizing all memory cells
for a given pixel w.r.t. the three gain stages.
.. code::
% python calibrate_nbc.py AGIPD PC --help
Flat Field Evaluation
~~~~~~~~~~~~~~~~~~~~~
This notebook produces flat field deduced correction constants, which are used
to normalize the pulse capacitor data.
.. code::
% python calibrate_nbc.py AGIPD FF --help
Combine
~~~~~~~
This notebook combines inputs from the other characterization notebooks into
a consolidated, normalized set of correction constants.
.. code::
% python calibrate_nbc.py AGIPD combine --help
Correction
~~~~~~~~~~
Corrects an AGIPD run with calibration constants from the database and/or files.
.. code::
% python calibrate_nbc.py AGIPD correct --help
......@@ -7,7 +7,9 @@ to expose Jupyter_ notebooks to a command line interface.
Additionally, it leverages the DESY/XFEL Maxwell cluster to run these jobs in parallel
via SLURM_.
Here is a list of `Available Notebooks`_.
Here is a list of :ref:`_available_notebooks`_.
If you would like to integrate additional notebooks please see the :ref:`development_workflow`_.
.. _nbparameterise: https://github.com/takluyver/nbparameterise
.. _nbconver: https://github.com/jupyter/nbconvert
......
.. _development_workflow:
Development Workflow
====================
......@@ -307,6 +309,12 @@ is generated at the end.
Finally, you should verify that the report contains the information you'd like to convey and
is intelegable to people other than you.
Documenting
-----------
Most documentation should be done in the notebook itself. However, please add new notebooks
to the `available_notebooks.rst` file in the `docs` folder.
.. _nbparameterise: https://github.com/takluyver/nbparameterise
.. _ipcluster: https://ipyparallel.readthedocs.io/en/latest/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment