Skip to main content

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 :

Installing python wrapper

pip install python-unsio -U

to get some docstring help

pydoc(unsio.input)
pydoc(unsio.output)

Usage

  • In the example below, we load a RAMSES simulation and we save it in GADGET3 file format
import unsio.input as uns_in  # unsio reading module

myfile="/home/jcl/output_00004" # input RAMSES simulation
# we instantiate a CUNS_IN object
my_in=uns_in.CUNS_IN(myfile,"gas,stars") # We select components GAS and STARS
#
# Reading
#
if my_in.nextFrame(): # load snapshot
  # 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 simulation
  status,timex=my_in.getData("time")
#
# Writing
#
import unsio.output as uns_out # unsio writing module

myoutfile="snapshot.g3" # output file name
# we instantiate a CUNS_OUT object
my_out=uns_out.CUNS_OUT(myoutfile,"gadget3") # select gadget3 output format

# prepare data to be saved
# set time
status=my_out.setData(timex,"time")
# set stars positions
status=my_out.setData(poss,"stars","pos")
# set gas positions
status=my_out.setData(posg,"gas","pos")
# set gas densities
status=my_out.setData(rho,"gas","rho")

# write on file system
my_out.save()
# close
my_out.close()

License

UNSIO is open source and released under the terms of the CeCILL2 Licence

Webpage

