qudi icon indicating copy to clipboard operation
qudi copied to clipboard

Added scripting helper methods

Open alrik-durand opened this issue 3 years ago • 1 comments

Description

This PR adds general helper methods to multiple logic modules : time series, poi manager and odmr logic. These are non breaking change. The helper at the end of the logic files are meant to be called by scripts or tasks within their own threads.

Motivation and Context

These changes simplify the use of Jupyter notebook (or tasks) by defining helper methods that are not used by the module itself at the end of the file. This is something that was already being done in Qudi like for example perform_odmr_measurement of odmr_logic.

How Has This Been Tested?

All the methods have been tested with dummy hardware and behave as expected.

Screenshots (only if appropriate, delete if not):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] I have documented my changes in the changelog (documentation/changelog.md)
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added/updated for the module the config example in the docstring of the class accordingly.
  • [x] I have checked that the change does not contain obvious errors (syntax, indentation, mutable default values).
  • [ ] I have tested my changes using 'Load all modules' on the default dummy configuration with my changes included.
  • [x] All changed Jupyter notebooks have been stripped of their output cells.

alrik-durand avatar Aug 17 '20 10:08 alrik-durand

I think adding scripting methods to the logic modules is not a good coding practice. It bloats the already big logic modules even more and does not contribute to the respective logic "API". In other words the logic should not contain its own wrapper. Adding small scripts to facilitate scripted experiments sparked the idea of tasks in qudi. However the task runner and automation tool are non-functional and will be removed in a future release. But there will be a similar mechanic in the new core release to use scripting objects inspired by the old task logic.

Neverhorst avatar Jan 26 '21 17:01 Neverhorst