Skip to main content

Model of the Daya Bay reactor antineutrino experiment for neutrino oscillation analysis based on gadolinium capture data.

Project description

dayabay-model

python pipeline coverage report

Official model of the Daya Bay reactor antineutrino experiment for neutrino oscillation analysis based on gadolinium capture data.

Content

Repositories

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:

  1. Install package pip install dayabay-model
  2. Install required packages: pip install -r requirements
  3. Clone the repository with Daya Bay data git clone https://github.com/dayabay-experiment/dayabay-data-official
  • Make sure that you have git-lfs in your system or install it
  • After installing git-lfs, change directory to dayabay-data-official and run command git lfs pull to 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
  1. Create soft links ln -s dayabay-data-official/hdf5 data
  2. Set PYTHONPATH variable to the current directory: set PYTHONPATH=$PHYTHONPATH:$PWD. Alternative: set variable value when you are running example: PYTHONPATH=PWD python ./extras/...
  3. Run script python extras/mwe/run.py or PYTHONPATH=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
  1. 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.]
  1. Also, you may pass custom path to data, if you put path_data parameter 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

  1. 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

dayabay_model-1.6.0.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dayabay_model-1.6.0-py3-none-any.whl (53.9 kB view details)

Uploaded Python 3

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

Hashes for dayabay_model-1.6.0.tar.gz
Algorithm Hash digest
SHA256 efc9911e301f89450d96c506ad6cf7f27b24a90bde8f05877e85f1e87caa3ea7
MD5 6190d57601ddf707149189dc4f1c0f59
BLAKE2b-256 7f7305b062fdee27db78921914b1d55ebd7c48c454c978c07ebcdff744e96336

See more details on using hashes here.

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

Hashes for dayabay_model-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb5d22c451a65780b0beac16d43db6f588290a57b2c6b4c57b664b4d235d933
MD5 fe0b41ac3c85d35743263767f634d429
BLAKE2b-256 c8197c9219301150bea0aa1336ee518e5311d3e6b9d65259dd89e3bf408f9940

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page