LaueGo API#

The LaueGo API invokes command-line executables and writes intermediate files. New integrations should use index_frame or Indexer from the Processing API.

Subprocess pipeline#

lauelab.indexing.lauego(input_image, output_dir, geo_file, crystal_file, *, boxsize=5, max_rfactor=2.0, min_size=3, min_separation=10, threshold=100, peak_shape='L', max_peaks=50, mask_file=None, threshold_ratio=None, smooth=False, index_kev_max_calc=30.0, index_kev_max_test=35.0, index_angle_tolerance=0.12, index_cone=72.0, index_h=0, index_k=0, index_l=1, depth_override=None, cosmic_filter=False, generate_xml=True, xml_output_file=None, timeout=300)[source]#

Run the LaueGo file- and subprocess-based indexing pipeline.

Parameters:
  • input_image (str) – Path to the input diffraction image.

  • output_dir (str) – Root directory for intermediate and final output files.

  • geo_file (str) – Path to the geometry file.

  • crystal_file (str) – Path to the crystal structure file.

  • boxsize (int) – Peak-search fitting box size in pixels.

  • max_rfactor (float) – Maximum peak-fit residual factor.

  • min_size (int) – Minimum peak size in pixels.

  • min_separation (int) – Minimum separation between peaks in pixels.

  • threshold (int) – Intensity threshold for peak detection.

  • peak_shape (str) – Peak model: "L" for Lorentzian or "G" for Gaussian.

  • max_peaks (int) – Maximum number of peaks to report.

  • mask_file (str | None) – Optional path to a peak-search mask file.

  • threshold_ratio (float | None) – Automatic threshold ratio. None uses the LaueGo executable default of 4.0.

  • smooth (bool) – Apply the LaueGo peak-search smoothing option.

  • index_kev_max_calc (float) – Maximum photon energy in keV for reflection calculation.

  • index_kev_max_test (float) – Maximum photon energy in keV for reflection testing.

  • index_angle_tolerance (float) – Angular indexing tolerance in degrees.

  • index_cone (float) – Indexing cone angle in degrees.

  • index_h (int) – Components of the preferred Miller-index direction.

  • index_k (int) – Components of the preferred Miller-index direction.

  • index_l (int) – Components of the preferred Miller-index direction.

  • depth_override (float | None) – Optional depth in microns written into the intermediate peaks file.

  • cosmic_filter (bool) – Cosmic-filter provenance value written to XML. This function does not itself apply a cosmic-ray filter.

  • generate_xml (bool) – Generate parsed XML output after the subprocess stages.

  • xml_output_file (str | None) – Explicit XML destination. By default a filename is derived beneath output_dir.

  • timeout (int) – Timeout in seconds for each subprocess.

Returns:

lauelab.indexing.IndexingResult – Status, output paths, counts, parsed LaueGo data, logs, and any error.

Return type:

IndexingResult

Notes

This compatibility API writes per-frame intermediate files and invokes the peaksearch, pix2qs, and euler executables. New code should use index_frame() or Indexer. index is an alias for this function.

LaueGo result#

class lauelab.indexing.index.IndexingResult(success, output_files, n_peaks_found, n_indexed, n_patterns_found, indexing_data, step_data, xml_file, log, error=None, command_history=())#

Result returned by the LaueGo subprocess indexing interface.

The result contains the overall status, generated output paths, peak and pattern counts, optional parsed LaueGo data, the XML path, logs, an optional error message, and the command history. New code should use FrameResult.