Refactor Trigger operator to more clearly reflect SpikeGLX API#9
Refactor Trigger operator to more clearly reflect SpikeGLX API#9glopesdev merged 5 commits intobonsai-rx:mainfrom
Conversation
Using the same function name makes identification easier. The arguments are also exposed as properties for improved readability.
J-M-White
left a comment
There was a problem hiding this comment.
Thanks, @glopesdev, this is great! TriggerGT has a much more elegant interface than Trigger did.
I've just added two comments about the documentation/example workflow.
|
@J-M-White I've added the empty overload and redid the examples, I will need review acceptance to merge this (we can change this in the future to require only conversation resolution which is slightly less onerous and still allows people to flag issues when needed). Would be great also if you had a chance to try this out with SpikeGLX to see if all the examples work, etc, as I don't have access to a testing rig with actual hardware at the moment. |
|
@glopesdev, great - thanks! I'll go and test the examples on one of our rigs today (shouldn't take too long). |
|
@glopesdev, I'm glad I went and tested on the rig! The I hadn't noticed this sooner because we never use I could see three ways of moving forward:
What do you think? |
|
@J-M-White thanks for testing! I guess 3. would be nice if it's not too much work, otherwise I would go with 2. In any case, I think we should do this in a separate PR as this is separate from the |
The current
Triggeroperator mirrors theTriggerGTfunction in the SpikeGLX API, which explicitly controls file writing behavior.To avoid ambiguity and confusion with the general word "Trigger", and the complex documentation of this function, here we rename this operator to match the original function name.
Furthermore, the
GateandTriggervalues are exposed directly as properties in the operator, with corresponding named values, both of which get surfaced to the corresponding documentation pages.Finally, the command server properties were grouped to make it easier to navigate each of the operator-specific properties.