Python wrapper to unsiotools
Project description
ABOUT
UNSIOTOOLS contains a collection of unsio based programs and depends of the Nemo package. You have access to falcON algorithm to compute density and gravity.
Installing python wrapper
pip install python-unsiotools -U
To get some docstring help
# Help on falcON class
pydoc unsiotools.simulations.cfalcon
Usage
- In the example below, we load a RAMSES simulation, and compute density and gravity on HALO particles
import unsio.input as uns_in # unsio reading module
import unsiotools.simulations.cfalcon as falcon
myfile="/home/jcl/output_00004" # input RAMSES simulation
# we instantiate a CUNS_IN object
my_in=uns_in.CUNS_IN(myfile,"halo") # We select components HALO
#
# Reading
#
if my_in.nextFrame(): # load snapshot
# read halo positions
status,pos=my_in.getData("halo","pos")
# read halo mass
status,mass=my_in.getData("halo","mass")
# read time simulation
status,timex=my_in.getData("time")
# compute density
cf=falcon.CFalcon()
ok,rho,hsml=cf.getDensity(pos,mass)
print("Rho=",rho)
# compute gravity
eps=0.05 # softening
ok,acc,phi=cf.getGravity(pos,mass,eps)
print (ok,acc,phi)
- In this more simple example, we compute density and gravity on random data. Note that data must be in float32 format
import unsiotools.simulations.cfalcon as falcon
import numpy as np
pos=np.float32(np.random.random_sample((300,)))
mass=np.float32(np.random.random_sample((100,)))
cf=falcon.CFalcon()
# density
ok,rho,hsml=cf.getDensity(pos,mass)
print(f"ok={ok}\nrho={rho}")
# gravity
eps=0.05
ok,acc,phi=cf.getGravity(pos,mass,eps)
print (f"ok={ok}\nacc={acc}\nphi={phi}")
Licence
UNSIOTOOLS is open source and released under the terms of the CeCILL2 Licence
Webpage
PLease visit :
- UNSIO project home page
- UNSIO Python reading manual
- UNSIO Python writing manual
- UNSIO Pypi page
- NEMO home page
Copyright
Copyright Jean-Charles LAMBERT
Jean-Charles.Lambert_at_lam.fr
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
Built Distributions
File details
Details for the file python-unsiotools-1.0.1.tar.gz
.
File metadata
- Download URL: python-unsiotools-1.0.1.tar.gz
- Upload date:
- Size: 81.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266c481cb89978751c5f3f894de18e0e593c66e3c27a913537afb7fb465573a7 |
|
MD5 | 61f50a3087f2ce7d4da2e14d6846013d |
|
BLAKE2b-256 | 6a7e31ecaa9d4b577fc2d11393f8190d90dd82a21220fe200cd40ddd88b0f445 |
File details
Details for the file python_unsiotools-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e4b3069a5d5b0d7ecc888d1e1f8cfe45164610bb1b171eee088eb6b3287120e |
|
MD5 | c07ed50cb100b9fb2414b5925ca6c496 |
|
BLAKE2b-256 | 83bb9073c41881396609d7ac37849ee021fe7159b1a62ea333c215bb815ad4cf |
File details
Details for the file python_unsiotools-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de7699dfd2bb600c40196975354b52e52ae38f548371857809cb190eaa0d55f1 |
|
MD5 | d479f9cb0defcdaee470aa42ea5ccac5 |
|
BLAKE2b-256 | ded8a827661f9f2a53fe37fd804421cd11674ec728119381c4c2f9f4d36ffdd0 |
File details
Details for the file python_unsiotools-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d5fde7d51ca655595d5e8fa3e12c4a1968376b6d8d10d0d191962ba35a3d5f |
|
MD5 | f162462c9070bec1b2b816269886bb3f |
|
BLAKE2b-256 | dc88665d4bb59f693ea87da09999a4c20ee243a9ff2217085781738074f3a76e |
File details
Details for the file python_unsiotools-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f27fa560befaa0778ec9e43c1e320a0efceeb3756d8f036e6e900ce28cfb926 |
|
MD5 | 8d9cecd95024de5894e0a614f7a0d817 |
|
BLAKE2b-256 | 427415c389648f6c7ba42b5e279cb05a0528ac31e3ed8d48273cd3072bfc068e |
File details
Details for the file python_unsiotools-1.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26d866b43702ce4e20e17021346d1833fa5a48621aa8a0feeebd0ee085ca3573 |
|
MD5 | 28e8e753f066c08369aa631f009f8c72 |
|
BLAKE2b-256 | eec7766f5ce2f4fc48a24d48e115c8b1079c3cce0dff65680c6e2c480354b43d |
File details
Details for the file python_unsiotools-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfd40fb7c04670b050e80581f8c71a41fd971696c47528146267faff237190a4 |
|
MD5 | 0acd446bd3ab5fd37eaf8f902a76a823 |
|
BLAKE2b-256 | 6d20d58b66b33589a1ee8377093a3bf4ea2f8634fa99420315d08b1393d3f179 |
File details
Details for the file python_unsiotools-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d71c006ae6e671ea7eee194fb2349011f9511139257a17cd51688c8390811fad |
|
MD5 | ed57192d2d749a09b566fb529029fcd6 |
|
BLAKE2b-256 | 2a29f9b56b1a2f1d8c7c698b32dfa447a48dc4de4cd1ef8ee927ed5458792da6 |
File details
Details for the file python_unsiotools-1.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.9 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a76108abbb65f1f5c15b0babf23055a0dd10dabc4ae4af860608d2325be16159 |
|
MD5 | f6d93a52be08650c8e0deae9770fbb29 |
|
BLAKE2b-256 | edffc61b7350cfac8e4ea1e0b75d6e4460b86a0910077b4e2d7275547361a10d |
File details
Details for the file python_unsiotools-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c225b7c79db8e21d3bca1e14388db9a59f78bdb7aedc6f12b42787c74932472 |
|
MD5 | 85c9e9ad186aad8533ccea53dc158c73 |
|
BLAKE2b-256 | 371fc4387f2df448a411df01f9afc4d2457c85234e26525e0050f276b7cb6a6d |
File details
Details for the file python_unsiotools-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 586a7bea8f566ae314bdad7007612d89f48d1bceb6a5e5f0ecc48c5147d100ca |
|
MD5 | 10da546319736192fe2a3c61e48f4be4 |
|
BLAKE2b-256 | cc7eeca2f326e18dcda9fbb30c8e0976ab4e93e5a5e955b90270e93a768238f2 |
File details
Details for the file python_unsiotools-1.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d37afdf3d99017b02f6978f9b943dc1bb8f03b85f149e364c6062e6729b0554 |
|
MD5 | 22d9d89dc774dfaea63c6f73bb5d9eec |
|
BLAKE2b-256 | bed8ee3451f392714b4a2bc475b64fd4020b77f8938df73ee075812ef78f9ce0 |
File details
Details for the file python_unsiotools-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6850e851c1514b9dca154e26d5a8ef84a3fb7a9d11a378e4c8e169adad98a3b |
|
MD5 | 6b47dabd98bf1fe60c5d06accfb503de |
|
BLAKE2b-256 | f57bca37df7e9be4663830ca2a27fba53812f16cbe0b650e95f82f85e19443b7 |
File details
Details for the file python_unsiotools-1.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21fc777531fd021a601b2c6bbbe3a7fe4ac2c5fdef31e8490c7259f1d9e30fd3 |
|
MD5 | 0590e1dc0e2f51769402ce0bc76b33bd |
|
BLAKE2b-256 | 058dc1ef559e26737d3d4c0538211476ea14c4ee18574b162616844132404015 |
File details
Details for the file python_unsiotools-1.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f57ffe6f2c7277ad8f611e9b8c316e4d49275d21ace048400ad970cd7d964286 |
|
MD5 | d7118f61b61e9a05fe55eebf5f728a6d |
|
BLAKE2b-256 | a578f62687fe12d005ae4975d9325d64f41a5386141fbb1c6e02d197efd31d6b |
File details
Details for the file python_unsiotools-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: python_unsiotools-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b6c8dd7bc2693d6b47305df996bb41f0fbccc03f5b5471a5dc3c6da30fe26e8 |
|
MD5 | c4b0f5f86c26808c684fd1e523110f5a |
|
BLAKE2b-256 | 10da124f452a6b325d69289bdef76c4d12325bf1311351434fbb43c4bced0957 |