picometer.settings ================== .. py:module:: picometer.settings Attributes ---------- .. autoapisummary:: picometer.settings.logger Exceptions ---------- .. autoapisummary:: picometer.settings.SettingsError Classes ------- .. autoapisummary:: picometer.settings.DefaultSettings picometer.settings.Settings Module Contents --------------- .. py:data:: logger .. py:exception:: SettingsError Bases: :py:obj:`KeyError` Custom `KeyError` raised when there are issues with `DefaultSettings` .. py:class:: DefaultSettings Store default values of all settings. Use `AnyValue` if no default. .. py:attribute:: auto_write_unit_cell :type: bool :value: True .. py:attribute:: clear_selection_after_use :type: bool :value: True .. py:attribute:: displacement_get_cartesian_eigenvalues :type: bool :value: False .. py:attribute:: complete_uiso_from_umatrix :type: bool :value: False .. py:attribute:: complete_umatrix_from_uiso :type: bool :value: False .. py:method:: get_field(key: str) -> dataclasses.Field :classmethod: .. py:class:: Settings(data: dict = None) Bases: :py:obj:`collections.UserDict` Automatically set self from `DefaultSettings` on init, handle settings .. py:method:: from_yaml(path=None) -> Settings :classmethod: .. py:method:: __setitem__(key, value, /) -> None .. py:method:: __delitem__(key, /) -> None .. py:method:: update(other: Union[dict, collections.UserDict] = None, /, **kwargs) -> None D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v