Abstract
Over the past decade, the Scientific Python ecosystem has matured into a fully fledged data analysis environment. Python, as a language for science, draws strength from being a general purpose programming language: its ecosystem extends far beyond that of a scientific-only language. For example, Python has high-quality tools that can be used to ingest data from the internet or to control acquisition hardware, process the resulting data, store it in a database, and present it to collaborators via a web application or through interactive notebooks. But Python has also seen rapid adoption in scientific computing itself, and there now exists a variety of libraries for handling N-dimensional array computation, processing table data, calculating scientific functions, plotting results, and disseminating results as programs accompanied by rich, interactive documents. Python is also prominent in data science [1] and the key player in machine learning [2]-specifically, deep learning, which has seen an explosion of applications in microscopy. Assessing the needs of a typical data analyst in microscopy, we identify key challenges along with the libraries that address them: • Numerical data processing: Regardless of whether experiments deal with images or other input formats, they all have associated numerical data-often best represented as arrays of numbers. Examples are 1-dimensional arrays for time-series, and 3-dimensional arrays for single-band volumetric data. The NumPy library [3] provides N-dimensional arrays, with methods for performing associated calculations. NumPy is under active development, both by its community, and a team funded by the Moore & Sloan Foundations at the Berkeley Institute for Data Science. Other prominent packages in this space include xarray [4], which provides labeled axes for N-dimensional arrays, and zarr, which implements chunked, compressed, N-dimensional arrays. • Image processing: Almost all forms of microscopy involve image processing, such as segmentation, de-noising, morphological analysis, region analysis, feature detection, and registration. scikit-image is a library with roots in two-dimensional image processing that has since been developed to include many N-dimensional capabilities. The term scikit (SciPy toolkit) indicates a package that is developed separately from the SciPy library, but according to similarly rigorous standards, often using the same processes, documentation formats, and so forth. • Visualization: Matplotlib has long been the de-facto standard in Python for producing high quality, 2D publication figures. More recently, a number of web-enabled packages have emerged, such as Bokeh for interactive 2D display, and ipyvolume and ITK Jupyter Widgets for interactive 3D visualization in Jupyter notebooks. spimagine provides accelerated 3D visualization of time lapsed volumetric data, and Mayavi [5] delivers general 3D visualization through VTK. This space is still actively developing. • Parallel processing / batch pipelines: Acquisition, especially on modern devices, produce large volumes of data, which often cannot be processed on a single laptop. The dask library provides mechanisms for developing code on a laptop, that can subsequently be executed on multiple cores, or multiple machines (nodes). It provides integration with cluster batch submissions systems such as SLURM, and can launch workers in the cloud through, e.g., Kubernetes. Task progress can be monitored via a browser dashboard.
Cite
CITATION STYLE
van der Walt, S. (2019). Scientific Python: A Mature Computational Ecosystem for Microscopy. Microscopy and Microanalysis, 25(S2), 132–133. https://doi.org/10.1017/s1431927619001399
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.