Present replay 3D with the cursor and open Analyze on a remembered video
Replay left the 3D pane on the rest mesh or a sparse overlay, and Analyze skipped the setup dialog unless the file was re-picked. Live Run no longer starts a chain on a video path. Verified with Studio tests for flush, overlay mask, Analyze open, live-video refusal, and locales.
This commit is contained in:
@@ -173,6 +173,36 @@ def test_the_finger_adapter_publishes_a_field_already_in_the_domain(scene):
|
||||
)
|
||||
|
||||
|
||||
def test_a_recovered_flow_keeps_the_island_as_the_overlay_mask(scene):
|
||||
"""Replay flow is finite only at stored cells; the overlay mask must stay the island.
|
||||
|
||||
The selector already drops ``NaN`` samples. If the mask is those finite cells too,
|
||||
an arrow tip one neighbour over is rejected and 3D keeps a handful of rim dots
|
||||
while 2D draws the full grid.
|
||||
"""
|
||||
adapter = FingerFrameAdapter(
|
||||
geometry_id=scene.geometry_id,
|
||||
field_domain_id=scene.field_domain_id,
|
||||
shape_hw=scene.shape_hw,
|
||||
)
|
||||
h, w = scene.shape_hw
|
||||
flow = np.full((h, w, 2), np.nan, dtype=np.float32)
|
||||
flow[1, 1, 0] = 7.0
|
||||
island = np.ones((h, w), dtype=bool)
|
||||
depth = np.zeros((h, w), dtype=np.float32)
|
||||
frame = adapter.snapshot(
|
||||
FakePacket(flow=flow, depth=depth, valid_mask=island),
|
||||
runtime=None,
|
||||
identity=_identity(),
|
||||
)
|
||||
assert frame is not None
|
||||
assert frame.flow_uv is not None and frame.flow_valid_mask is not None
|
||||
mask = np.asarray(frame.flow_valid_mask)
|
||||
assert mask.all(), "the overlay mask shrank to the recovered sample cells"
|
||||
finite = np.isfinite(np.asarray(frame.flow_uv)[..., 0])
|
||||
assert int(finite.sum()) == 1
|
||||
|
||||
|
||||
def test_the_finger_adapter_remaps_through_the_unroll_map():
|
||||
map_x = np.array([[0, 1, 2], [0, 1, 2], [0, 1, 2]], dtype=np.float32)
|
||||
map_y = np.array([[2, 2, 2], [1, 1, 1], [0, 0, 0]], dtype=np.float32)
|
||||
|
||||
Reference in New Issue
Block a user