Skip to content

Commit

Permalink
fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Mar 27, 2024
1 parent 4ec49de commit f4ae9d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion examples/example_vds_simrec.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
# This is useful to avoid storing large data in memory.

sim = SimData.from_params(
shape=(64, 64), sim_tr=0.1, sim_time=300, fov=0.192, n_coils=4, rng=42, lazy=True
shape=(64, 64),
sim_tr=0.1,
sim_time=300,
fov=(0.192, 0.192),
n_coils=4,
rng=42,
lazy=True,
)

# %%
Expand Down
4 changes: 3 additions & 1 deletion tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class B(AbstractHandler):
def _handle(self, sim):
sim.custom_field += 1

sim = SimData(SimParams(shape=(48, 48, 32), fov=0.001, sim_time=12, sim_tr=1.0))
sim = SimData(
SimParams(shape=(48, 48, 32), fov=(0.1,) * 3, sim_time=12, sim_tr=1.0)
)

with pytest.raises(ValueError):
A()(sim)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_simulation_data():
from snkf.simulation import SimData

sim_data = SimData.from_params(
shape=(48, 48, 32), sim_time=12, sim_tr=1.0, fov=0.001
shape=(48, 48, 32), sim_time=12, sim_tr=1.0, fov=(0.1,) * 3
)
assert sim_data.shape == (48, 48, 32)
assert sim_data.n_frames == 12
Expand Down

0 comments on commit f4ae9d3

Please sign in to comment.