There is something about initial caps that makes a title look all knowledgeable and authoritative. However, some modesty is in place when writing this post about scientific computing with Python, which is more about making a list of essential libraries for use in our research group.
In compiling this list, I hope to create some rest in face of the ever evolving scientific Python ecosystem, so that students will know what to use. Where possible, data analysis scripts in our research should rely solely on libraries from this canon.
The criteria for designing this list. The list should
- contain a limited number of libraries
- form a complete toolset for chemists and physicists doing spectroscopy
The criteria for the included libraries. These should
- be easy to install
- be well-maintained with an active and viable community
- be considered de facto standards for their specific use cases
- play well with the other libraries
The list
- numpy
- scipy
- matplotlib
- xarray
- h5py
- h5netcdf
- lmfit
- pillow
- tifffile
- tqdm
- pyserial
- spyder
- jupyterlab
True, Spyder and JupyterLab are not Python libraries, but they are our essential tools for interacting with Python, and can be included in the installation of a conda environment.
Other libraries worth considering
The following libraries are more specialized but can be very powerful in the thing they do.
- xarray-lmfit
- pyMCR
- spectrochempy
- coolprop
- pyfvtool
- remi
- nicegui
- marimo
- UltraPlot
Python version 3.12
We make a very conservative choice for the Python version, taking a version that has passed its ‘bugfix’ period, but which is still maintained in terms of ‘security’ updates. Then, we stick with this version as long as possible. The lag in adoption of a more recent Python version provides time for all packages on which we depend to transition to the new Python version. In the scientific Python eco-system, this updating takes time.
The current status of Python versions can be viewed here.
Hence, we are currently on Python 3.12, and will remain on 3.12 until October 2028. Then, we should switch to Python 3.15. If, for some reason, we need to be more modern about it, we could switch to 3.14 in October 2027. There is still time!