Model of the Daya Bay reactor antineutrino experiment for neutrino oscillation analysis based on gadolinium capture data.
Project description
dayabay-model
Official model of the Daya Bay reactor antineutrino experiment for neutrino oscillation analysis based on gadolinium capture data.
Content
Repositories
- Development/CI: https://git.jinr.ru/dagflow-team/dayabay-model
- Contact/pypi/mirror: https://github.com/dagflow-team/dayabay-model
- PYPI: https://pypi.org/project/dayabay-model
Minimal working example
If you want to run examples from extras/mwe, clone this repository git clone https://github.com/dagflow-team/dayabay-model and change position to cloned reposiotry cd dayabay-model.
However, you can just copy examples that are listed below and run them where you want after installation of package and several others steps:
- Install package
pip install dayabay-model - Install required packages:
pip install -r requirements - Clone the repository with Daya Bay data
git clone https://github.com/dayabay-experiment/dayabay-data-official
- Make sure that you have
git-lfsin your system or install it - After installing
git-lfs, change directory todayabay-data-officialand run commandgit lfs pullto download more files - Check any file that it was properly uploaded:
cat parameters-common/reactor_antineutrino_spectrum_edges.tsv - Go back to the analysis directory
cd ../ - More details on how to work with data repository you can find in README.md of the data repository
- Create soft links
ln -s dayabay-data-official/hdf5 data - Set
PYTHONPATHvariable to the current directory:set PYTHONPATH=$PHYTHONPATH:$PWD. Alternative: set variable value when you are running example:PYTHONPATH=PWD python ./extras/... - Run script
python extras/mwe/run.pyorPYTHONPATH=PWD python extras/mwe/run.py
from dayabay_model_official import model_dayabay
model = model_dayabay()
print(model.storage["outputs.statistic.full.pull.chi2p"].data)
within python
python extras/mwe/run.py
- Check output in console, it might be something like below
INFO: Model version: model_dayabay
INFO: Source type: npz
INFO: Data path: data
INFO: Concatenation mode: detector_period
INFO: Spectrum correction mode: exponential
INFO: Spectrum correction location: before integration
[0.]
- Also, you may pass custom path to data, if you put
path_dataparameter to model. For example,
from dayabay_model_official import model_dayabay
model = model_dayabay(path_data="dayabay-data-official/npz")
print(model.storage["outputs.statistic.full.pull.chi2p"].data)
Example can be executed: python extras/mwe/run-custom-data-path.py or PYTHONPATH=PWD python extras/mwe/run-custom-data-path.py
- If you want to switch between Asimov and observed data, you need to switch input in the next way
from dayabay_model_official import model_dayabay
model = model_dayabay(path_data="dayabay-data-official/npz")
print(model.storage["outputs.statistic.full.pull.chi2p"].data)
model.switch_data("real")
print(model.storage["outputs.statistic.full.pull.chi2p"].data)
model.switch_data("asimov")
print(model.storage["outputs.statistic.full.pull.chi2p"].data)
Example can be executed: python extras/mwe/run-switch-asimov-real-data.py or PYTHONPATH=PWD python extras/mwe/run-switch-asimov-real-data.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dayabay_model-1.6.0.tar.gz.
File metadata
- Download URL: dayabay_model-1.6.0.tar.gz
- Upload date:
- Size: 53.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc9911e301f89450d96c506ad6cf7f27b24a90bde8f05877e85f1e87caa3ea7
|
|
| MD5 |
6190d57601ddf707149189dc4f1c0f59
|
|
| BLAKE2b-256 |
7f7305b062fdee27db78921914b1d55ebd7c48c454c978c07ebcdff744e96336
|
File details
Details for the file dayabay_model-1.6.0-py3-none-any.whl.
File metadata
- Download URL: dayabay_model-1.6.0-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fb5d22c451a65780b0beac16d43db6f588290a57b2c6b4c57b664b4d235d933
|
|
| MD5 |
fe0b41ac3c85d35743263767f634d429
|
|
| BLAKE2b-256 |
c8197c9219301150bea0aa1336ee518e5311d3e6b9d65259dd89e3bf408f9940
|