Python bindings for the NEST noble element simulations
Project description
nestpy (alpha status)
These are the Python bindings for the NEST library. You do not have to have NEST already installed to use this package.
Installing from PyPI
For nearly all systems, instally 'nestpy' should just require running:
pip install nestpy
You can then test that it works by running the example above.
Installing from source
Requirements: You must have CMake>=2.8.12 and a C++11 compatible compiler (GCC>=4.8) to build.
First, you must check out this repository then simply run the installer:
git checkout https://github.com/NESTCollaboration/nestpy
cd nestpy
python setup.py install
Usage
Python bindings to the NEST library:
import nestpy
nc = nestpy.NESTcalc()
print('My favorite random number is', nc.BinomFluct(10, 0.2))
print('This is NR', nestpy.INTERACTION_TYPE(0))
A = 131.293
Z = 54.
x = nc.FullCalculation(nestpy.INTERACTION_TYPE(5), # NR
-1, # keV
2.9, # g/cm^3
124, # Drift field, V/cm
A,
Z,
(1,1))
print('Full calculation gives quanta object', x.quanta) # This is QuantaResult
print('This many:')
print('\t', x.quanta.photons)
print('\t', x.quanta.electrons)
detec = nestpy.VDetector()
detec.Initialization()
y = nc.GetYields(nestpy.INTERACTION_TYPE(0), # NR
200, # keV
2.9, # g/cm^3
124, # Drift field, V/cm
A,
Z,
(1,1))
print(y.PhotonYield)
Credit
- Help from Henry Schreiner (https://indico.cern.ch/event/694818/contributions/2985778/attachments/1682465/2703470/PyHEPTalk.pdf)
- Implementation also based on http://www.benjack.io/2018/02/02/python-cpp-revisited.html
History
0.2.3 (2018-08-14)
NESTv2.0.0
- Still working on PyPI
0.2.2 (2018-08-14)
NESTv2.0.0
- Fix lack of deploy of release to PyPI
0.2.1 (2018-08-14)
NESTv2.0.0
- Fix tests that were breaking only in deploys
0.2.0 (2018-08-14)
NESTv2.0.0
- Fully wrapped NEST (PR #5)
0.1.1 (2018-08-14)
NESTv2.0.0
- First release that deploys on PyPI. Limited functionality. (PR #2)
0.1.0 (2018-08-14)
NESTv2.0.0
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for nestpy-0.2.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f16f07e1ad73786a35512b5321204adf00bd85ff1f2f8a24fe4e92ead9856d1 |
|
MD5 | 36643cd57c6e4e37d7406232a2eb4320 |
|
BLAKE2b-256 | e12a07ff61206383d20cf53ad0cbd5663efd8fd47ce0eb42e62081e4d9af2cbe |
Close
Hashes for nestpy-0.2.5-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60d82625fd6db809b474985a2cb9b64afffb2945070b357e9603b4752f2b9cdb |
|
MD5 | 7b1697a3f278aa91ce2d57d67b4420a9 |
|
BLAKE2b-256 | 7272692070bce5aec6397f0f701e8ce033b3064b6f55b3c615dfccef55b70c92 |
Close
Hashes for nestpy-0.2.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56889680ff68a42a5d8dcece27f6ea3c0391c22643a222a29c9729073c0c1512 |
|
MD5 | 180e5a63cda4fb1805967dabb28f43a1 |
|
BLAKE2b-256 | 5f1eb6526a6251a5ab7524dd3545cd8379227fe25e72aa525570dfb9303204c6 |
Close
Hashes for nestpy-0.2.5-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f4ba386c8e13ba436c8450cda22a75955de497a8099d69a8637215e8f434c8d |
|
MD5 | 10303a32fd3b12ee01802ee96dad40a2 |
|
BLAKE2b-256 | 86eb376f38a085a9f10cca7f17660472a3b39b0959cf92fb4f028282602eed1e |
Close
Hashes for nestpy-0.2.5-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430358bf965dcf925e4912873e7cbb57db732ec2d65e4062391b1fc8a6d6d114 |
|
MD5 | 8ee3c182ebcd44c7fe5e8a22a0f48560 |
|
BLAKE2b-256 | df748a8ce7672cb3990b4a0623c1bfd4c0c5a45cd69908524b3dc9aea9f05bbf |
Close
Hashes for nestpy-0.2.5-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb0b90d1d7e8d369f00764d69df5eaa60719556a92f8d4bf83722f1781a48fa |
|
MD5 | eb2f5540d6de00ef198d6d5283fa7e05 |
|
BLAKE2b-256 | c196b1530b20692ed0b1b9337005cda43b7360259022bd16686e58293d4872be |
Close
Hashes for nestpy-0.2.5-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b55f959927329d4c9750e0c056cf8e15d23a0576870e4dc8d62b86065965ba4 |
|
MD5 | c97eb9bc7a6db1d512274d665af76e2f |
|
BLAKE2b-256 | 53aa3d7c82e0eb2fe7f0bb9bd37c6795b67127fa9a3181671314565d7363aaf3 |
Close
Hashes for nestpy-0.2.5-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f696e00b96f3c72bccfce6ea75a741838eb4cc633bb100a61f85dbfc670703b |
|
MD5 | a3d7f29c269eae2be5a1d5b49dc5af72 |
|
BLAKE2b-256 | 6adb12c567d25789cf22e98823017ab22d6958c3a44a505fe04d069d0eae5466 |
Close
Hashes for nestpy-0.2.5-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 481325264a04571bcb7d62d86c6533e9f4b1f998dce9899c2e0cd4ec9dcb7f41 |
|
MD5 | fa6dafb390b5c72fb8578edcf8117a9c |
|
BLAKE2b-256 | 4ac8a4263869d00d9aea6b064a07d42cda2bcedcc068e7203ace0331c88b5306 |
Close
Hashes for nestpy-0.2.5-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf5470cb214fcb1ffcd276620ed568601c6e316a03f1dc2a888d0cded09f201 |
|
MD5 | 3e64bd559debc9cdbfe2e4641195ad87 |
|
BLAKE2b-256 | 39c5351b25145674d0e21300efab041012e4b50003b0a02de2dc025ef17876cb |
Close
Hashes for nestpy-0.2.5-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bcabe0b063e2f2644ed9bc38f4a3633c084fefc37870bdbc1bcee0f22a2484d |
|
MD5 | 758a81ead6935ded399877995da41475 |
|
BLAKE2b-256 | a8aa13dbeab8019de82183cee5b5a3d3e8b63ce91e0ddbc16f1a4ccf92e6b29d |