Skip to content

GUI panel for manually logging an acquisition event#1221

Open
barentine wants to merge 1 commit into
python-microscopy:masterfrom
barentine:manualevent
Open

GUI panel for manually logging an acquisition event#1221
barentine wants to merge 1 commit into
python-microscopy:masterfrom
barentine:manualevent

Conversation

@barentine
Copy link
Copy Markdown
Member

Addresses issue I am waiting for a piece of equipment, and in the meantime I am flipping a physical switch instead of sending a serial command, however I still need a rough time point for these switch-throws (writing frame number does not cut it when imaging with two unsynchronized cameras, at high frame rates). Clicking my mouse and throwing the switch at "the same" time works for now.

Is this a bugfix or an enhancement?
kind of a cludge, but maybe someone finds it useful (e.g. 'lost immersion oil')
Proposed changes:

  • gui panel to allow an acquisition event to be logged manually

image

image

Checklist:

  • Tested with numpy=1.14
  • Tested on python 2.7 and 3.6
  • Tested with wx=3.x and wx=4.x [if UI code]
  • Does the PR avoid variable renaming in existing code, whitespace changes, and other forms of tidying? [There is a place for code tidying, but it makes reviewing
    much simpler if this is kept separate from functional changes]

If an enhancement (or non-trivial bugfix):

  • Has this been discussed in advance (feature request, PR proposal, email, or direct conversation)?
  • Does this change how users interact with the software? How will these changes be communicated?
  • Does this maintain backwards compatibility with old data?
  • Does this change the required dependencies?
  • Are there any other side effects of the change?

@David-Baddeley
Copy link
Copy Markdown
Contributor

Not sure that manual events are ever something I'd recommend using, due to obvious limitations in how well synchronised they can be as well as potential reliability issues (it's not going to be generally feasible to base any analysis on these events as a) people may forget to log them and b) there is no way of enforcing consistent naming).

That said, having some way of recording ancillary "happenings" / events (e.g. immersion oil loss, someone turns room lights on, etc ...) would be nice. My gut says that cobbling them into the existing events framework is probably the wrong thing to do (due to synchronisation issues). It's also hard to get enthusiastic about devising an entirely new mechanism. A compromise I could potentially entertain would be as follows:

  • Make the event type for manually triggered events constant (e.g. 'UserEvent') and put any information in the description (this avoids polluting the event namespace and lets these be easily filtered in analysis if desired). It also reduces latency somewhat by having only one field to complete for the event (although likely not by enough)
  • Optionally, allow pre-defined per-microscope manual event classes - ie the manual event panel __init__() would accept a list of event classes and display a trigger button for each - e.g. ['UserLostOil', 'UserToggleWidget'].

Would probably still like to put a discouragement in the documentation (i.e. please, please, find a way to emit events automatically rather than using this), as I suspect it might be functionality you would regret using due to the inherent problems with synchronisation and reproducibility.

Other options would be to leave as a site-specific hack, or put in an extras or similar repository (which has been on the TODO list for a while).

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.

2 participants