-
Notifications
You must be signed in to change notification settings - Fork 2
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
Multipatch dev #23
Multipatch dev #23
Conversation
Correct address string. Default params to empty list. Return values with "result" key instead of "return".
Setting pipette pressure modes no longer clicks button
MIES subclasses QObject to allow Timers and signaling. Stubs for processUpdate and resetData.
@JFPerkins, is this ready for review? |
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.
This looks awesome!
acq4/util/mies.py
Outdated
|
||
|
||
def __reload__(old): | ||
MIES._bridge = old['MIESBridge']._bridge |
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.
should be MIES._bridge = old['MIES']._bridge
acq4/util/igorpro.py
Outdated
self._pollTimer.timeout.connect(self._checkRecv) | ||
self._pollTimer.start(100) | ||
|
||
def __call__(self, cmd, *args, **kwds): |
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.
Should we do something with kwds
?
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.
So my intention with kwds was to utilize them to handle the optional arguments if that ever gets supported on the Igor side (it currently isn't). For now they are ignored, but other options would be to remove them or to raise an error on them. Thoughts?
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.
Let's just remove it for now.
acq4/util/igorpro.py
Outdated
return future | ||
|
||
def _checkRecv(self): | ||
socks = self._poller.poll(100) |
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.
Can we do poll(0)
here? It would be better to avoid blocking the event loop.
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.
Alternatively, I think we could set the receive timeout to 0 and ditch the poller altogether?
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.
I'll test with receive timeout set to 0 and if that looks like it is still functional we'll go with that, since I don't really like having the poller either.
acq4/util/igorpro.py
Outdated
messageID = reply.get("messageID", None) | ||
reply = self.parseReply(reply) | ||
future = self._unresolvedFutures.pop(messageID, None) | ||
if future: |
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.
When would we expect not future
? Is it safe to just discard such messages?
acq4/util/igorpro.py
Outdated
reply = self.parseReply(reply) | ||
future = self._unresolvedFutures.pop(messageID, None) | ||
if future: | ||
future.set_result(reply) |
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.
I think there should also be a future.set_exception
somewhere in here..
acq4/util/mies.py
Outdated
return self.setCtrl("setvar_DataAcq_SSPressure", pressure) | ||
|
||
def setApproach(self, hs): | ||
windowName = '"{}"'.format(self.windowName) |
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.
Why are you adding quotes here? This seems to be causing an error in mies:
Assertion FAILED in function IsControlDisabled(...) MIES_GuiUtilities.ipf:862.
Message: Non-existing control or window "ITC1600_Dev_0"
acq4/util/mies.py
Outdated
|
||
def quit(self): | ||
self._exiting = True | ||
if self._future: |
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.
This line causes AttributeError: 'MIES' object has no attribute '_future'
acq4/util/mies.py
Outdated
|
||
def setSeal(self): | ||
windowName = '"{}"'.format(self.windowName) | ||
return self.igor("P_MethodSeal", windowName, hs) |
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.
NameError: global name 'hs' is not defined
Got an error:
|
Lingering issues:
|
In the multipatch log file, event times are being stored as string rather than float. |
FYI: We are waiting on a MIES communication bugfix; hopefully will test this soon. Meanwhile, I noticed changes to |
Yeah looks like that was accidentally committed back in October, will fix. |
Looks like you had merged some changes in after that file was tracked, so the rebase was a little bit messy. I continued by accepting the changes on your merges compared to head but now it looks like there are conflicts. |
HRM. I'll have a peek. |
If you use rebase, don't change the base branch--we don't actually need to rebase on top of the latest |
…multipatch-dev Fix issues with new Scientifica hardware
Record event time in event history so it is preserved. Use json formatting on each line for easier parsing. Record target changes. Record surface depth changes.
Add comma to end of each logged event for easy json loading. Grab initial pipette states. Grab initial microscope surface depth.
Event time is recorded as a float. Removed titles from test pulse plots to free up space. Catch situation where wave is returned as null.
Hey Jed, tested out this PR today with 64-bit Igor. The only major problem I had was an error that was generated when ACQ4 would prompt MIES to interact with the MCCs |
Looks like this was a problem with a return type of wave but an empty value. Fixed. |
That sounds right, it was also occurring when MIES gave the error: |
Tests look good; let's do this! |
Thanks Jed! |
0MQ interactions with MIES
Polling for test pulse data.
Live updating for test pulses.
No more need for any ActiveX.
JSON formatting for pipette history.
fixes #1