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
inspect/kinetic_scheme: validate config values and align docs
Add strict numeric validation to kinetic-scheme config fields.
Fix ground-state bar sizing to account for per-node width overrides.
Update tests for new validation and bar-span behavior.
Sync dev/docs/notebook defaults and option descriptions with current implementation.
Copy file name to clipboardExpand all lines: pyglotaran_extras/inspect/kinetic_scheme/devdocs/architecture.md
+29-28Lines changed: 29 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ Key rendering behaviors:
155
155
156
156
**Parallel edge curvature**: When edges exist in both directions (A->B and B->A), `edge_index` assigns alternating curvature via `arc3,rad=...` connection style.
157
157
158
-
**Label anti-overlap**: When multiple edges converge on the same target node, labels are spread along each edge at parametric positions t in [0.20, 0.50] instead of all clustering at t=0.35. Each label also has a perpendicular offset of 0.25 data units from the arrow line.
158
+
**Label anti-overlap**: When multiple edges converge on the same target node, labels are spread along each edge at parametric positions `t` in `[0.35, 0.65]` instead of all clustering at the midpoint. Each label uses a base perpendicular offset of `0.35` data units from the arrow line, with additional outward bumps when needed to avoid collisions.
159
159
160
160
**Text contrast**: `_compute_text_color()` uses the W3C relative luminance formula on linearized sRGB to decide white vs. black text on node backgrounds.
161
161
@@ -169,32 +169,33 @@ Key rendering behaviors:
169
169
170
170
All fields have defaults. Config uses `extra="forbid"` to catch typos.
|`horizontal_layout_preference`|`str \| None`|`None`| Left-to-right ordering hint |
191
+
|`manual_positions`|`dict \| None`|`None`| For manual layout |
192
+
|`horizontal_spacing`|`float`|`0.0`| Node spacing (`0` = auto `3 × node_width`) |
193
+
|`vertical_spacing`|`float`|`2.0`| Layer vertical gap |
194
+
|`ground_state_offset`|`float`|`1.2`| GS bar vertical offset |
195
+
|`component_gap`|`float`|`3.0`| Gap between disconnected components |
196
+
|`figsize`|`tuple[float, float]`|`(10.0, 8.0)`| Figure size in inches |
197
+
|`title`|`str \| None`|`None`| Plot title |
198
+
|`omit_parameters`|`set[str]`|`set()`| Parameters to exclude |
198
199
199
200
### `NodeStyleConfig` Fields
200
201
@@ -253,7 +254,7 @@ A single model often contains multiple independent megacomplexes (e.g., three re
253
254
254
255
### Why parametric t-value spreading?
255
256
256
-
When 4 edges converge on the same target node, all labels would cluster at `t=0.35` along their respective arrows. Spreading to `t in [0.20, 0.50]` naturally separates labels since each arrow has a different source position. Combined with perpendicular offset, this eliminates label overlap without force-based layout for text.
257
+
When several edges converge on the same target node, midpoint labels would collide. Spreading labels along each edge with `t in [0.35, 0.65]` naturally separates them since each arrow has a different source position. Combined with a perpendicular base offset (plus outward bumps when both sides are crowded), this avoids overlap without text-force simulation.
0 commit comments