Skip to content

Changes to facilitate adding new instruments

Zamaan Raza requested to merge default-names into main

The goal of this MR is to simplify instantiation of the Diffractometer components, making it easier to understand when implementing new instruments. To a large extent, this has meant imposing some basic rules on instrument construction and removing a lot of default and "name" constructors which tended to result in incomplete objects and confusing states.

A side effect of these changes is that most default names are no longer necessary. In general a component name should be initialised via a YAML node, and as such all necessary information will be contained in the instrument definition .yml file. As such, most default names (kw_****DefaultName in DataKeys.h) have been discarded.

  • Prevent default and std::string "name" construction of Component, Gonio, Sample, Source, Detector, Monochromator and Axis classes (and derived classes).
  • Remove many default names that are no longer necessary
  • Allow default construction of Project and Experiment since name/diffractometer are not known before a hdf5 file is loaded
  • Give Experiment ownership of Diffractometer (previously owned by DataHandler).
  • Make names generated by generateNames methods more human-readable

Resolves #672 (closed), #652 (closed)

Edited by Zamaan Raza

Merge request reports

Loading