pyextal.jaxGeo.settings¶
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¶
Exceptions¶
A dataset, file or option problem found before anything is refined. |
Classes¶
Options for jaxGeo.refine.refine. |
Functions¶
Module Contents¶
- exception pyextal.jaxGeo.settings.SetupError¶
Bases:
ValueErrorA dataset, file or option problem found before anything is refined.
- pyextal.jaxGeo.settings.GEOMETRY = ('gl', 'rotation', 'tiltx', 'tilty')¶
- pyextal.jaxGeo.settings.PROBE_RANGE = (0.05, 3.0)¶
- pyextal.jaxGeo.settings.SF_MASKS¶
- pyextal.jaxGeo.settings._tuple(value, kind)¶
A comma-separated string or a sequence, as a tuple of
kind.
- pyextal.jaxGeo.settings._hkl(value)¶
'1,0,0',(1, 0, 0)->(1, 0, 0).
- class pyextal.jaxGeo.settings.RefineSettings¶
Options for jaxGeo.refine.refine.
Field names match the command-line options (
geo_max_blockis--geo-max-block); the command line’s--helpdescribes each.- h5: pathlib.Path | None = None¶
- dat: pathlib.Path | None = None¶
- subsample: int = 2¶
- reflections: str | int | tuple = 'review'¶
- review_dir: pathlib.Path | None = None¶
- symmetry: str | None = None¶
- imag: str = 'none'¶
- layers: int = 1¶
- layer_fractions: Tuple[float, ...] | None = None¶
- refine_layers: Tuple[int, ...] | None = None¶
- diagonalise_measured: bool = True¶
- steps: int = 800¶
- warmup: int = 5¶
- lr: float = 0.0001¶
- tile: int = 32¶
- thickness_window: float = 0.2¶
- scale_window: float = 0.05¶
- background_window: float = 0.05¶
- kernel_radius: int = 4¶
- voigt: bool = True¶
- probe_sigma_start: float = 0.5¶
- probe_gamma_start: float = 0.5¶
- tilt_batch: int | None = None¶
- sim_batch: int | None = None¶
- sim_memory: float = 1.5¶
- memory_warn: float = 8.0¶
- figure: pathlib.Path | str | None = 'auto'¶
- history: bool = True¶
- logy: bool = False¶
- notes: str = ''¶
- dry_run: bool = False¶
- cpu: bool = False¶
- precision: str = 'highest'¶
- geometry: bool = True¶
- geo_start: int = 100¶
- geo_every: int = 100¶
- geo_params: Tuple[str, ...] = ('gl', 'rotation', 'tiltx', 'tilty')¶
- geo_iters: int = 8¶
- geo_hessian: str = 'auto'¶
- geo_max_block: float | None = None¶
- geo_tile: int | None = None¶
- geo_step_gl: float = 0.01¶
- geo_step_rotation: float = 0.2¶
- geo_step_tilt: float = 0.02¶
- geo_trust: float = 1.0¶
- geo_refresh: float = 2.0¶
- geo_lambda: float = 0.001¶
- geo_tol: float = 1e-05¶
- geo_check: bool = False¶
- oversub: Tuple[Tuple[int, int, int], ...] = ()¶
- oversub_start: int | None = None¶
- oversub_leak: bool = True¶
- resolved()¶
Checks the options and returns a canonical copy.
- Returns:
reflectionsas ‘exported’/’review’/int/tuple of triples,symmetrydecided,layer_fractionsnormalised to sum to one,refine_layersandgeo_paramsas tuples,oversubas triples andoversub_startfilled in.- Return type:
- Raises:
SetupError – On any inconsistent or unknown option.
- property frozen_layers¶
0-based layers whose structure factors are held (
OptConfig.frozen_layers).
- classmethod field_names()¶