-
Notifications
You must be signed in to change notification settings - Fork 122
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
Make listener properties in StartLiveData dynamic #17926
Merged
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cc0b2f1
Refs #17912 Dynamically add listener properties
6bcdb11
Refs #17912 Specialize Python interface for StartLiveData
afb3468
Refs #17912 clang format
72135ec
Refs #17912 Updated release notes
fd15f87
Refs #17912 Python argument default should not be list
1298481
Refs #17912 Disallow assigning output of StartLiveData in Python
3b01bcc
Refs #17912 Clarified release note to avoid misunderstanding
2146976
Refs #17912 Simplified and refactored copying of properties
3cf11a7
Refs #17912 Added explanation of listener properties to docs
ecd44eb
Refs #17912 clang format
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,29 @@ simply calls :ref:`algm-LoadLiveData` at a fixed interval. | |
Instructions for setting up a "fake" data stream are found `here | ||
<http://www.mantidproject.org/MBC_Live_Data_Simple_Examples>`__. | ||
|
||
Listener Properties | ||
################### | ||
|
||
Specific LiveListeners may provide their own properties, in addition to | ||
properties provided by StartLiveData. For convenience and accessibility, these | ||
properties are made available through StartLiveData as well. | ||
|
||
In the StartLiveData algorithm dialog, a group box called "Listener Properties" | ||
will appear at the bottom of the sidebar on the left, if the currently selected | ||
listener provides additional properties. | ||
|
||
In the Python API, these listener properties may also be set as keyword | ||
arguments when calling StartLiveData. For example, in this code snippet: | ||
|
||
.. code-block:: python | ||
|
||
StartLiveData(Instrument='ISIS_Histogram', OutputWorkspace='wsOut', UpdateEvery=1, | ||
AccumulationMethod='Replace', PeriodList=[1,3], SpectraList=[2,4,6]) | ||
|
||
PeriodList and SpectraList are properties of the ISISHistoDataListener. They | ||
are available as arguments in this call because Instrument is set to | ||
'ISIS_Histogram', which uses that listener. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good documentation! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! :) |
||
Live Plots | ||
########## | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful to have a comment about this (following) code relating to the transfer of ownership. Or to put this in a separate named method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by refactoring with two helper functions and simplifying code a bit.