General MC settings
MCSettings class
There is a pydantic-settings class called MCSettings which gets initialized, when importing diffsim. This class manages default device parameters and verbosity. The verbosity attribute manages the logging level and has to be either 0 (warning), 1 (info - default) and 2 (debug).
!!! Note
The device settings are only default settings. For them to have an effect on the MC simulation, they will need to be changed before creating the MC object.
You can change the settings with environment variables, starting with DIFFSIM_ e.g.:
DIFFSIM_VERBOSITY=2 python my_script.py
or by setting the settings directly:
from diffsim.mc import mc_settings
mc_settings.verbosity = 2
The default settings are as follows:
::: diffsim.mc.config.config.MCSettings options: show_root_heading: true show_bases: false members:
- fields show_signature_annotations: true signature_crossrefs: true separate_signature: true show_symbol_type_heading: true docstring_style: google docstring_section_style: table filters: ["!^_"] merge_init_into_class: true