5.3. Updating your instrument plugin for PyMoDAQ 4
5.3.1. What’s new in PyMoDAQ 4
5.3.2. What should be modified
Mostly the only things to be modified are imports that should reflect the new package layout. This includes
import in obvious files, for instance imports in the
DAQ_Move_template plugin, see Fig. 5.62.
Some imports are a bit more insidious. Indeed, often there is no specific code in the
__init__.py files we see
everywhere in our modules. But in the plugins, there is a bit of initialization code, see for
instance Fig. 5.63 so make sure you changed the imports in all these
And that’s it, they should be working now!
If your instrument plugin has been written from a recent version of the template (say early 2023)
then the only
__init__.py file to be modified is the one in figure Fig. 5.63 but
otherwise you’ll need to modify most of them…sorry :-(
18.104.22.168. Data emission
But to make things very neat, your detector instrument plugins should emit no more lists of DataFromPlugins objects but a DataToExport emitted using new signals, see Emission of data.
And for the final bit, make sure to add a dependency to
pymodaq >= 4.0.0 in the
package requirements, see Fig. 5.64. With this, the Plugin Manager will know
your plugin is compatible and will propose it to installation.