Package: nectarchain
nectarchainRepository for the high level analysis of the NectarCAM data.
The analysis is heavily based onctapipe, adding custom code for NectarCAM calibration.Installationnectarchainis available as aPyPIorcondapackage, or as aSingularity/Apptainercontainer.Using conda/mambacondais a package manager, distributed e.g. withinAnaconda. Use of its re-implementation in C++,mamba, is strongly advised instead.mambais shipped e.g. withinMambaforgewhich can advantageously replace Anaconda altogether (lighter and faster).mambacreate-nnectarchain-cconda-forgenectarchainUsing pipnectarchaincan also be manually installed as a PyPI package, albeit following specific requirements which are automatically accounted for through aconda/mambainstallation.mambacreate-nnectarchainpython=3.8
mambaactivatenectarchain
pipinstallnectarchainAs a containernectarchainis planned to be pushed on each release on theGitHub Container Registryas anApptainerimage. Such a container can be instantiated with:apptainershelloras://ghcr.io/cta-observatory/nectarchain:latestThenectarchaincode is then available under/opt/cta/nectarchain.DIRAC supportis fully available and configured within such a container.Note to macOS usersmacOS users may experience errors when trying to initialize a proxy to DIRAC when theDIRAC support is enabled, especially with recent hardware equipped with M1 or M2 Apple CPU chips. The container alternative can then help having an environment with CTADIRAC fully configured. However,Apptainerisnot readily available on macOS, but there is a workaround usinglimavirtualization technologyon a Mac.TL;DRbrewinstallqemulima
limactlstarttemplate://apptainer
limactlshellapptainerapptainerrun--bind$HOME:/home/$USER.linuxoras://ghcr.io/cta-observatory/nectarchain:latestIf you are running a Mac which CPU is based on ARM architecture (M1 or M2 Apple chips), when starting theapptainercontainer (second line above), please select theOpen an editor to review or modify the current configurationoption and add the following line at the beginning of the configuration file:arch:"x86_64"otherwise, please proceed with theProceed with the current configurationoption.The mount point/tmp/limais shared between the host machine and theapptainercontainer, and writable from both.Manual installation (for developers)This is the recommended installation procedure for developers.nectarchainshould bepip-installed in development (akaeditable) mode.gitclonehttps://github.com/cta-observatory/nectarchain.gitcdnectarchain
mambaenvcreate--namenectarchain--fileenvironment.yml
mambaactivatenectarchain
pipinstall-e.Enablepre-commit hooks, which enforces adherence to PEP8 coding style:pre-commitinstallPlease follow thesame conventions asctapiperegarding settings of Git remotes, and how to contribute to the code with pull requests.Optional DIRAC supportNote: this isnotneeded if you are usingnectarchainas a container, as DIRAC is already fully installed and configured within.To enable support for DIRAC within the same environment, do the following after the installation ofnectarchaindescribed above:mambaactivatenectarchainmambainstalldirac-grid
condaenvconfigvarssetX509_CERT_DIR=${CONDA_PREFIX}/etc/grid-security/certificatesX509_VOMS_DIR=${CONDA_PREFIX}/etc/grid-security/vomsdirX509_VOMSES=${CONDA_PREFIX}/etc/grid-security/vomses# The following is needed for the environment variables, used for DIRAC configuration, to be available:mambadeactivate
mambaactivatenectarchain
pipinstallCTADIRAC
dirac-configureSome Mac OS users (running on M1 chip) may experience aM2Crypto.SSL.SSLErrorerror when trying to initiate a DIRAC proxy withdirac-proxy-init. Instead of:mambainstalldirac-gridone may try:mambainstalldirac-grid"voms=2.1.0rc2=h7a71a8a_7"or thecontainer alternativeas explained above.nectarchainis currently pinned toctapipeversion 0.19.ContributingAll contribution are welcome.Guidelines are the same asctapipe's ones.
Seeherehow to make a pull request to contribute.Report issue / Ask a questionPlease useGitHub Issues.