-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Do not exclude DQM Bokeh app anymore, it is now mock-imported, and we may want to document it (e.g. by converting its README into a proper section in the doc). * Remove commented suppress_warnings, as we now use mock imports instead * Do not explicitlt write `nectarchain` in mock import settings * Changed README as reStructuredText. * Work on documentation * Lint * Fix references to API * Fix target ref, work on doc * Re-introduce default role for Sphinx, to fix reference to API * Some tips about DIRAC * Some doc formatting --------- Co-authored-by: Jean-Philippe Lenain <[email protected]>
- Loading branch information
Showing
11 changed files
with
180 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
================================================ | ||
nectarchain |pypi| |conda| |ci| |doc| |codecov| | ||
================================================ | ||
|
||
.. |ci| image:: https://github.com/cta-observatory/nectarchain/actions/workflows/ci.yml/badge.svg?branch=main | ||
:target: https://github.com/cta-observatory/nectarchain/actions/workflows/ci.yml?query=workflow%3ACI+branch%3Amain | ||
:alt: Test Status | ||
.. |pypi| image:: https://badge.fury.io/py/nectarchain.svg | ||
:target: https://pypi.org/project/nectarchain | ||
.. |conda| image:: https://anaconda.org/conda-forge/nectarchain/badges/version.svg | ||
:target: https://anaconda.org/conda-forge/nectarchain | ||
.. |codecov| image:: https://codecov.io/github/cta-observatory/nectarchain/graph/badge.svg?token=TDhZlJtbMv | ||
:target: https://codecov.io/github/cta-observatory/nectarchain | ||
.. |doc| image:: https://readthedocs.org/projects/nectarchain/badge/?version=latest | ||
:target: https://nectarchain.readthedocs.io/en/latest/?badge=latest | ||
:alt: Documentation Status | ||
|
||
Repository for the high level analysis of the NectarCAM data, a camera to equip the | ||
medium-sized telescopes of `CTAO <https://www.ctao.org/>`_ in its Northern site. | ||
The analysis is heavily based on `ctapipe <https://github.com/cta-observatory/ctapipe>`_, | ||
adding custom code for NectarCAM calibration. | ||
|
||
``nectarchain`` is currently pinned to ``ctapipe`` version 0.19. | ||
|
||
This code is under rapid development. It is not recommended for production use unless you are an expert or developer! | ||
|
||
* Code: https://github.com/cta-observatory/nectarchain | ||
* Docs: https://nectarchain.readthedocs.io/ | ||
|
||
Installation for Users | ||
====================== | ||
|
||
``nectarchain`` and its dependencies may be installed using the *Anaconda* or | ||
*Miniconda* package system. We recommend creating a conda virtual environment | ||
first, to isolate the installed version and dependencies from your main | ||
environment (this is optional). | ||
|
||
The latest version of ``nectarchain`` can be installed via:: | ||
|
||
mamba install -c conda-forge nectarchain | ||
|
||
or via:: | ||
|
||
pip install nectarchain | ||
|
||
**Note**: to install a specific version of ``nectarchain``, take look at the documentation `here <https://nectarchain.readthedocs.io/en/latest/user-guide/index.html>`_. | ||
|
||
**Note**: ``mamba`` is a C++ reimplementation of conda and can be found `here <https://github.com/mamba-org/mamba>`_. | ||
|
||
Note this is *pre-alpha* software and is not yet stable enough for end-users (expect large API changes until the first stable 1.0 release). | ||
|
||
Developers should follow the development install instructions found in the | ||
`documentation <https://nectarchain.readthedocs.io/en/latest/developer-guide/index.html>`_. | ||
|
||
|
||
Contributing | ||
============ | ||
|
||
All contribution are welcome. | ||
|
||
Guidelines are the same as `ctapipe's ones <https://ctapipe.readthedocs.io/en/latest/developer-guide/getting-started.html>`_. | ||
See `here <https://ctapipe.readthedocs.io/en/latest/developer-guide/pullrequests.html#pullrequests>`_ how to make a pull request to contribute. | ||
|
||
|
||
Report issue / Ask a question | ||
============================= | ||
|
||
Please use `GitHub Issues <https://github.com/cta-observatory/nectarchain/issues>`_ to report issues or `GitHub Discussions <https://github.com/cta-observatory/nectarchain/discussions>`_ for questions and discussions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.. _dqm: | ||
|
||
Quick recipe for the Data Quality Monitoring script | ||
=================================================== | ||
|
||
Run locally | ||
----------- | ||
|
||
To launch the Data Quality Monitoring (DQM), first activate the ``nectarchain`` ``conda`` environment: | ||
|
||
.. code-block:: console | ||
source activate nectarchain | ||
Usage: | ||
|
||
.. code-block:: console | ||
$ python start_dqm.py -h | ||
To automatically find and retrieve run files from DIRAC, use the ``-r`` option: | ||
|
||
.. code-block:: console | ||
$ python start_dqm.py -r 2720 $NECTARCAMDATA $NECTARCAMDATA | ||
See :ref:`env-vars` for the usage of the ``$NECTARCAMDATA`` environment variable. | ||
|
||
To manually use local run files, use the ``-i`` option **after** indicating the positional arguments for input and output directories: | ||
|
||
.. code-block:: console | ||
$ python start_dqm.py $NECTARCAMDATA $NECTARCAMDATA -i NectarCAM.Run2720.0000.fits.fz NectarCAM.Run2720.0001.fits.fz | ||
As a DIRAC job | ||
-------------- | ||
|
||
The user script `nectarchain/user_scripts/jlenain/dqm_job_submitter/submit_dqm_processor.py` can be used to run the DQM as a DIRAC job: | ||
|
||
.. code-block:: console | ||
$ python submit_dqm_processor.py -h | ||
Under the hood, it calls the ``dqm_processor.sh`` wrapper script, which itself launches an Apptainer instance of the ``nectarchain`` container on the DIRAC worker. This Apptainer image is automatically built and published in CI on releases. | ||
|
||
The DQM runs one job per NectarCAM run. It is possible, for instance, to bulk-submit DIRAC jobs for all runs acquired during a given period, e.g.: | ||
|
||
.. code-block:: console | ||
$ d=2023-01-01 | ||
$ while [ "$d" != 2023-03-01 ]; do python submit_dqm_processor.py -d $d; d=$(date -I -d "$d + 1 day"); done | ||
The script will first assess whether DQM jobs have already been run for a given NectarCAM run, based on the output directory on DIRAC where this script stores its output. Look for the ``$DIRAC_OUTDIR`` environment variable in ``dqm_processor.sh``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _env-vars: | ||
|
||
Environment variables | ||
===================== | ||
|
||
We strive for relying as little as possible on environment variables across ``nectarchain``. | ||
However, some environment variables are needed for ``nectarchain`` to work properly, especially to automatically fetch run files from the grid via DIRAC, or to store output results and plots. | ||
|
||
Mandatory | ||
--------- | ||
|
||
:``NECTARCAMDATA``: path to local NectarCAM data. It can contain ``fits.fz`` run files, `~nectarchain.data.container.waveformsContainer.WaveformsContainer` or `~nectarchain.data.container.chargesContainer.ChargesContainer` HDF5 files. This is also where the `~nectarchain.data.management.DataManagement.findrun` method will automatically store NectarCAM run files when fetched from DIRAC. | ||
|
||
Optional | ||
-------- | ||
|
||
:``NECTARCHAIN_LOG``: path for output logs for ``nectarchain``, generally defaulting to ``/tmp``. | ||
:``NECTARCHAIN_FIGURES``: path to store output figures for ``nectarchain``, generally defaulting to ``/tmp``, or configurable (see e.g. `nectarchain.makers.component.spe.spe_algorithm.SPEalgorithm`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,7 @@ User Guide | |
:maxdepth: 2 | ||
|
||
getting-started | ||
env-vars | ||
howto-dirac | ||
troubleshooting | ||
dqm | ||
troubleshooting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.