dara.search.core module

dara.search.core module#

Phase search module.

remote_expand_node(search_tree, nid)[source]#

Expand a node in the search tree.

Return type:

ObjectRef

search_phases(pattern_path, phases, pinned_phases=None, max_phases=5, wavelength='Cu', instrument_profile='Aeris-fds-Pixcel1d-Medipix3', express_mode=True, enable_angular_cut=True, phase_params=None, refinement_params=None, return_search_tree=False, record_peak_matcher_scores=False, rpb_threshold=2)[source]#

Search for the best phases to use for refinement.

Parameters:
  • pattern_path (Path | str) – the path to the pattern file. It has to be in .xrdml, .xy, .raw, or .rasx format

  • phases (list[Path | str | RefinementPhase]) – the paths to the CIF files

  • pinned_phases (list[Path | str | RefinementPhase] | None) – the paths to the pinned phases, which will be included in all the results

  • max_phases (int) – the maximum number of phases to refine

  • wavelength (Union[Literal['Cu', 'Co', 'Cr', 'Fe', 'Mo'], float]) – the wavelength of the X-ray. It can be either a float or one of the following strings: “Cu”, “Co”, “Cr”, “Fe”, “Mo”, indicating the material of the X-ray source

  • instrument_profile (str | Path) – the name of the instrument, or the path to the instrument configuration file (.geq)

  • express_mode (bool) – whether to use express mode. In express mode, the phases will be grouped first before searching, which can significantly speed up the search process.

  • enable_angular_cut (bool) – whether to enable angular cut, which will run the search on a reduced pattern range (wmin, wmax) to speed up the search process.

  • phase_params (dict[str, ...] | None) – the parameters for the phase search

  • refinement_params (dict[str, ...] | None) – the parameters for the refinement

  • return_search_tree (bool) – whether to return the search tree. This is mainly used for debugging purposes.

  • record_peak_matcher_scores (bool) – whether to record the peak matcher scores. This is mainly used for debugging purposes.

  • rpb_threshold (float) – the RPB threshold

Return type:

list[SearchResult] | SearchTree