Skip to content

Commit 81c8cf6

Browse files
committed
Link function names to api docs
1 parent 7cfae34 commit 81c8cf6

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

docs/source/user_guide/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This page explains how to configure Derotation for use with the full processing
77

88
You need to provide a configuration file if you are using the **full pipeline** or the **incremental pipeline**. This configuration can be passed as a Python `dict`
99

10-
If you only want to use the **core derotation method**`rotate_an_image_array_line_by_line` — then you must manually prepare the image stack and the angle array. In this case, configuration is not needed.
10+
If you only want to use the **core derotation method**{func}`derotation.derotate_by_line.derotate_an_image_array_line_by_line` — then you must manually prepare the image stack and the angle array. In this case, configuration is not needed.
1111

1212

1313
## Config Structure

docs/source/user_guide/key_concepts.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If the angle of rotation is recorded, `derotation` can reconstruct each frame by
1919
There are two main ways to use `derotation`:
2020

2121
### 1. **Low-level core function**
22-
Use `derotate_an_image_array_line_by_line` to derotate an image stack, given:
22+
Use {func}`derotation.derotate_by_line.derotate_an_image_array_line_by_line` to derotate an image stack, given:
2323
- The original multi-photon movie (expects only one imaging plane)
2424
- Rotation angle per line
2525

@@ -28,13 +28,13 @@ This is ideal for testing and debugging with synthetic or preprocessed data.
2828
### 2. **Full or incremental pipeline classes**
2929
Use the pre-made pipelines to run end-to-end processing:
3030

31-
- `FullPipeline`: assumes randomised complete clockwise and counter-clockwise rotations. It includes:
31+
- {class}`derotation.analysis.full_derotation_pipeline.FullPipeline`: assumes randomised complete clockwise and counter-clockwise rotations. It includes:
3232
- Analog signal parsing
3333
- Angle interpolation
3434
- Bayesian optimization for center estimation
35-
- Derotation by line (calling `derotate_an_image_array_line_by_line`)
35+
- Derotation by line (calling {func}`derotation.derotate_by_line.derotate_an_image_array_line_by_line`)
3636

37-
- `IncrementalPipeline`: assumes a continuous rotation performed in small increments. It inherits functionality from the `FullPipeline` but does not perform Bayesian optimization. It can be useful as an alternative way to estimate center of rotation.
37+
- {class}`derotation.analysis.incremental_derotation_pipeline.IncrementalPipeline`: assumes a continuous rotation performed in small increments. It inherits functionality from the {class}`derotation.analysis.full_derotation_pipeline.FullPipeline` but does not perform Bayesian optimization. It can be useful as an alternative way to estimate center of rotation.
3838

