Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scripting helper methods #609

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

alrik-durand
Copy link
Contributor

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)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • 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.
  • 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.
  • All changed Jupyter notebooks have been stripped of their output cells.

@Neverhorst
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants