Better error handling for `Peak3D` objects without assigned `UnitCell`
Many issues I've had with NSXTool result from attempting to access a UnitCell
member of a Peak3D
object that hasn't been assigned. This is broadly because the unit cell is assigned midway through the workflow, after autoindexing, unlike most other attributes of the Peak3D
object, which are assigned as soon as the peaks are found and integrated. This could take the form of checking for a nullptr
, or using std::optional
.
The same applies to the SpaceGroup
member of the UnitCell
object.