PLease visit :

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-unsio-1.0.1rc1.tar.gz (33.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

python_unsio-1.0.1rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp310-cp310-macosx_10_9_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp39-cp39-macosx_10_9_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp38-cp38-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp37-cp37m-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp36-cp36m-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

python_unsio-1.0.1rc1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.5mmanylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 2.7mumanylinux: glibc 2.5+ x86-64

python_unsio-1.0.1rc1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 2.7mmanylinux: glibc 2.5+ x86-64

File details

Details for the file python-unsio-1.0.1rc1.tar.gz.

File metadata

  • Download URL: python-unsio-1.0.1rc1.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for python-unsio-1.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 ea0d1abb97c087bf019bd5c0c19e51fba6fbb7505748cefaec838a52a489d2d5
MD5 dcbc84d9de16ce6e6109cadd7fb5aa25
BLAKE2b-256 f6feff018a2b82cf460b2f195a522a9d110761dbf9f3d11540a7f95548d1a297

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a4fbf183bce8f7480364605f75e9670f4084477ee7ce50d960ed5b27bd13825
MD5 691d6beb0e6703fc6e5cf227464e382e
BLAKE2b-256 d231e022f2efdb2077553e5fae88bec35ef84cd9d4ccef4caa43739cb8c23d6a

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c51b64e7d14cff38fef961589ce58e0d89bbdaaf68b102a492632c815d17bf08
MD5 cbcf8ce6d02a5cedc114ee6bba7b4497
BLAKE2b-256 8ddfcbfc716b1b1475de958ec794419ea88e12f3e31bb512b2281d4d8f9feaa2

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4aa3635f370f2d5cee9127c53833b24fea696f8456dee54398e8ab96f0c583bc
MD5 c700911dfbe147da41b8f7b7b6e01db0
BLAKE2b-256 7855d233180abe33c80ba7749ec5acccaf63175b7db136e68872468e8fe72b6e

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e1487f9f705ebabe5d7908131ff6aefb494af289e17f0af5e8ead031340a8f5
MD5 5d63e72b422be6b7e363f74237b10b76
BLAKE2b-256 c9a8aab3292e9788d16a3372a568ee6642099223cdc28e1ec98cf2f7d1e94682

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 17d54b990293b247fb3b726a809b6a9479edee11c54cb4db117139e1cc60a9e7
MD5 de53de00c4dbdaa8e286d23f08313f9b
BLAKE2b-256 dbce36bc9c8bc2f5d06c21f7e55af4a0b5cb29476772e06ddf1e5739ec9d36fd

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b641a1d816ae0c6f566273f318ca3756f146bf41c8318a4087ed2f896712caee
MD5 07c0dfb9fe68ab7eeb1ad3e853b8424c
BLAKE2b-256 59c8d803dc6515472e58bc7d643becf19ce11018cfebab4e9e3eb48875a46b13

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d81efa828e0d276102afdcb8a0859ff6cbf19454ce4cd69c18657915cd0786c7
MD5 13ec9127a855c430cde56f320c068213
BLAKE2b-256 0cedaa0feeac79a66ee4b612831c10c83c4e4f94c2bb4a581e3fffb562fa1c31

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ed42a27f921b7129307082a42abd418f6e34d6f11edc47822da264bd7149919
MD5 445ea6e583b116e3b32441c18ccaeeed
BLAKE2b-256 cc2bdc68301f0d59d9fa0a371dcc52f0b83b42dade5b67863d31dd1d2065dc1a

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d4194c82fe4b0f84fea6db344faaa79cd0c8a2853e66d0d3be3b640437027018
MD5 30e6939968331e854efc7795f67be209
BLAKE2b-256 4d8b2c3d31551a5ff62f5fbe3dae9416b70b70670b653afe7180582daad898da

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a717c7f2174520e8d72c81d390a37b7e3f55da833454b189cc4b20948098c6d7
MD5 6d168322f2990b26a5b2a103cf9d1fc7
BLAKE2b-256 bbf56724694f7a1c037acf0cbf71df149eb669b75de9f1bb822f423162afb1cd

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 07c8b37c80d78c01ecd6f9a8fb457d8afee650614e5fa4952d296d312e7e8c84
MD5 3d48c6e02a6511edc8ed002aa6a5175e
BLAKE2b-256 b4fa15c9bc1d6b3017f7de63f8089e3fd19892579a119a86af9bcccd3360a77c

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01fe9c0a8e47b9ad158ce68c6f0fbb3187c2e433b672863a77d0ad79281eb8e7
MD5 c1ee2d29041fcc0f5339a1a0e52255ad
BLAKE2b-256 d7dd879832681df46c956d6ea4ab7bccadac5cfb9557f11edc18c13da5c87666

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2415a1f8c2a5012d4b5fb4c9084291c4488787ec3a1b4b621143c555a3c7ad2f
MD5 8b10428b4b6e9dd0bd27fe028c23908a
BLAKE2b-256 44e0794054783b840b973282c441adec631517e372b809226cabf406a95f6e45

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 35338e1ff86c4ee98bbb5cc55b5c497b9e3435d676c4cf2593156be9d8a53410
MD5 f54809e617def6699bf97d579f035bf9
BLAKE2b-256 1118f625350123c6eed3a48fcc4093f1ed2225867d444e5928bf02e79bd7eddf

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05150b76ff1f1a747bdbee575d5bf355edf2352fe46dbacb1125ffbc6d80bcc9
MD5 4cf80d9a32ecc0e4722a5bad30f19c32
BLAKE2b-256 98c2c3b84d2fb07d98db48efb13c20c184d0134939ca1e6c6ff5b99ec328088e

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 130ea802d191206a4ec27b9718428dbddb8559d146e31e868aaebd4700549cd9
MD5 0891b3b3ee089c4d8156ece28f1efb0c
BLAKE2b-256 53516fdc039223c5f38fc43e790851148d1bb7698ccdd62832dbfbf7e5e0920c

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1ff55c3fe2cc529c812107c4cdd665fe39dceb45de37dbac454ff262b7e4189b
MD5 a79a6d8803d0a8784b3ee6b9d02922d4
BLAKE2b-256 7d081e3f13f4219613d4c33b6280fb39b60143924dff6eac59a3ebeec786e79e

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 44a8857d421daa0b93a5315147cc4b9e6e8e3fbd9fdcd0f9be0950ffaa3dbb6d
MD5 6548b812637fa85cd53881d72afe203b
BLAKE2b-256 73c4391784dc3e1355693037466ab490fed148e7301c4d2a704128b9f9260e96

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 21a0d74c3994dac348fbbe840d7744563e71d9af3f972b7a036426dcf7a8b68d
MD5 802a1e88c1a02b655b84bf150b0cd2fd
BLAKE2b-256 b607a85ee4d17c2beab8f5e2678ff3d2a626203ec42f4e469aa845c70832ca7c

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4a55d8f83c6217ed8abc7ed535b7b5881bbf5bd37fae6602a6a998e76bd0dcb2
MD5 82eaa1a3d83b148f42051806bbc8d10b
BLAKE2b-256 398ae51bcb2737114860741274b05bbe2f1e250d3fdab663a0a34d4b2296edd7

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2807a9496133547899c5ab51eb38a4fe8d7f006b2792ed7a9a8ed31d31f13950
MD5 fac605aa3f4cf31165624ab1c2b4a5ff
BLAKE2b-256 3a97b2aa7f298eb07393cf1d685fbe6527c4893ec86bfaf28ca2958c088e2fef

See more details on using hashes here.

File details

Details for the file python_unsio-1.0.1rc1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for python_unsio-1.0.1rc1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 de34523a3b2e94dbff66fdb72ee74c62035d388887cc86f2a99e28422dc58a3d
MD5 dd01a3d3b7b0d9747fcdda852c5bf34f
BLAKE2b-256 4b8a214aaf466715717aef2c6db50fdcc525e9720ddde3ef5e5ce4a07f5867ac

See more details on using hashes here.

Supported by

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