Skip to main content

Python bindings for the NEST noble element simulations

Project description

nestpy (alpha status)

Build Status DOI PyPi version PyPi downloads

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 64-bit Linux 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

# This is same as C++ NEST with naming                                                                            
nc = nestpy.NESTcalc()

A = 131.293
Z = 54.
density = 2.9 # g/cm^3                                                                                            

interaction = nestpy.INTERACTION_TYPE(0) # NR                                                                     
E = 10 # keV                                                                                                      
print('For an %s keV %s' % (E, interaction))

# Get particle yields                                                                                             
y = nc.GetYields(interaction,
                 E,
                 density,
                 124, # Drift field, V/cm                                                                         
                 A,
                 Z,
                 (1,1))

print('The photon yield is:', y.PhotonYield)

print('With statistical fluctuations', nc.GetQuanta(y, density).photons)

For more examples on possible calls, please see the tests folder.

Technical implementation

This package is a pybind11 wrapper of NEST that uses (TravisCI)[https://travis-ci.org] to build binaries using the (manylinux)[https://github.com/pypa/python-manylinux-demo] (Docker image)[https://www.docker.com].

See AUTHORS.md for information on the developers.

Citation

When you use nestpy, please say so in your slides or publications (for publications, see Zenodo link above). You can mention this in addition to how you cite NEST. This is important for us being able to get funding to support this project.

History

1.0.0 (2018-08-18)

NESTv2.0.0

  • First release intended for general public.
  • Mac OSX support (#10)
  • Complete tests and various bug fixes (#13)
  • Documentation, citation, and technical detail writing

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


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

nestpy-1.0.0-cp37-cp37m-manylinux1_x86_64.whl (163.5 kB view hashes)

Uploaded CPython 3.7m

nestpy-1.0.0-cp37-cp37m-manylinux1_i686.whl (163.6 kB view hashes)

Uploaded CPython 3.7m

nestpy-1.0.0-cp37-cp37m-macosx_10_7_x86_64.whl (151.8 kB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

nestpy-1.0.0-cp36-cp36m-manylinux1_x86_64.whl (163.5 kB view hashes)

Uploaded CPython 3.6m

nestpy-1.0.0-cp36-cp36m-manylinux1_i686.whl (163.6 kB view hashes)

Uploaded CPython 3.6m

nestpy-1.0.0-cp36-cp36m-macosx_10_7_x86_64.whl (151.8 kB view hashes)

Uploaded CPython 3.6m macOS 10.7+ x86-64

nestpy-1.0.0-cp35-cp35m-manylinux1_x86_64.whl (163.5 kB view hashes)

Uploaded CPython 3.5m

nestpy-1.0.0-cp35-cp35m-manylinux1_i686.whl (163.6 kB view hashes)

Uploaded CPython 3.5m

nestpy-1.0.0-cp35-cp35m-macosx_10_6_x86_64.whl (151.8 kB view hashes)

Uploaded CPython 3.5m macOS 10.6+ x86-64

nestpy-1.0.0-cp34-cp34m-manylinux1_x86_64.whl (163.1 kB view hashes)

Uploaded CPython 3.4m

nestpy-1.0.0-cp34-cp34m-manylinux1_i686.whl (163.3 kB view hashes)

Uploaded CPython 3.4m

nestpy-1.0.0-cp34-cp34m-macosx_10_6_x86_64.whl (153.9 kB view hashes)

Uploaded CPython 3.4m macOS 10.6+ x86-64

nestpy-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl (164.1 kB view hashes)

Uploaded CPython 2.7mu

nestpy-1.0.0-cp27-cp27mu-manylinux1_i686.whl (164.1 kB view hashes)

Uploaded CPython 2.7mu

nestpy-1.0.0-cp27-cp27m-manylinux1_x86_64.whl (164.1 kB view hashes)

Uploaded CPython 2.7m

nestpy-1.0.0-cp27-cp27m-manylinux1_i686.whl (164.0 kB view hashes)

Uploaded CPython 2.7m

nestpy-1.0.0-cp27-cp27m-macosx_10_6_x86_64.whl (152.4 kB view hashes)

Uploaded CPython 2.7m macOS 10.6+ x86-64

Supported by

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