Remove `Session.array_transform` attribute (obsolete single-transducer-pose model)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
調査の方向性
src/openlifu/db/session.py から始めて、Session のシリアライゼーションを確認します。次に、examples/tutorials/02_Database_Interaction.py と対応する notebook における Session の構築を確認します。tests/test_database.py のデータベーステストを実行し、tests/resources/example_db/ にある legacy の array_transform データを確認します。現行の fixture と examples がそのフィールドを参照しなくなり、from_dict が引き続き legacy の sessions を読み込めれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Remove the array_transform: ArrayTransform field from openlifu.db.Session, along with its to_dict / from_dict handling, the associated docstring notes, and every reference in examples, tests, and test-resource JSON.
Motivation
Session.array_transform was designed around the assumption that a session has a single canonical "the transducer position." In SlicerOpenLIFU that assumption no longer holds:
- Each page that renders the transducer (pre-planning, localization, solution) picks whichever of the persisted transforms it needs (a specific approved virtual-fit result, a specific approved transducer-tracking result, or -- on the localization page -- both simultaneously).
- The full list of transducer transforms lives in
session.virtual_fit_resultsandsession.transducer_tracking_results, keyed by target / photoscan. - Approval invalidation is now driven per-VF and per-TT rather than by writing back a single pose.
As a result, SlicerOpenLIFU has stopped reading and writing session.array_transform (see the accompanying downstream PR). The field is now unused by the primary consumer and only serves to confuse the persistence model.
Scope of changes required in this repo
src/openlifu/db/session.py- Remove the
array_transformfield definition onSession. - Remove the corresponding
to_dict/from_dicthandling forarray_transform. - Update the
solution_idfield docstring, which currently claims the id is "cleared whenever the array_transform changes." That invalidation policy needs to be reconsidered (probably driven by VF / TT approval changes on the consumer side); at minimum, drop the array_transform reference from the doc.
- Remove the
examples/tutorials/02_Database_Interaction.pyand the matching.ipynb-- drop thearray_transform=ArrayTransform(...)argument from theSession(...)construction.tests/test_database.py-- remove assertions onsession.array_transform.matrix.shape/.unitsand any loop variables namedarray_transformthat come from the same fixture.- Test resource JSON files under
tests/resources/example_db/that carry an"array_transform"block -- either drop the block or regenerate the fixtures so they no longer contain it.from_dictshould tolerate the field being absent, so old on-disk sessions still load cleanly. - Sample database (
openlifu-sample-databaserepo) sessions currently carry an"array_transform"block too; that repo will need a matching sweep, but that is out of scope for this issue.
Backwards compatibility
Session.from_dict should silently ignore a legacy "array_transform" key so that existing on-disk sessions (including the pinned openlifu-sample-database fixtures) still load with the new library version.
Downstream
Coordinated with the SlicerOpenLIFU cleanup that decommissions the array_transform read/write path on the consumer side.
- 主要言語
- Python
- スター
- 29
- フォーク
- 20
- 平均マージ
- 4時間 31分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenwaterHealth/openlifu-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Save Focal Gain LUT into a data file (json, csv, etc.) to make the source code file shorter.対応中かも @HussainAther が 85 日前に担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OpenwaterHealth/openlifu-python#448 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Reconstruction quality is inconsistent +poor across runs on identical input + very slow processing再び着手できるかも @stahir715 が 64 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenwaterHealth/openlifu-python#496 · コメント 7 件 · 担当者 2 名 ·
OpenwaterHealth/openlifu-python の issue をすべて見る
似ている issue
-
documentation pkg: sphinx-needs
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
useblocks/sphinx-needs#2255 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
home-assistant/core#186538 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
btclib-org/btclib-secp256k1#1181 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pyrite-wiki/pyrite#917 ·
メンテナーはふだん 1 日以内に返信