BEMEWS
is a python module for calculating the Earth-matter effect on neutrino flavor transformations. It is a standalone module that SNEWPY uses to compute the Earth-Matter Effect for supernova neutrinos. The BEMEWS_example.py
script shows how to use the module in standalone mode. The EarthMatter
flavor transformation class in SNEWPY is essentially the same script but with the output options turned off.
BEMEWS
is available as a PyPI package and can be installed using
pip install BEMEWS
As of mid-August 2024, installation with pip
is only available for Mac users.
If you need or wish to manually install BEMEWS
, you can follow the instructions below:
-
You will need the packages python-devel (in Linux), pybind11, and setuptools
-
Modify
setup.py
to use the correct libraries and paths. -
To compile enter
sudo python3 setup.py install
- If you don't want to sudo you may want to use the option
--install-lib=destination/directory/
-
The python code
BEMEWS.py
uses the module to compute the Earth matter effects upon a neutrino signal from Betelgeuse in SuperK. It will generate a lot of files inout
folder named in the script. The output can be switched off by changing theoutputflag
parameter toFalse
. -
A script is provided that allows SNEWPY to include the Earth-matter Effect in its flavor transformation prescription.
-
When using
BEMEWS
you may have to set thePYTHONPATH
environment variable to your PWD and/or wherever theBEMEWS
module was installed in steps 3) or step 4) -
If your script still cannot find the module you may need to put the *.so library in the same directory as the file. The *.so library is in one of the subfolders in the build directory.
-
BEMEWS uses OpenMP. You may want to set the
OMP_NUM_THREADS
environment variable to a number suitable for your machine. -
During compilation, you may need to set the
LIBOMP_INCLUDE
variable to enable the build. If you are a homebrew user on Mac OS X, you can do this with the command
export LIBOMP_INCLUDE=`brew --prefix libomp`/include