You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add pattern_ids tracking and update SMLMData compat to 0.6
- uniform2D/uniform3D now return pattern_ids indicating pattern membership
- apply_labeling preserves pattern_ids through expansion (with backward-compat overloads)
- Emitters now carry pattern id through simulation pipeline
- Update SMLMData compat to "0.5, 0.6"
- Update documentation for new return signatures
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/core/patterns.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,13 +105,16 @@ field_y = 10.0 # μm
105
105
pattern = Nmer2D(n=6, d=0.2)
106
106
density =1.5# patterns/μm²
107
107
108
-
x, y = uniform2D(density, pattern, field_x, field_y)
108
+
x, y, pattern_ids = uniform2D(density, pattern, field_x, field_y)
109
+
# pattern_ids[i] indicates which pattern instance point i belongs to
109
110
110
111
# Create custom distribution of 3D patterns
111
112
pattern3d = Nmer3D(n=6, d=0.2)
112
-
x, y, z = uniform3D(density, pattern3d, field_x, field_y, zrange=[-2.0, 2.0])
113
+
x, y, z, pattern_ids= uniform3D(density, pattern3d, field_x, field_y, zrange=[-2.0, 2.0])
113
114
```
114
115
116
+
The `pattern_ids` array tracks which pattern instance each point belongs to. This is useful for analysis, visualization (coloring by pattern), or grouping emitters by their originating structure. The `id` field on emitters in the simulation output contains this pattern ID.
0 commit comments