Data types and file formats#

Working with data requires the definition of appropriate “containers” to store that data. On the one hand, during program runtime, one must choose the data structure of the variables. This is a standard topic of most lectures on programming and we will only briefly skim over the common data types in Python. On the other hand, at the end of program execution, the results must be exported into some file format for later access. We will discuss some common text and binary formats as well as how to read or write them with Python.

Note

Don’t forget about metadata. The bare results of a simulation typically fail to capture all of its features. It’s of utmost importance to also include the metadata. This includes of course the input parameters (and units thereof), details of the related experimental setup, but also the version (or commit sha) of the programs used to run the code and perform the data analysis.

Index#