Tools to use URANIE with python
Project description
uratools
This Python module provides tools to simplify the use of URANIE with Python
URANIE
- Website: https://uranie.cea.fr/
- Python documentation: https://uranie.cea.fr/documentation/userManual_Py/index
- Installation: https://gitlab.com/uranie-cea/publication/-/wikis/home
Installation
pip install uratools
How to use it
Before using the package, ensure that URANIE is installed and properly sourced.
The python command to use the package is the following
from uratools import converter
You can get the doc by following commands
pydoc uratools
help(uratools.converter)
print(uratools.converter.ds2np.__doc__)
Example
import numpy as np
import ROOT
from ROOT.URANIE import DataServer, Sampler
from uratools import converter
## == np.array to DataServer
mA = np.random.randn(10,2)
tds = converter.np2ds(mA, "x1:x2") ## a DataServer.TDataServer is created from np.array
## == DataServer to np.array
tds = DataServer.TDataServer()
tds.addAttribute(DataServer.TUniformDistribution("x1",0.0, 5.0))
tds.addAttribute(DataServer.TNormalDistribution("x2",-2.0, 0.5))
sam = Sampler.TSampling(tds,"lhs",20)
sam.generateSample()
npA = converter.ds2np(tds) ## a np.array is created from a DataServer.TDataServer
Authors
- Rudy Chocat mailto:rudy.chocat@cea.fr
- Gabriel Sarazin mailto:gabriel.sarazin@cea.fr
- Julien Nespoulous mailto:julien.nespoulous@cea.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
uratools-0.0.0.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uratools-0.0.0.tar.gz.
File metadata
- Download URL: uratools-0.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7670b932277df0d3324dde0c0513b8153de4377e5a50469d3e5ad31f2a9a5b
|
|
| MD5 |
3b0db2d274169567e1cf4a8969efe025
|
|
| BLAKE2b-256 |
d694d676709c23d9a38f63b4e7a18c790ef06519e57b5498dbd2a882a32766ea
|
File details
Details for the file uratools-0.0.0-py3-none-any.whl.
File metadata
- Download URL: uratools-0.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8e19bfa0667d24687c1450197533434c45f926ad68ac4f3c8d450717779a3c1
|
|
| MD5 |
f04b6a41820aa1a961de771e44c30287
|
|
| BLAKE2b-256 |
c6f15972b96c96a4dfddf208553ff0626f2b07a57f6ec0e6600fa438683199ff
|