Skip to content

Commit 516e527

Browse files
Add a few feature examples
1 parent e56656f commit 516e527

File tree

3 files changed

+80
-9
lines changed

3 files changed

+80
-9
lines changed

docs/source/user_guide/acquiring_home.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ Acquiring Data
66
:maxdepth: 2
77

88
acquiring_guide
9-
features
9+
features/features
10+
features/example_feature_lists
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
=====================
2+
Example Feature Lists
3+
=====================
4+
5+
Fairly complex imaging sequences can be created by chaining together multiple
6+
features. Here are a few examples of feature lists that can be used to create custom
7+
acquisition protocols.
8+
9+
10+
Multi-Position Imaging with Automated Autofocus
11+
------------------------------------------------
12+
13+
Large volumes are often acquired in a tiling format, where the sample is imaged at
14+
multiple positions. In some cases, if the sample is not perfectly transparent, the focus
15+
may need to be adjusted at each position. This can be done automatically using the
16+
autofocus feature.
17+
#. You can load customized functions in the software by selecting the menu
18+
19+
Here, we begin by moving to the first position of the multi-position table, then move to
20+
the first z-position, measure the autofocus, set the F_Start position, move to the last
21+
z-position, measure the autofocus, set the F_End position, and image the full z-stack
22+
prior to moving to the next position in the multi-position table.
23+
24+
.. code-block:: python
25+
26+
[
27+
{"name": PrepareNextChannel,},
28+
(
29+
{"name": MoveToNextPositionInMultiPositionTable,"args": (None,None,None,),},
30+
{"name": CalculateFocusRange,},
31+
{"name": ZStackAcquisition,"args": (True,True,"z-stack",),},
32+
{"name": WaitToContinue,},
33+
{"name": LoopByCount,"args": ("experiment.MicroscopeState.multiposition_count",),},
34+
),
35+
]
36+
37+
38+
-----------
39+
40+
Time-Lapse Imaging with Automated Autofocus
41+
--------------------------------------------
42+
43+
Time-lapse imaging is a common technique used to monitor changes in samples over time
44+
. If you do not have a hardware solution for maintaining the focus of the specimen, a
45+
common technique for maintaining the focus of a microscope is to intermittently measure
46+
the focus using the image as a metric.
47+
48+
.. code-block:: python
49+
50+
[
51+
(
52+
{"name": PrepareNextChannel, },
53+
(
54+
{"name": Snap, "args": (True,),},
55+
{"name": LoopByCount, "args": (10,),},
56+
),
57+
{"name": LoopByCount, "args": (2,),},),
58+
{"name": PrepareNextChannel, },
59+
{"name": WaitToContinue, },
60+
(
61+
{"name": Autofocus, "args": ("stage","z",),},
62+
(
63+
{"name": Snap, "args": (True,),},
64+
{"name": LoopByCount, "args": (5,),},
65+
),
66+
{"name": StackPause, "args": ("experiment.MicroscopeState.timepoints",),},
67+
{"name": LoopByCount, "args": (10,),},
68+
),
69+
),
70+
]

docs/source/user_guide/features.rst renamed to docs/source/user_guide/features/features.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ Editing Feature Lists on the Fly
155155
.. image:: images/step_18.png
156156

157157

158-
#. Click one feature in the preview window, a :guilabel:`Feature Parameters` window
159-
will show up. Then set the desired parameters (e.g., :guilabel:`planes`
158+
#. Click one feature in the preview window, a :guilabel:`Feature Parameters` window
159+
will show up. Then set the desired parameters (e.g., :guilabel:`planes`
160160
in this screenshot). Close the :guilabel:`Feature Parameters` window.
161161

162162

@@ -189,13 +189,13 @@ Text Representation of Feature Lists
189189

190190
At the bottom of each of the :guilabel:`Feature List Configuration` frames above, there
191191
is a text box with a textual representation of the feature list. As an alternative to
192-
point-and-click editing, a user can update feature lists by editing this textual
192+
point-and-click editing, a user can update feature lists by editing this textual
193193
representation and then pressing :guilabel:`Preview`.
194194

195195
The square brackets ``[]`` create a sequence of events to run in the feature container.
196-
The ``{}`` braces contain features. The parentheses ``()`` indicate a loop.
196+
The ``{}`` braces contain features. The parentheses ``()`` indicate a loop.
197197

198-
As an example, let's look at the feature list that describes the
198+
As an example, let's look at the feature list that describes the
199199
:ref:`Continuous Scan <user_guide/acquiring_guide:continuous scan>` mode:
200200

201201
.. code-block:: python
@@ -211,12 +211,12 @@ As an example, let's look at the feature list that describes the
211211
]
212212
213213
Here, we have a sequence defined by ``[]`` containing one element, a loop, indicated
214-
by the closed parentheses. There are two features within this loop. One feature has the
214+
by the closed parentheses. There are two features within this loop. One feature has the
215215
name
216216
:doc:`PrepareNextChannel <../_autosummary/navigate.model.features.common_features.PrepareNextChannel>`
217-
and the other
217+
and the other
218218
:doc:`LoopByCount <../_autosummary/navigate.model.features.common_features.LoopByCount>`.
219-
The parentheses indicate we will keep looping through both of these features until
219+
The parentheses indicate we will keep looping through both of these features until
220220
stopping criteria is met. In this case, the looping will stop when ``LoopByCount``
221221
returns ``False`` due to running out of ``selected_channels`` to loop through. That is,
222222
it will end once all :ref:`selected channel <user_guide/gui_walkthrough:channel settings>` have

0 commit comments

Comments
 (0)