KM3NeT defines guidelines and recommendations for physics analysis and public plots requirements. Templates are used to reenforce KM3NeT guidlines for physics analysis and public plots production, to ensure analysis reproducibility, consistency in analysis/plots archiving and documentation. In the following, we describe in details KM3NeT public plots templates and KM3NeT analysis templates.
## Public plot template
The Public Plot template is a template to automatically create and populate a KM3NeT public plot template with all the meta information needed to archive the plot on KM3NeT gitlab with the corresponding documentation and analysis repository. In other words, the Public Plot template is a ready-to-use CI to create KM3NeT public plot(s).
### Motivation
* Standardize the archiving of public plots.
* Easily track the history of a public plot.
* A ready-to-use CI to create public plot(s).
* Ensure reproducibility and flexibility (easy to annotate, ability to hide graphs, change look and aspect ratio, colours, fonts etc).
* Get high-level data (with the corresponding units and explanation) to reuse the plot and easily modify it for conference presentations, publications, outreach events, posters…).
* Get a quick explanation of the plot and people involved in the study.
* Get access to the corresponding analysis repository on git.
* Easily share results with the outside word for collaborative work or benchmarks with other experiments.
* Ensure consistency in public plots archiving.
### The public plot template
* A public plot template has been defined by KM3NeT and is based on the cookiecutter (https://cookiecutter.readthedocs.io/) template framework. The template is publicly available under https://git.km3net.de/templates/km3net-public-plots . The template is
specifically designed to fit the KM3NeT GitLab CI environment. The template is automatically populated with the meta information obtained during the template creation process (plot version, description, analysis repository, authors, etc).
* A demonstration on how a public plot repository looks like on git is available in https://git.km3net.de/templates/km3net-public-plots-demo/ .
* A step by step guide to produce this demonstration is here: https://git.km3net.de/templates/km3net-public-plots/-/blob/master/README.md .
* The official public plots which have been approved and produced with the public plot template are made available to the public in https://git.km3net.de/publications/plots .
* The public plot template contains the following files/directories:
- LICENSE: a file containing the official KM3NeT license for public plots.
- Makefile: a Makefile with commands like `make dependencies` and `make plot`.
- README: a file pupulated with meta data (authors, contributors, analysis repository etc).
- data: data folder to store high level data to produce the plot.
- doc: a documentation folder to document the public plot following KM3NeT official data classes.
- plots: a folder to store public plots.
- src: a folder to store a script to produce the public plot(s).
- requirements: a text file for software environment.
- CHANGELOG: a file to keep track of the history (versions) of the public plot.
**Note**: practically, from the user perspective, if one would like to reproduce a public plot, the steps are simplified to:
* cloning the public plot.
* typing `make dependencies`.
* typing `make plot`.
And the plot should be reproduced!
## Analysis template
The Analysis template is a template to automatically create and populate a KM3NeT analysis with all the meta information needed to fully understand, reproduce and archive an analysis on KM3NeT gitlab server.
### Motivation
* Standardize the archiving of an analysis (steps, results, motivations ...).
* Easily track the history of an analysis.
* A ready-to-use CI to make an analysis.
* Ensure reproducibility.
* Track changes/operations performed on data (with the corresponding units and explanation) to understand and reproduce the analysis.
* Get a quick explanation of the analysis and people involved in it.
* Easily share details about ana analysis within the collaboration but also with the outside word for collaborative work or benchmarks with other experiments, when necessary.
* Link an analysis repository to a KM3NeT publication (when required).
* Ensure consistency in analysis archiving.
### The analysis template
* An analysis template has been defined and is based on the cookiecutter (https://cookiecutter.readthedocs.io/) template framework. The template is publicly available under https://git.km3net.de/templates/km3net-analysis-template . The template is
specifically designed to fit the KM3NeT GitLab CI environment. The template is automatically populated with the meta information obtained during the template creation process (analysis version, description, authors, etc).
* The analysis template contains the following files/directories:
- LICENSE: a file containing the official KM3NeT license for analysis.
- Makefile: a Makefile with commands like `make dependencies` and `make analysis`.
- README: a file pupulated with meta data (authors, contributors, etc).
- data: data folder to store data (and or processed data) to (re)produce the analysis.
- docs: a documentation folder to document the analysis following KM3NeT official data classes.
- plots: a folder to store analysis plots.
- src: a folder to store any source code for the analysis.
- scripts: a folder to store scripts to reproduce the analysis and the plots.
- notebooks: a folder to store jupyter notebooks.
- requirements: a text file for software environment.
- CHANGELOG: a file to keep track of the history (versions) of the analysis.
**Note**: practically, from the user perspective, if one would like to reproduce an analysis, the steps are simplified to: