microscope_parameters should adopt underscore prefix naming convention
The use of an underscore to denote global variables and constants is a fairly common coding convention, so eg sample_z
would become _sample_z
.
This has the advantage that global constants are immediately recognisable, and don't clash with local constants.
Some global constants have been defined as functions eg flex_dims()
- this is both unconventional and confusing, and also does not make the values recognisable as global constants.
A good rule of coding is not to invent a new convention when there is an existing convention that serves the purpose.