=======================================
Python packages for scientific research
=======================================
This page lists some useful packages for scientific research with Python. If you are new to Python, start with the introductory tutorials of the :doc:`reScipy lectures ` to learn how to use this programming language to perform data analysis.
Packages are divided into different categories, depending on the application domain, with a link to the relevant section of the lectures. Many of these packages are already included in the most common Python distributions, others can be installed as explained in their documentation or in the :doc:`Packages installation ` appendix.
Environments
============
See :doc:`Python language ` for a brief introduction to these packages.
* `jupyterlab `_ | Extensible user interface for interactive and reproducible computing.
* `spyder `_ | Integrated development environment for scientific data analysis.
Data structures
===============
See :doc:`Data handling ` for a brief introduction to these packages.
* `numpy `_ | Multi-dimensional arrays and matrices, with a collection of high-level mathematical functions to operate on them.
* `pandas `_ | Data structures and operations for manipulating columnar and tabular data, built on NumPy.
* `xarray `_ | Labeled multi-dimensional NumPy-based arrays with dimensions, coordinates and attributes.
NeXus/HDF5
==========
See :doc:`Data handling ` for a brief introduction to these packages.
* `nexusformat `_ | Python API to open, create, and manipulate NeXus data written in the HDF5 format.
* `nxarray `_ | xarray extension for high-level NeXus file input and output.
Core plotting libraries
=======================
See :doc:`Plotting ` for a brief introduction to these packages.
* `matplotlib `_ | Core plotting library for Python and NumPy arrays.
* `bokeh `_ | Plotting library for interactive visualization in web browsers.
High-level plotting
===================
See :doc:`Plotting ` for a brief introduction to these packages.
* `seaborn `_ | High-level interface to make plotting with matplotlib quick and effective.
* `hvplot `_ | High-level plotting library to quickly produce bokeh plots from pandas and xarray objects, based on holoviews.
* `holoviews `_ | Descriptive data plotting built on top of matplotlib and bokeh.
Data analysis
=============
See the related websites and the documentation links provided for an exhaustive description of these packages.
* `mantid `_ | General-purpose graphical user interface and Python library to support the processing of materials-science data.
* `scipy `_ | Performant algorithms for scientific computing such as optimization, integration, interpolation, algebraic equations, differential equations (see also `Scipy : high-level scientific computing `_ and `Image manipulation and processing using Numpy and Scipy `_).
* `scikit-image `_ | Collection of algorithms for image processing (see also `Scikit-image: image processing `_).
* `lmfit `_ | Advanced high-level interface for non-linear optimization and curve fitting.
* `nexpy `_ | Graphical user interface to easily access and analyse NeXus data (see in particular `NeXpy - Python Graphical User Interface `_).
Visualization and dashboarding
==============================
If you are specifically interested in an overview of the packages for data visualization and dashboarding then `pyviz.org `_ is what you are looking for. In the following are listed some of these packages.
Multi-dimensional visualization
-------------------------------
* `ipyvolume `_ | Library to visualize 3d volumes and 3d scatter plots in jupyterlab.
* `mayavi `_ | Visualization of scalar, vector and tensor data in 2d and 3d (as Python module or through graphical user interface).
Dashboarding
------------
* `streamlit `_ | Framework to quickly build shareable web apps from scripts.
* `panel `_ | Library to create custom interactive web apps and dashboards with user-defined widgets.
* `voila `_ | Conversion of Jupyter notebooks into shareable interactive dashboards.
* `ipywidgets `_ | Widget library to build interactive user interfaces within jupyterlab.