Tools to simplify the use of URANIE with python
Project description
uratools
This Python module provides tools to simplify the use of URANIE with Python
uratools aims to provide a multitude of utilities designed to enhance the user experience, particularly by facilitating ports to NumPy, interfacing Uranie with Python machine learning libraries (PyTorch, TensorFlow, and scikit-learn), and providing tools for fitting empirical distributions and generating plots easily. It will be updated regularly.
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
- Uratools documentation https://uratools-508bc1.gitlab.io/
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
Documentation is available on this page https://uratools-508bc1.gitlab.io/
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
Support
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 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-1.0.0.tar.gz.
File metadata
- Download URL: uratools-1.0.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e3dbf326a61835afa92df6fe5a7f9f8ad3615d615d31e30b64656842c2ae25
|
|
| MD5 |
9f76598ed31183f49d44b8ae0928e58e
|
|
| BLAKE2b-256 |
41b0a739fd1006bdb4e84e5111e108b40c83156ab82d88dca9d945a919c179b7
|
File details
Details for the file uratools-1.0.0-py3-none-any.whl.
File metadata
- Download URL: uratools-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aff1ce696c32449688e34ec774517f548a47d7a3de0bba0b9b8290a1e1161b07
|
|
| MD5 |
d3c49a93cb18b7cb0ead914783cf1ae6
|
|
| BLAKE2b-256 |
f499108c1a32c8902342514abcea77edd9d7abae259290f95e4ff84d4f888d1d
|