3939
Both pipelines accept a configuration dictionary (see the [configuration guide](configuration)) and output:
4040
- Derotated TIFF
@@ -43,7 +43,7 @@ Both pipelines accept a configuration dictionary (see the [configuration guide](
4343
- A text file with optimal center of rotation
4444
- Logs
4545

46-
You can subclass `FullPipeline` to create custom pipelines by overwriting relevant methods.
46+
You can subclass {class}`derotation.analysis.full_derotation_pipeline.FullPipeline` to create custom pipelines by overwriting relevant methods.
4747

4848
### Example usage of FullPipeline:
4949

@@ -82,11 +82,11 @@ Derotation offers two approaches for estimating the center:
8282

8383
**Bayesian optimization via FullPipeline**
8484

85-
This method searches for the correct center of rotation by derotating the whole movie and minimizing a custom metric, computed through the function `ptd_of_most_detected_blob`. It requires the average image of the derotated movie at different rotations angles, and from them detects blobs, searches for the most frequent and calculates the Point-to-Point Distance (PTD) for it across blob centers at different rotation angles.
85+
This method searches for the correct center of rotation by derotating the whole movie and minimizing a custom metric, computed through the function {func}`derotation.analysis.metrics.ptd_of_most_detected_blob`. It requires the average image of the derotated movie at different rotations angles, and from them detects blobs, searches for the most frequent and calculates the Point-to-Point Distance (PTD) for it across blob centers at different rotation angles.
8686

8787
It is robust but computationally expensive.
8888

89-
**Ellipse fitting via IncrementalPipeline**
89+
**Ellipse fitting via {class}`derotation.analysis.incremental_derotation_pipeline.IncrementalPipeline`**
9090

9191
This method exploits the fact that incremental datasets rotate very slowly and smoothly. It works by:
9292

@@ -96,9 +96,9 @@ This method exploits the fact that incremental datasets rotate very slowly and s
9696

9797
The center of the ellipse is assumed to match the true center of rotation. This method fails when the cell stops being visible in certain rotation angles.
9898

99-
Once the center is estimated, it can be fed to the FullPipeline to derotate the whole movie.
99+
Once the center is estimated, it can be fed to the {class}`derotation.analysis.full_derotation_pipeline.FullPipeline` to derotate the whole movie.
100100

101-
**Example usage of IncrementalPipeline:**
101+
**Example usage of {class}`derotation.analysis.incremental_derotation_pipeline.IncrementalPipeline`:**
102102

103103
```python
104104
from derotation.config.load_config import update_config_paths, load_config
@@ -152,9 +152,9 @@ Debugging plots are by default saved in the ``debug_plots`` folder.
152152
### Custom plotting hooks
153153
To monitor what is happening at every step of line-by-line derotation, you can use custom plotting hooks. These are functions that are called at specific points in the pipeline and can be used to visualize intermediate results.
154154

155-
There are two steps in the ``derotate_an_image_array_line_by_line`` function where hooks can be injected:
156-
- After adding a new line to the derotated image (`plotting_hook_line_addition`)
157-
- After completing a frame (`plotting_hook_image_completed`)
155+
There are two steps in the {func}`derotation.derotate_by_line.derotate_an_image_array_line_by_line` function where hooks can be injected:
156+
- After adding a new line to the derotated image ({func}`derotation.plotting_hooks.for_derotation.line_addition`)
157+
- After completing a frame ({func}`derotation.plotting_hooks.for_derotation.image_completed`)
158158

159159
Here and example of two pre-made hooks that can be used to visualize the derotation process:
160160
```python
@@ -177,21 +177,21 @@ You can also inject **custom plotting hooks** at defined pipeline stages. See th
177177

178178
## Simulated data
179179

180-
Use the `Rotator` and `SyntheticData` classes to generate test data:
180+
Use the {class}`derotation.simulate.line_scanning_microscope.Rotator` and {class}`derotation.simulate.synthetic_data.SyntheticData` classes to generate test data:
181181

182-
- `Rotator`: applies line-by-line rotation to an image stack, simulating a rotating microscope. It can be used to generate challenging synthetic data that include wrong centers of rotation and out of imaging plane rotations.
183-
- `SyntheticData`: creates fake cell images, assigns rotation angles, and generates synthetic stacks. This is especially useful for validating both the incremental and full pipelines under known conditions.
182+
- {class}`derotation.simulate.line_scanning_microscope.Rotator`: applies line-by-line rotation to an image stack, simulating a rotating microscope. It can be used to generate challenging synthetic data that include wrong centers of rotation and out of imaging plane rotations.
183+
- {class}`derotation.simulate.synthetic_data.SyntheticData`: creates fake cell images, assigns rotation angles, and generates synthetic stacks. This is especially useful for validating both the incremental and full pipelines under known conditions.
184184

185185
![Rotator](../_static/rotator.gif)
186186

187-
This is an example of a synthetic dataset with two cells generated with the `Rotator` class.
187+
This is an example of a synthetic dataset with two cells generated with the {class}`derotation.simulate.line_scanning_microscope.Rotator` class.
188188

189189
---
190190

191191

192192
## Limitations
193193

194-
Derotation supports two experimental configurations: randomized full rotations (in the `FullRotation` pipeline) and small-step incremental rotations (`IncrementalPipeline`). Other rotation paradigms are not currently supported out of the box.
194+
Derotation supports two experimental configurations: randomized full rotations (in the {class}`derotation.analysis.full_derotation_pipeline.FullPipeline`) and small-step incremental rotations ({class}`derotation.analysis.incremental_derotation_pipeline.IncrementalPipeline`). Other rotation paradigms are not currently supported out of the box.
195195

196196
The package assumes strict input formats — TIFF stacks for images and `.bin` files with analog signals following a specific channel order. Both pipelines require:
197197
- timing of rotation ticks, which are used to compute rotation angles;

0 commit comments

Comments
 (0)