Commit 7f90369
fix(tacs): correct TACS-2/TACS-3 classification and viewer orientation lines
Two bugs fixed in _launch_tacs_viewer() and _tacs_hierarchy_integration():
1. Orientation lines used [row-dy, row+dy] instead of [row+dy, row-dy],
mirroring all fiber angles relative to the validated draw_curvs() reference.
2. TACS classification applied an incorrect 90 deg complement conversion to
nearest_relative_boundary_angle before calling classify_fiber_tacs().
compute_boundary_tangent_angle() returns atan2(dcol, drow) % 180 -- a 90 deg
rotated convention vs the fiber angle (0=horizontal). This offset causes
nearest_relative_boundary_angle to already equal angle_to_tangent directly
(0=parallel, 90=perpendicular). The 90 deg subtraction was inverting TACS-2
and TACS-3 labels.
Documentation updated:
- boundary_tif_utils._compute_fiber_boundary_relative_angle docstring corrected
- geometry_utils.compute_boundary_tangent_angle warning added re: axis convention
- REFACTORING_GUIDE.md note added for nearest_relative_boundary_angle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 6a201b4 commit 7f90369
4 files changed
Lines changed: 45 additions & 31 deletions
File tree
- src/tme_quant
- examples
- src/tme_quant/fiber_analysis/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
Lines changed: 21 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
394 | 393 | | |
395 | 394 | | |
396 | | - | |
| 395 | + | |
397 | 396 | | |
398 | 397 | | |
399 | 398 | | |
400 | 399 | | |
401 | | - | |
402 | | - | |
| 400 | + | |
403 | 401 | | |
404 | 402 | | |
405 | 403 | | |
| |||
482 | 480 | | |
483 | 481 | | |
484 | 482 | | |
485 | | - | |
486 | | - | |
| 483 | + | |
| 484 | + | |
487 | 485 | | |
488 | 486 | | |
489 | 487 | | |
| |||
495 | 493 | | |
496 | 494 | | |
497 | 495 | | |
498 | | - | |
| 496 | + | |
499 | 497 | | |
500 | 498 | | |
501 | 499 | | |
| |||
510 | 508 | | |
511 | 509 | | |
512 | 510 | | |
513 | | - | |
| 511 | + | |
514 | 512 | | |
515 | 513 | | |
516 | 514 | | |
| |||
545 | 543 | | |
546 | 544 | | |
547 | 545 | | |
548 | | - | |
549 | | - | |
550 | | - | |
| 546 | + | |
551 | 547 | | |
552 | 548 | | |
553 | 549 | | |
| |||
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
568 | 562 | | |
569 | 563 | | |
570 | 564 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
596 | 604 | | |
597 | 605 | | |
598 | 606 | | |
| |||
0 commit comments