.. _installation-label:
1. Get NDLab
------------
**NDLab** can be downloaded from `GitHub `_
Decompress the file *ndlab_db.s3db.zip* in the same directory, keeping the resulting file name as *ndlab_db.s3db*.
This is what should be listed in the installation directory:
::
ndlab_db.s3db
ndlab_db.s3db.zip
ndlab-tutorial.ipynb
ndlab.py
ndlabdblink.py
ndlaborm.py
| The zip file can then be removed.
| A Notebook tutorial is available in *ndlab-tutorial.ipynb*
2. Dependencies
---------------
**NDLab** uses the `uncertainties `_ page, wich can be installed using
::
$ pip install --upgrade uncertainties
3. Test it's working
---------------------
**Open** a Python shell and issue the following statements
::
>>>
>>> import ndlab as nl
>>>
>>> # check if the database is reachable
>>> nl.dblink.connected
True
>>>
>>> # try a simple data retrieval
>>> print(nl.csv_data("NUCLIDE.Z","NUCLIDE.NUC_ID = '135XE'"))
z
54
>>>
4. Optional packages
--------------------
Pandas and Plotly
~~~~~~~~~~~~~~~~~
To run the NDLab Notebook tutorial you will find useful `plotly `_ for data visualization, and `pandas `_ for data analysis
To install plotly:
::
$ pip install plotly
# to work with Jupyter lab
$ pip install ipywidgets
$ jupyter labextension install jupyterlab-plotly
To install pandas:
::
$ pip install pandas
SQLite DB Browser
~~~~~~~~~~~~~~~~~
| Description and schema of the underlying SQL database are presented `here <./schema/index.html>`_.
| The engine is `SQLite `_. To directly access it with a graphical interface, download the `DB Browser for SQLite `_
5. Change log
--------------------
Version v.0.2.2db.0.2.3-beta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nuclear Moments from N.J. Stone, more coding examples
Version v0.1.2.db.0.2.2-beta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| More robust parsing of the query parameters
Version v0.1.1.db.0.2.2-beta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The energy and intensities of neutrini emitted by electron capture process where added to the database.
| See the `ndlab.Dr_nu `_ class, and the `ndlaborm.DR_NU entity `_
Version v0.1.1.db.0.1.1-beta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First test release