Package to convert a Monte Carlo particle in the form of a numpy-array to a MCPL-file.
Project description
np2mcpl
np2mcpl is a low-key tool to help write mcpl-files directly from numpy-arrays.
Build/Install/Use
- Make sure you have installed the MCPL-library (and NumPy)
- Build the python/c module:
python setup.py build
- Add the build directory to PYTHONPATH or run:
python setup.py install
- In your python script:
import np2mcpl
- Create a numpy array and save it. E.g. :
np2mcpl.save("output",M)
Notes and limitations
- np2mcpl takes as input a 2D NumPy array with 10 or 13 columns, where the columns are assumed to be:
PDG-code x y z ux uy uz t e_kin weight [ px py pz ]
where the PDG-code denotes which kind of particle it is, e.g. 2112 for neutrons, 22 for photon, ...
- The vector ux,uy,uz must have unit length. The optional vector px,py,pz is the polarisation vector associated with the Monte Carlo-particle.
- The input array is expected to be made of floating point numbers (including the PDG-code) in either double or single precision. If the numpy array is in single precision, this will be reflected in the mcpl-file.
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 Distribution
np2mcpl-0.0.1.tar.gz
(5.3 kB
view hashes)
Built Distributions
Close
Hashes for np2mcpl-0.0.1-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae44eeea3f580a30a477fea2ec98998470909c32ad123d9eb9388b01ed90f161 |
|
MD5 | 834fe4de769567cc2c156d810f6511bf |
|
BLAKE2b-256 | 97a4d428b84fd23bdef74c527454b27ecf0dd825f0da36024a5987be4ebc4871 |
Close
Hashes for np2mcpl-0.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 387a0e6c6c71106b8609f11e0a95b6aa52c5f07203e8e25a43a2cdb89ed58fcb |
|
MD5 | f4bb2709f93fdeefc3a90750c1a97d29 |
|
BLAKE2b-256 | 9a0b7da30205243508be3ea79c5f8c95e35ced6ccf6f3e55f108e0438d705136 |
Close
Hashes for np2mcpl-0.0.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e66b6d39f9ba1f0001b8e88eab4f71576d10d774bc5625ac33cead452e1ddc6 |
|
MD5 | 986cac366ea0adff721ec0ec44266ae7 |
|
BLAKE2b-256 | c3cbc009e0a3716841c81822b4c206ecc913a6708b1719ff9c20b0d1959a8703 |
Close
Hashes for np2mcpl-0.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747579d042a41180991868d6600ea31cd4987a49a7853842d6753aeba8bc1a24 |
|
MD5 | 1dcceed74137faab46621e1812b2e79b |
|
BLAKE2b-256 | 235240b2d4123f6c5e18dc974825335df83cf2f93dec4dbc1f1bc1be3a331413 |
Close
Hashes for np2mcpl-0.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e1602ad1259709d48ef8c12e60657da1346fc4b4438d46f235de7283539c09d |
|
MD5 | fe9444b75cdba41917038e470c73fa11 |
|
BLAKE2b-256 | f493d4c4d1879c171cede6e4e5964f1c5e22b4139464de48ab329588be2cb829 |
Close
Hashes for np2mcpl-0.0.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919064682dae83ba6adb25c0b6a574bbb8b61e098d1e2a92fb98d83ecb4ceba6 |
|
MD5 | 2f2c7f90d012dedc21eb0424dfd9e1f7 |
|
BLAKE2b-256 | 976d0fc8d39dfb3114af461075690ea8580af9c251d6aee75710852604c3678b |
Close
Hashes for np2mcpl-0.0.1-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16c1ccc623f241f3f233a5bc83610248f2900bbb3e49252702bc2bb8bf344dac |
|
MD5 | 7460693075f51cbe5d770c50d1a93371 |
|
BLAKE2b-256 | 405f68da7f41070d24af7771134a3162425f284b99ad43c0620ad06db68d8e2f |
Close
Hashes for np2mcpl-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dae1cc9828904e9be222970931053dfd87f3e66a18c02130f1a352e2bb3d5e0 |
|
MD5 | 20b8e101ee002848652463b0905da28c |
|
BLAKE2b-256 | 8d24d88e4a0f16c16e66c3165db20bd5ab96ad4e78dc248f1ddfadc8caa25522 |
Close
Hashes for np2mcpl-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8aca41234344a3ee02f70df60f2e9c183aa652cf1038e3488f58ffa907e9174 |
|
MD5 | d43edd67d5d2d9db3e4df16a6f79244f |
|
BLAKE2b-256 | 0a907392d7c4af5fe46f8393b8ca7f4ef52a10a3a4a6137afaf9000435c0f2d7 |
Close
Hashes for np2mcpl-0.0.1-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b1061e17661b48a8f3b8b00e48fd0f7f94399d309a6c55948f2c8d3c1448903 |
|
MD5 | d63cd9dd1a5619e67933bf70983f3651 |
|
BLAKE2b-256 | 9c45b081256f35fb231936d5221ff1728219580db8b20079dc06f44c08f0bfac |
Close
Hashes for np2mcpl-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ba6a81cca76d0d71135d9aa2624900af2b153bbedc5e9711022272c963e86cf |
|
MD5 | 10bc9f2f6caca10c84c2695789c8b339 |
|
BLAKE2b-256 | 89a52466df2ed5572f5ac162c3650cc80a5b4f83be2ab5066c6ba85a3ece50c2 |
Close
Hashes for np2mcpl-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89a1f68bd31fe5bf557649e0eb2626ce61d5d9185df89a3fad9c5047f114fcfa |
|
MD5 | ac67c58aa2d16a8192aaf7bb03af9cc2 |
|
BLAKE2b-256 | 376ae82b226319892ae1c6e5f94ef85fe7f0a6f3904f1f228110fde06d6accb5 |
Close
Hashes for np2mcpl-0.0.1-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6507a0a1d94583db10ce0c9f13f114b82486ce2d1f3030caa0cca64bc1d091ec |
|
MD5 | a301ba19ec0868b9957629c773936bcd |
|
BLAKE2b-256 | b9dcf26db5be31e3d99fd71d8d981fce9b8904c889752f4d62f0c031f8b7691c |
Close
Hashes for np2mcpl-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41b1c1e2d41416a0e9c296723fe0eea1c03c35259bc0fc76d88821b7fce7dd11 |
|
MD5 | aed054ed684ba49257b0871343915d3e |
|
BLAKE2b-256 | b92f915df47113f043bf9bb1b857924480170d89481db3d361f0acf500197e05 |
Close
Hashes for np2mcpl-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f407b7126cfb4161d72de08b230268ed40f89c577f33f9d40ef9887a282142e8 |
|
MD5 | 74d22009d265c8ffef69f97ccdcdc2da |
|
BLAKE2b-256 | aac10f6bbc5f43c66b482fa4012da3e48908f96e7a0ae1d9f23d741a430a90db |
Close
Hashes for np2mcpl-0.0.1-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd794a0f2198bbd723c5c2c834e61be20db3f0747c3b5957ef0b51a14c43f750 |
|
MD5 | 62282941e97a42db0e6c2e7669ea0d57 |
|
BLAKE2b-256 | 90ac67818639cdb5895a0c9c5236bf8009366490fe296eda67925e9e85029b77 |
Close
Hashes for np2mcpl-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6990a99b1bed638218214727e57445e156730a53943c5c8c725b9139fb62ec |
|
MD5 | a49b4a5cca1cf940bac75f141d440f47 |
|
BLAKE2b-256 | 700d1b8bbddeeae2dd95f7f8464e0ba00adc9e3a6caa43f0b70f1f0467b13e7d |
Close
Hashes for np2mcpl-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1dc99cb1b5743c791b78b3ac12913ec32eeab9627dc08eeebe49508d80eab2 |
|
MD5 | 11af9fe752f95197dad16964f2e59d37 |
|
BLAKE2b-256 | 4244acd360b61f3bc1772b43d3b7d193854b46d7bfad8bda3d64163099fb75b1 |