You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: PowerMeterDevice baked wavelength-calibration hooks directly into
the base class even though not every meter calibrates by wavelength, and
there was no way to introspect what a given meter can do. The laser-source
family already solves this with interface-segregated Capability mixins, but
the power meters did not mirror that structure.
Solution: Introduce hardwarelibrary/powermeters/capabilities.py with a
Capability ABC and three orthogonal mixins matching the sources/ pattern:
WavelengthCalibratable (wavelength hooks moved out of the base),
AutoScalable (toggle automatic ranging), and ScaleAdjustable (read/set the
manual full-scale range and enumerate available scales). PowerMeterDevice
now keeps only the always-present doGetAbsolutePower hook and gains
capabilities()/hasCapability() introspection copied from LaserSourceDevice.
IntegraDevice and FieldMasterDevice declare WavelengthCalibratable; their
existing hooks satisfy the contract unchanged. Adds TestFieldMasterCapabilities
covering the introspection API.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments