MULTEM is a powerful and advanced collection of C++ routines with CUDA support, designed to perform efficient and accurate multislice simulations for various TEM experiments such as HRTEM, STEM, ISTEM, ED, PED, CBED, ADF-TEM, ABF-HC, EFTEM, and EELS.
Changing the multem_input structure from a struct to a class object allows for validation of input parameters for type, value, and size. The class will only accept predefined properties and will throw errors when using wrong/deprecated parameters (e.g. from legacy scripts). All examples were updated accordingly.
Using
% The object is intialized by calling:
input_multem = multem_input.parameters;
% The former system_conf struct is now also a class objected, nested in the multem_input class:
input_multem.system_conf.precision = 1;
input_multem.system_conf.device = 2;
input_multem.system_conf.cpu_nthread = 1;
input_multem.system_conf.gpu_device = 0;
% All other assignments remain as they were
Documentation
The class implementation further provides a convenient way for minimalistic documentation of the input structure and its properties.
doc multem_input.parameters
Nested Classes & Functions
Classes are defined also for the detector and system_conf structures.
The class multem_input has a function toStruct which returns a struct-representation of the class. ilc_multem and other functions have been added to the class, so these functions can just be executed on the input object. e.g:
Changing the multem_input structure from a struct to a class object allows for validation of input parameters for type, value, and size. The class will only accept predefined properties and will throw errors when using wrong/deprecated parameters (e.g. from legacy scripts). All examples were updated accordingly.
Using
Documentation
The class implementation further provides a convenient way for minimalistic documentation of the input structure and its properties.
Nested Classes & Functions
Classes are defined also for the detector and system_conf structures. The class multem_input has a function
toStruct
which returns a struct-representation of the class.ilc_multem
and other functions have been added to the class, so these functions can just be executed on the input object. e.g: