LaueGo interfaces#
The lauego function runs the LaueGo-derived peaksearch, pix2qs, and euler programs and writes intermediate text files beneath an output directory. The original Igor Pro suite is credited in acknowledgments and citations.
Use this interface when you need the command-line programs and their intermediate files. For processing in Python with NumPy results and exceptions, use the in-process API described below. The two interfaces differ in their arguments, return types and error handling.
Run the subprocess pipeline#
from lauelab.indexing import lauego
The function returns an IndexingResult, documented in the LaueGo API reference. It reports success through fields such as success and error and stores output paths, logs, command history, counts, parsed LaueGo structures, and an optional XML path.
The LaueGo pipeline can report overall success after a later stage fails or produces no output. Applications must inspect its returned fields and logs. This differs from the exception model used by Indexer.
Run indexing in process#
Use index_frame() for one frame:
from lauelab.indexing import index_frame
result = index_frame(
"frame.h5",
geometry="geometry.xml",
crystal="crystal.xml",
)
Use Indexer when processing several frames with shared configuration.
The in-process path:
Returns
FrameResultinstead ofIndexingResult.Raises exceptions for invalid input and native failures.
Returns peak and pattern data as NumPy arrays.
Does not create intermediate text files.
Writes XML only when you call an XML method.
Has no subprocess timeout because it does not launch the three indexing programs.
Parameter mapping#
LaueGo argument |
In-process argument or operation |
|---|---|
|
|
|
|
Peak arguments |
Fields of |
Index arguments |
Fields of |
|
|
|
|
|
Must be |
|
An explicit |
|
The path passed to |
|
No replacement in the in-process API |
|
Load or construct an array and pass it as |
The LaueGo peak_shape argument commonly uses "L" or "G". PeakParams.peak_shape requires the full spelling: "Lorentzian" or "Gaussian".
In both APIs, threshold_ratio=None uses the native default of 4.0; the LaueGo path does this by omitting the -T command option. In the in-process API, threshold=None selects automatic thresholding, and threshold_ratio controls its scale.
Result mapping#
LaueGo result |
In-process result |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
The path your application passes to |
|
Normal return or a raised exception |
|
No intermediate-file equivalent |
|
No subprocess equivalent |
Switch to in-process indexing#
Move peak-search values into
PeakParams.Move orientation values into
IndexParams.Construct one
Indexerfor each shared geometry, crystal, detector, and parameter configuration.Replace LaueGo result-field access with
FrameResultproperties and arrays.Catch
InputError,IndexingError, andMemoryErrorat the application boundary.Add explicit XML writes only where a downstream consumer requires them.
Remove assumptions about intermediate peak, pixel-to-q, and indexing files.
Compare migrated results against representative LaueGo output before changing scientific settings.
See the LaueGo API reference for the complete subprocess signature.