Table Of Contents

Next topic

Create a new data file


pyHMSA is a pure Python implementation of the MSA / MAS / AMAS HyperDimensional Data File (HMSA, for short) specifications. This file format is intended to be a common exchange format for microscopy and microanalysis data. More information about the file format and its specifications can be found here.

The library is designed to be minimalist, leaving post-processing of the data to the user’s script. The only dependency of pyHMSA is to NumPy, in order to represent the multi-dimensional data.

pyHMSA is written to support both Python 2 and 3.

The library is provided under the MIT License.

pyHMSA was developed as part of the doctorate thesis project of Philippe T. Pinard at RWTH Aachen University (Aachen, Germany) under the supervision of Dr. Silvia Richter.


The API follows closely the name convention, hierarchy and parameter names of the HMSA specifications. The type of conditions and datasets available can be found below.

The main object of the library is the DataFile which regroups in a single object the Header, Conditions and datasets. HMSA files can be created, read and written from this object.

Other classes of the library used to define data types, to read and write HMSA files as well as some utilities can be found here:


The source code of the library can be viewed/forked/downloaded on GitHub.