LaueGo interfaces#
The lauego function runs the peaksearch, pix2qs, and euler programs and writes intermediate text files beneath an output directory.
New code should use the in-process API. The LaueGo function remains documented so existing workflows can migrate without assuming identical behavior.
Current interfaces#
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.
Recommended replacement#
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.
Keeps peak and pattern data in memory.
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 replacement |
|---|---|
|
|
|
|
Peak arguments |
Fields of |
Index arguments |
Fields of |
|
|
|
|
|
|
|
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 |
Migration procedure#
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 compatibility signature.