WasatchPhotonics / ENLIGHTEN

Open-source spectroscopy application for controlling and taking measurements from Wasatch Photonics spectrometers.

Home Page:https://wasatchphotonics.com/product-category/software/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Preset to metadata

mzieg opened this issue · comments

To ensure the Preset is current and not just "last selected," we need to ensure Presets change to Select One when a registered supplier changes.

I don't want to litter the code with with countless classes calling ctl.presets.reset() along every path to a change in acquisition parameters.

What would be slicker would be an AcquisitionParameter class (or superclass?) which could trigger resets in PresetFeature, DarkFeature, ReferenceFeature etc. As an ABC, each could just call self.notify_changed(old=None, new=None). Notifications should include the class name, so ('IntegrationTimeFeature', old=100, new=200). Plugins would be able to subscribe to notifications as well (and issue them?)