Revise SphericalDetector and OffspecDetector constructors

Concerns:

  • New Detector2D c'tor taking span and width arguments is inconvenient in connection with experimental data, which typically have metadata indicating the limits (from .. to) of axes.
  • On the other hand, if we simulate experiments for a given instrument, it is more natural to keep the spans fixed and only vary the centers.
  • Detector2D and OffspecDetector c'tors take different arguments (offspec still takes from .. to).
  • Example scatter2d/AxesInDifferentUnits is broken (#397 (closed)) as it involves removed c'tor FlatDetector.
  • Shall we support non-equidivided axes?
  • Shall we support axes with other units (degrees) or coordinates (qy, qz)?

Proposal:

  • Discuss how RefSans fits into this
  • Class Detector2D becomes RigidDetector
  • Class IDetector2D becomes Detector2D, and is no longer pure virtual
  • The Detector2D c'tor takes two axes as argument. For the time being, units must be rad.
  • RigidDetector becomes a factory function
  • We also provide factory function SphericalDetector that has the argument list of the former class of same name
Edited by Joachim Wuttke