A python wrapper to unsio
Project description
ABOUT
UNSIO (Universal Nbody Snapshot Input Output) is an API which perform input/output operations in a generic way, and on different kind of nbody files format (nemo, Gadget binaries 1 and 2, Gadget hdf5, Ramses). By using this API, a user could write only one analysis program which will work on all known files format supported by UNSIO. It's not necessary anymore to know how is implemented a file format, UNSIO will do transparently and automatically all the hard work for you ! With UNSIO, you will spend less time to develop your analysis program. UNSIO comes with an integrated sqlite3 database which can be used to retrieve automatically all your data among terabytes of hard disks.
Features
UNSIO can be used from different languages (C,C++,Fortran and Python)
Supported files format :
- NEMO (read and write)
- GADGET 1 (read)
- GADGET 2 (read an write)
- GADGET 3/hdf5 (read and write)
- RAMSES (read)
- List of files stored in a file
- Simulations stored in SQLITE3 database
Installing python wrapper
pip install python-unsio
Usage
- example : load gas and stars component of an UNS compliant snapshot
import unsio.input as uns_in
# we instantiate object
myfile="snashot.000"
my_in=uns_in.CUNS_IN(myfile,"gas,stars")
# load snapshot
if my_in.nextFrame():
# read stars positions
status,poss=my_in.getData("stars","pos")
# read gas positions
status,posg=my_in.getData("gas","pos")
# read gas densities
status,rho=my_in.getData("gas","rho")
# read time
status,timex=my_in.getData("time")
- example : save previously loaded data in gadget3 format
import unsio.output as uns_out
# we instantiate object
myoutfile="snapshot.g3"
my_out=uns_out.CUNS_OUT(myoutfile,"gadget3")
# prepare data to be saved
# set time
status=my_out.setData(timex,"time")
# set positions for stars
status=my_out.setData(poss,"stars","pos")
# set positions for gas
status=my_out.setData(posg,"gas","pos")
# set density for gas
status=my_out.setData(rho,"gas","rho")
# save on disk
my_out.save()
# close
my_out.close()
License
UNSIO is open source and released under the terms of the CeCILL2 Licence
Webpage
PLease visit : https://projets.lam.fr/projects/unsio
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
Hashes for python_unsio-0.9.3rc4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff3e8d835c49305c13a3209d3baad7d35f1eda3351327f9b2be486ba7aeefde |
|
MD5 | 8adf5c742acf7cc40aaf1556c7b41955 |
|
BLAKE2b-256 | af64763e8725c6d824c10801a35e1e4daffc7cb284571f14d278b746f3c0fe70 |
Hashes for python_unsio-0.9.3rc4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc2b8842f097e5edc6c253669ef4ac6678f560e1ceba159c928bd97525f7f65 |
|
MD5 | a40d99d336f3cbe654dd132f176c4f90 |
|
BLAKE2b-256 | 63b32e441009569b5210fb7ba9ab80e85fe7cb1c68cd1c0e4cacdf98ff748de7 |
Hashes for python_unsio-0.9.3rc4-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 593ea98df950de2451e820ef9d89106a03612fdca4c1be41d0af121742523aaf |
|
MD5 | 41cb8f412c014b712cd2b1a682ccb0ed |
|
BLAKE2b-256 | 3e6772c2e9723f664646206153b04202b5282f942f9fbecd94a6a95b16bb6068 |
Hashes for python_unsio-0.9.3rc4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53f5386bd0fded4eaca7818ef75df4660458b1707191c9790f9c28f6a4ded52a |
|
MD5 | 121ec511ae73fa9f9acabff0b809d520 |
|
BLAKE2b-256 | a0baab4b152d93936f8d6ed7cd43d8017e195d64e803bdb310082c7e8ad50420 |
Hashes for python_unsio-0.9.3rc4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeacb6e9526cbd4e298fa7d8a11f148626a6012e765d945490880e06c6ba5348 |
|
MD5 | 9737108f52f552bfb7dc1c2add1efd41 |
|
BLAKE2b-256 | c9e97bc7d2679346462ecbaf9a057ce46e14e7c70445c51b4a6c72f8fb82e574 |
Hashes for python_unsio-0.9.3rc4-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeae3b4dd81191bccf39109261b7995893b5a05a60b6b273ffb10b508f9448d2 |
|
MD5 | dde8af63757879e366d1a6abb9176f5e |
|
BLAKE2b-256 | b0b007d441a649191694e59988b25573f1e59d9f095dab31d356a5b0c3109efd |
Hashes for python_unsio-0.9.3rc4-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4728e0e7e0fd529f097fb857fc4e63fdb7831f7f652992a7867696378bc75633 |
|
MD5 | 6eaaf0a0c866c64d00184308921d6452 |
|
BLAKE2b-256 | 05b27a0acbecb12d70e2e4f231a309d1e071aac44e4d0fec5f82dfaab71aa198 |
Hashes for python_unsio-0.9.3rc4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db1498c315c96469297fa46d91b5807ace2041d29353afe85a2141be3e8729ff |
|
MD5 | bea7074b98518de8b33ce548227df237 |
|
BLAKE2b-256 | 6dffd4120848f5396b4d04e9ee06ca920fb368a042eb951f530ade3ed6a08a61 |
Hashes for python_unsio-0.9.3rc4-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e77a49482c2b03a4da20f5a2856ee1fea6278fe538acd780a0e336452c38f20 |
|
MD5 | fa577d24f2e322097ec14f2e1aaa1e07 |
|
BLAKE2b-256 | 1ec75ab02c5043bf54497021d476dacddd403f06c731a4ebfa2e6c50c51f7960 |
Hashes for python_unsio-0.9.3rc4-cp34-cp34m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72cab42bcddef4388394cf8beaa4e62aff5fd02054cb7ecaf7a7da242ef70a9a |
|
MD5 | eefefb74f68893b89462dd0921b40bca |
|
BLAKE2b-256 | a9f290b0419ad333dc78825e94343863a1c57d81a33e0946f0ceab1b3891ac21 |
Hashes for python_unsio-0.9.3rc4-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 283003c36558bfefcde413abe2b40349bf170d86069c8034646032a603f81759 |
|
MD5 | 836099f57a5f7a6c6088bf8cbc71049d |
|
BLAKE2b-256 | 6259ac0fade1169e9c35de33bc0bd9bf6b4bd644db751d277766c0fde5c57575 |
Hashes for python_unsio-0.9.3rc4-cp34-cp34m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf9cf97a1f9ccc4bd7e71696768f28e37d3980b5543ab07af553f9b35314930 |
|
MD5 | 09ecc2c5eeed057d804b74742d2ac85e |
|
BLAKE2b-256 | a6cf89b6dd0fe31020ca80c1e0ed673442d60e2429739f182cc231ee43a43b40 |
Hashes for python_unsio-0.9.3rc4-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ef9b2531a0251a394ead1891e4dfb94580dc631cdab2d15be071d2c4efd62a3 |
|
MD5 | 59174750a418d7652b73994072a27adf |
|
BLAKE2b-256 | b586e91c74dd7802c64712713a769542d0fe492d00b319cf558f6bc8b95346c2 |
Hashes for python_unsio-0.9.3rc4-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c6e6b0f9c6764e542b3d8bb20651ad3b3a907ca24c985ab01a069cc9851c9c |
|
MD5 | afb7314e726ffe63c84abe7e81925d0d |
|
BLAKE2b-256 | cba00f234c546a066f4d848a1231831498c84a06e7ea5a284bff7361f4b9fa6d |
Hashes for python_unsio-0.9.3rc4-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524dbd2456b50c6ff4b4374f28b2fe47cce4457f04607782067b35e86413f102 |
|
MD5 | 9b0bb2256c11b21ac74b5f0b6542dfd2 |
|
BLAKE2b-256 | 2e980294d5699d59f6a66d48ea8a6c0169a5c58d8b3857f2fb5f7cbdd666e299 |
Hashes for python_unsio-0.9.3rc4-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a169ce61c48d1c480cdea04b33962063ecc28b371da58239a909ee2d2b5931e |
|
MD5 | eab3b9a264eb7eccf007c9fd233fad9b |
|
BLAKE2b-256 | adf57d5dae58039c487d46e6c5f106e3c161cc6cf8b5edb53f65158de9e2917d |