Exceptions#
The in-process API uses package-specific exceptions for invalid inputs and
native indexing failures. Native allocation failures use Python’s built-in
MemoryError.
- exception lauelab.indexing.LaueError[source]#
Base class for errors reported by the in-process indexing API.
Notes
Native allocation failures are reported as the built-in
MemoryErrorrather than as aLaueErrorsubclass.
- exception lauelab.indexing.InputError[source]#
Invalid geometry selection, parameters, frame data, or metadata.
This exception is both a
LaueErrorand aValueError, so callers may catch it either as a package-specific error or as invalid input.
- exception lauelab.indexing.IndexingError[source]#
Numerical or internal failure in a native indexing stage.
This exception is both a
LaueErrorand aRuntimeError. Its message identifies the failed stage and includes the native diagnostic.
- exception lauelab.indexing.NumericalIndexingError[source]#
Expected numerical failure for one frame in a native indexing stage.
A subclass of
IndexingError, so existing callers catching that base class still handle it. Incremental indexing continues after this exception; otherIndexingErrorfailures stop the worker run.
- exception lauelab.indexing.ReconstructionError[source]#
Runtime failure in the in-process reconstruction pipeline.
- exception lauelab.indexing.InvalidResultsFile[source]#
An indexing-results HDF5 file is structurally inconsistent or incomplete.
Raised by
validate_results_file()when the format marker is present but a dataset is missing, has the wrong dtype or shape, row counts disagree, offsets do not partition their rows, frame identities repeat, or the file does not match the identities the caller expected. A file that cannot be opened at all raisesOSErrorinstead.
- exception lauelab.indexing.InvalidScanFile[source]#
A reconstruction-scan catalog or point file is unsupported or inconsistent.
Raised by
validate_scan_file()andScanReaderwhen the format marker or version is wrong, including the retired single-file layout; a dataset is missing or has the wrong dtype or shape; catalog rows disagree; a finished or cancelled run lists a pending or writing point; point IDs or point paths are unsafe or repeat; or a catalog row is inconsistent. A valid catalog can still list points that are not complete.Raised by
PointReaderandpoint()when a point file is not a complete point file of a supported version or its metadata disagrees with the catalog. A file that cannot be opened at all raisesOSErrorinstead.
- exception lauelab.indexing.WorkerError[source]#
Failure of the parallel indexing machinery rather than of one input.
Raised by iteration over
FrameOutcomeswhen a worker could not initialize its indexer, a worker raised an exception that is not an expected input error, or the worker pool broke, for example because a process was killed. Expected per-input errors are reported inFrameOutcome.errorinstead and never raise this.