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

Populate "BF Channel" list with presets containing keywords #287

Merged
merged 6 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/microscope-installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,17 @@ Add 5 presets to this group named `State0`, `State1`, `State2`, `State3`, and `S

![](https://github.com/mehta-lab/recOrder/blob/main/docs/images/create_preset.png)

### (Optional) Enable "Phase From BF" acquisition

If you would like to reconstruct phase from brightfield, add a `Micromanager` preset with brightfield properties (e.g. moving the polarization analyzer out the light path) and give the preset a name that contains one of the following case-insensitive keywords:

`["bf", "brightfield", "bright", "labelfree", "label-free", "lf", "label"]`

In `recOrder` you can select this preset using the `Acquisition Settings > BF Channel` dropdown menu.

### Enable port access

Finally, enable port access so that micromanager can communicate with recOrder through the `pycromanager` bridge. To do so open MM and navigate to `Tools > Options` and check the box that says `Run server on port 4827`
Finally, enable port access so that `Micromanager` can communicate with recOrder through the `pycromanager` bridge. To do so open `Micromanager` and navigate to `Tools > Options` and check the box that says `Run server on port 4827`

![](https://github.com/mehta-lab/recOrder/blob/main/docs/images/run_port.png)

Expand Down
8 changes: 5 additions & 3 deletions recOrder/plugin/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,13 @@ def connect_to_mm(self):
)
config_group_found = True
self.ui.cb_config_group.addItem(group)
# not entirely sure what this part does, but I left it in
# I think it tried to find a channel such as 'BF'

# Populate the acquisition "BF channel" list with presets that contain any of these keywords
bf_keywords = ["bf", "brightfield", "bright", "labelfree", "label-free", "lf", "label"]
for ch in config_list:
if ch not in self.calib_channels:
if any([keyword.lower() in ch.lower() for keyword in bf_keywords]):
self.ui.cb_acq_channel.addItem(ch)

if not config_group_found:
msg = (
f"No config group contains channels {self.calib_channels}. "
Expand Down