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 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 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 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.1.tar.gz (55.0 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.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file dayabay_model-1.6.1.tar.gz.

File metadata

  • Download URL: dayabay_model-1.6.1.tar.gz
  • Upload date:
  • Size: 55.0 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.1.tar.gz
Algorithm Hash digest
SHA256 02c5a7cfcc4479b0b312a12a2c28df0445efd208b874da1de80293e7a04a3923
MD5 09c593cc044acdc147d21df8bc6d214a
BLAKE2b-256 d9cdb0b514106279fd04b01cd17fedb89ab172204744ff82a4451a34f304bf98

See more details on using hashes here.

File details

Details for the file dayabay_model-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: dayabay_model-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 53.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e1e9f9a8b8415ac2b9e913121fce2cad3a503bead920535aa50b53caca03138
MD5 7ce5a87fb8e7658ac0504f7f81e63da4
BLAKE2b-256 de833b07e73b6d38c7eea675d27d803809dd7fd3466601408f14c23f76e2d262

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