pyextal.jaxGeo.settings ======================= .. py:module:: pyextal.jaxGeo.settings .. autoapi-nested-parse:: Every option of a refinement, in one place. `RefineSettings` is what `jaxGeo.refine.refine` runs and what the command line (`jaxGeo.cli`) fills in; the command line takes its defaults from an instance, so a script sets dataset defaults by building one. `resolved` checks the options against each other and returns a copy with every field in canonical form, so the Python API and the command line accept the same spellings. Attributes ---------- .. autoapisummary:: pyextal.jaxGeo.settings.GEOMETRY pyextal.jaxGeo.settings.PROBE_RANGE pyextal.jaxGeo.settings.SF_MASKS Exceptions ---------- .. autoapisummary:: pyextal.jaxGeo.settings.SetupError Classes ------- .. autoapisummary:: pyextal.jaxGeo.settings.RefineSettings Functions --------- .. autoapisummary:: pyextal.jaxGeo.settings._tuple pyextal.jaxGeo.settings._hkl Module Contents --------------- .. py:exception:: SetupError Bases: :py:obj:`ValueError` A dataset, file or option problem found before anything is refined. .. py:data:: GEOMETRY :value: ('gl', 'rotation', 'tiltx', 'tilty') .. py:data:: PROBE_RANGE :value: (0.05, 3.0) .. py:data:: SF_MASKS .. py:function:: _tuple(value, kind) A comma-separated string or a sequence, as a tuple of ``kind``. .. py:function:: _hkl(value) ``'1,0,0'``, ``(1, 0, 0)`` -> ``(1, 0, 0)``. .. py:class:: RefineSettings Options for `jaxGeo.refine.refine`. Field names match the command-line options (``geo_max_block`` is ``--geo-max-block``); the command line's ``--help`` describes each. .. py:attribute:: h5 :type: Optional[pathlib.Path] :value: None .. py:attribute:: dat :type: Optional[pathlib.Path] :value: None .. py:attribute:: subsample :type: int :value: 2 .. py:attribute:: reflections :type: Union[str, int, tuple] :value: 'review' .. py:attribute:: review_dir :type: Optional[pathlib.Path] :value: None .. py:attribute:: symmetry :type: Optional[str] :value: None .. py:attribute:: imag :type: str :value: 'none' .. py:attribute:: layers :type: int :value: 1 .. py:attribute:: layer_fractions :type: Optional[Tuple[float, ...]] :value: None .. py:attribute:: refine_layers :type: Optional[Tuple[int, ...]] :value: None .. py:attribute:: diagonalise_measured :type: bool :value: True .. py:attribute:: steps :type: int :value: 800 .. py:attribute:: warmup :type: int :value: 5 .. py:attribute:: lr :type: float :value: 0.0001 .. py:attribute:: tile :type: int :value: 32 .. py:attribute:: thickness_window :type: float :value: 0.2 .. py:attribute:: scale_window :type: float :value: 0.05 .. py:attribute:: background_window :type: float :value: 0.05 .. py:attribute:: kernel_radius :type: int :value: 4 .. py:attribute:: voigt :type: bool :value: True .. py:attribute:: probe_sigma_start :type: float :value: 0.5 .. py:attribute:: probe_gamma_start :type: float :value: 0.5 .. py:attribute:: tilt_batch :type: Optional[int] :value: None .. py:attribute:: sim_batch :type: Optional[int] :value: None .. py:attribute:: sim_memory :type: float :value: 1.5 .. py:attribute:: memory_warn :type: float :value: 8.0 .. py:attribute:: figure :type: Union[pathlib.Path, str, None] :value: 'auto' .. py:attribute:: history :type: bool :value: True .. py:attribute:: logy :type: bool :value: False .. py:attribute:: notes :type: str :value: '' .. py:attribute:: dry_run :type: bool :value: False .. py:attribute:: cpu :type: bool :value: False .. py:attribute:: precision :type: str :value: 'highest' .. py:attribute:: geometry :type: bool :value: True .. py:attribute:: geo_start :type: int :value: 100 .. py:attribute:: geo_every :type: int :value: 100 .. py:attribute:: geo_params :type: Tuple[str, ...] :value: ('gl', 'rotation', 'tiltx', 'tilty') .. py:attribute:: geo_iters :type: int :value: 8 .. py:attribute:: geo_hessian :type: str :value: 'auto' .. py:attribute:: geo_max_block :type: Optional[float] :value: None .. py:attribute:: geo_tile :type: Optional[int] :value: None .. py:attribute:: geo_step_gl :type: float :value: 0.01 .. py:attribute:: geo_step_rotation :type: float :value: 0.2 .. py:attribute:: geo_step_tilt :type: float :value: 0.02 .. py:attribute:: geo_trust :type: float :value: 1.0 .. py:attribute:: geo_refresh :type: float :value: 2.0 .. py:attribute:: geo_lambda :type: float :value: 0.001 .. py:attribute:: geo_tol :type: float :value: 1e-05 .. py:attribute:: geo_check :type: bool :value: False .. py:attribute:: oversub :type: Tuple[Tuple[int, int, int], ...] :value: () .. py:attribute:: oversub_start :type: Optional[int] :value: None .. py:attribute:: oversub_leak :type: bool :value: True .. py:method:: resolved() Checks the options and returns a canonical copy. :returns: ``reflections`` as 'exported'/'review'/int/tuple of triples, ``symmetry`` decided, ``layer_fractions`` normalised to sum to one, ``refine_layers`` and ``geo_params`` as tuples, ``oversub`` as triples and ``oversub_start`` filled in. :rtype: RefineSettings :raises SetupError: On any inconsistent or unknown option. .. py:property:: frozen_layers 0-based layers whose structure factors are held (``OptConfig.frozen_layers``). .. py:method:: field_names() :classmethod: