Metadata-Version: 2.2
Name: uratools
Version: 0.0.0
Summary: Tools to use URANIE with python
Home-page: https://gitlab.com/uranie-cea/uratools/
Author: Rudy Chocat
Author-email: rudy.chocat@cea.fr
License: LGPLv3+
Keywords: URANIE
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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

```bash
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

```python
from uratools import converter
```

You can get the doc by following commands 

```bash
pydoc uratools
```

```python
help(uratools.converter)
```

```python
print(uratools.converter.ds2np.__doc__)
```



## Example

```python
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>
