Skip to content

Commit 09f740e

Browse files
committed
module docstring
1 parent 5f2b04d commit 09f740e

1 file changed

Lines changed: 23 additions & 27 deletions

File tree

deeptrack/features.py

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
1616
- **Structural Features**
1717
18-
Structural features extend the basic `Feature` class by adding hierarchical
19-
or logical structures, such as chains, branches, or probabilistic choices.
20-
They enable the construction of pipelines with advanced data flow
21-
requirements.
18+
Structural features extend the basic `StructuralFeature` class by adding
19+
hierarchical or logical structures, such as chains, branches, or
20+
probabilistic choices. They enable the construction of pipelines with
21+
advanced data flow requirements.
2222
2323
- **Feature Properties**
2424
25-
Features in DeepTrack2 can have dynamically sampled properties, enabling
26-
parameterization of transformations. These properties are defined at
27-
initialization and can be updated during pipeline execution.
25+
Features can have dynamically sampled properties, enabling parameterization
26+
of transformations. These properties are defined at initialization and can
27+
be updated during pipeline execution.
2828
2929
- **Pipeline Composition**
3030
@@ -43,13 +43,14 @@
4343
4444
- `Feature`: Base class for all features in DeepTrack2.
4545
46-
It represents a modular data transformation with properties and methods for
47-
customization.
46+
In general, a feature represents a modular data transformation with
47+
properties and methods for customization.
4848
49-
- `StructuralFeature`: Provide structure without input transformations.
49+
- `StructuralFeature`: Base class for features providing structure.
5050
51-
A specialized feature for organizing and managing hierarchical or logical
52-
structures in the pipeline.
51+
Base class for specialized features for organizing and managing
52+
hierarchical or logical structures in the pipeline without input
53+
transformations.
5354
5455
- `ArithmeticOperationFeature`: Apply arithmetic operation element-wise.
5556
@@ -73,23 +74,23 @@
7374
- `Value`: Store a constant value as a feature.
7475
- `Stack`: Stack the input and the value.
7576
- `Arguments`: A convenience container for pipeline arguments.
76-
- `Slice`: Dynamically applies array indexing to inputs.
77+
- `Slice`: Dynamically apply array indexing to inputs.
7778
- `Lambda`: Apply a user-defined function to the input.
7879
- `Merge`: Apply a custom function to a list of inputs.
7980
- `OneOf`: Resolve one feature from a given collection.
8081
- `OneOfDict`: Resolve one feature from a dictionary and apply it to an input.
8182
- `LoadImage`: Load an image from disk and preprocess it.
8283
- `SampleToMasks`: Create a mask from a list of images.
83-
- `AsType`: Convert the data type of images.
84+
- `AsType`: Convert the data type of the input.
8485
- `ChannelFirst2d`: DEPRECATED Convert an image to a channel-first format.
8586
- `Upscale`: Simulate a pipeline at a higher resolution.
8687
- `NonOverlapping`: Ensure volumes are placed non-overlapping in a 3D space.
8788
- `Store`: Store the output of a feature for reuse.
88-
- `Squeeze`: Squeeze the input image to the smallest possible dimension.
89-
- `Unsqueeze`: Unsqueeze the input image to the smallest possible dimension.
89+
- `Squeeze`: Squeeze the input to the smallest possible dimension.
90+
- `Unsqueeze`: Unsqueeze the input.
9091
- `ExpandDims`: Alias of `Unsqueeze`.
91-
- `MoveAxis`: Moves the axis of the input image.
92-
- `Transpose`: Transpose the input image.
92+
- `MoveAxis`: Move the axis of the input.
93+
- `Transpose`: Transpose the input.
9394
- `Permute`: Alias of `Transpose`.
9495
- `OneHot`: Convert the input to a one-hot encoded array.
9596
- `TakeProperties`: Extract all instances of properties from a pipeline.
@@ -98,8 +99,8 @@
9899
- `Add`: Add a value to the input.
99100
- `Subtract`: Subtract a value from the input.
100101
- `Multiply`: Multiply the input by a value.
101-
- `Divide`: Divide the input with a value.
102-
- `FloorDivide`: Divide the input with a value.
102+
- `Divide`: Divide the input by a value.
103+
- `FloorDivide`: Divide the input by a value.
103104
- `Power`: Raise the input to a power.
104105
- `LessThan`: Determine if input is less than value.
105106
- `LessThanOrEquals`: Determine if input is less than or equal to value.
@@ -112,14 +113,9 @@
112113
113114
Functions:
114115
115-
- `propagate_data_to_dependencies`:
116+
- `propagate_data_to_dependencies(feature, **kwargs) -> None`
116117
117-
def propagate_data_to_dependencies(
118-
feature: Feature,
119-
**kwargs: Any
120-
) -> None
121-
122-
Propagates data to all dependencies of a feature, updating their properties
118+
Propagate data to all dependencies of a feature, updating their properties
123119
with the provided values.
124120
125121
Examples

0 commit comments

Comments
 (0)