Metadata-Version: 2.1
Name: rng_rava_diag
Version: 1.2.0
Summary: RAVA Python Diagnostics
Author-email: Gabriel Guerrer <gabrielguerrer@gmail.com>
Project-URL: Homepage, https://github.com/gabrielguerrer/rng_rava_diag_py
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rng_rava>=2.0.0
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scipy
Requires-Dist: lmfit

# RAVA Python Diagnostics

The RAVA Diagnostics app introduces a test suite designed to evaluate the 
statistical properties of randomness produced by the RAVA circuit. It comprises 
three distinct sub-applications:

* Quick Tests: Conducted on relatively small samples generated in real-time 
  to detect significant errors within the RAVA circuit.

* Acquisition: Generation of large files comprising pulse counts, bytes, or 
  numbers extracted from an RAVA device. (This sub-app is imported from the
  [RAVA Python Driver](https://github.com/gabrielguerrer/rng_rava_driver_py) 
  package).

* Detailed Tests: Analyzes the statistical distribution of bias and correlation 
  metrics associated with the random bytes obtained through the Acquisition 
  module. Moreover, it explores the normality of pulse count distributions 
  across different sampling intervals. Additionally, it implements a 
  visualization of the reports generated by the 
  [NIST Tests](https://csrc.nist.rip/Projects/Random-Bit-Generation/Documentation-and-Software), 
  offering an insightful representation of its results.
  Lastly, a reporting feature generates a PDF file summarizing the information 
  from the Detailed Tests. This document is designed to facilitate the quality 
  assessment of a specific instance of the RAVA circuit.
  
The Diagnostics suite is an open-source implementation of the tests outlined in 
the article presenting the RAVA circuit. For more details, refer to
[IEEE Access, DOI: 10.1109/ACCESS.2023.3327325](https://ieeexplore.ieee.org/document/10295491).


## Installation and usage

The diagnostics code is available as the 
[rng_rava_diag](https://pypi.org/project/rng_rava_diag/) PyPI package. To install it, run:

```
pip install rng_rava_diag
```

Requirements: [rng_rava](https://github.com/gabrielguerrer/rng_rava_driver_py), [numpy](https://github.com/numpy/numpy),
[matplotlib](https://github.com/matplotlib/matplotlib), [scipy](https://github.com/scipy/scipy), [lmfit](https://github.com/lmfit/lmfit-py) 
- Windows: [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version)  <br><br>


To run the diagnostics app, execute:
```
python3 -m rng_rava_diag
```

<a href="https://github.com/gabrielguerrer/rng_rava_diag_py/blob/main/images/rava_diagnostics.png">
<img src="https://github.com/gabrielguerrer/rng_rava_diag_py/blob/main/images/rava_diagnostics.png" width="800">
</a>


## Documentation

- [RAVA Python Diagnostics - Statistical Tests](https://github.com/gabrielguerrer/rng_rava_diag_py/wiki/Statistical-Tests)


## Driver Compatibility

Regarding the [RAVA Python Driver](https://github.com/gabrielguerrer/rng_rava_driver_py): 
- Diagnostics version v1.0.0 is compatible with Driver v1.1.0
- Diagnostics version v1.1.0 is compatible with Driver v1.2.1
- Diagnostics versions >= v1.3.0 are compatible with Driver >= v2.0.0


## Associated projects

- [RAVA Device](https://github.com/gabrielguerrer/rng_rava)
- [RAVA Firmware](https://github.com/gabrielguerrer/rng_rava_firmware)
- [RAVA Python Driver](https://github.com/gabrielguerrer/rng_rava_driver_py)


## Contact

gabrielguerrer [at] gmail [dot] com

![RAVA logo](https://github.com/gabrielguerrer/rng_rava/blob/main/images/rng_rava_logo.png)
