Skip to content

Commit 4fad72f

Browse files
committed
Don't run old phase tests
1 parent 12b27a9 commit 4fad72f

File tree

2 files changed

+71
-71
lines changed

2 files changed

+71
-71
lines changed

phys2denoise/tests/test_metrics_cardiac.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -20,62 +20,62 @@ def test_crf_smoke():
2020
assert len(crf_arr) == pred_len
2121

2222

23-
def test_cardiac_phase_smoke():
24-
"""Basic smoke test for cardiac phase calculation."""
25-
t_r = 1.0
26-
n_scans = 200
27-
sample_rate = 1 / 0.01
28-
slice_timings = np.linspace(0, t_r, 22)[1:-1]
29-
peaks = np.array([0.534, 0.577, 10.45, 20.66, 50.55, 90.22])
30-
data = np.zeros(peaks.shape)
31-
card_phase = cardiac.cardiac_phase(
32-
data,
33-
peaks=peaks,
34-
fs=sample_rate,
35-
slice_timings=slice_timings,
36-
n_scans=n_scans,
37-
t_r=t_r,
38-
)
39-
assert card_phase.ndim == 2
40-
assert card_phase.shape == (n_scans, slice_timings.size)
23+
# def test_cardiac_phase_smoke():
24+
# """Basic smoke test for cardiac phase calculation."""
25+
# t_r = 1.0
26+
# n_scans = 200
27+
# sample_rate = 1 / 0.01
28+
# slice_timings = np.linspace(0, t_r, 22)[1:-1]
29+
# peaks = np.array([0.534, 0.577, 10.45, 20.66, 50.55, 90.22])
30+
# data = np.zeros(peaks.shape)
31+
# card_phase = cardiac.cardiac_phase(
32+
# data,
33+
# peaks=peaks,
34+
# fs=sample_rate,
35+
# slice_timings=slice_timings,
36+
# n_scans=n_scans,
37+
# t_r=t_r,
38+
# )
39+
# assert card_phase.ndim == 2
40+
# assert card_phase.shape == (n_scans, slice_timings.size)
4141

4242

43-
def test_cardiac_phase_smoke_physio_obj():
44-
"""Basic smoke test for cardiac phase calculation."""
45-
t_r = 1.0
46-
n_scans = 200
47-
sample_rate = 1 / 0.01
48-
slice_timings = np.linspace(0, t_r, 22)[1:-1]
49-
peaks = np.array([0.534, 0.577, 10.45, 20.66, 50.55, 90.22])
50-
data = np.zeros(peaks.shape)
51-
phys = physio.Physio(data, sample_rate, physio_type="cardiac")
52-
phys._metadata["peaks"] = peaks
43+
# def test_cardiac_phase_smoke_physio_obj():
44+
# """Basic smoke test for cardiac phase calculation."""
45+
# t_r = 1.0
46+
# n_scans = 200
47+
# sample_rate = 1 / 0.01
48+
# slice_timings = np.linspace(0, t_r, 22)[1:-1]
49+
# peaks = np.array([0.534, 0.577, 10.45, 20.66, 50.55, 90.22])
50+
# data = np.zeros(peaks.shape)
51+
# phys = physio.Physio(data, sample_rate, physio_type="cardiac")
52+
# phys._metadata["peaks"] = peaks
5353

54-
# Test where the physio object is returned
55-
phys = cardiac.cardiac_phase(
56-
phys,
57-
slice_timings=slice_timings,
58-
n_scans=n_scans,
59-
t_r=t_r,
60-
)
54+
# # Test where the physio object is returned
55+
# phys = cardiac.cardiac_phase(
56+
# phys,
57+
# slice_timings=slice_timings,
58+
# n_scans=n_scans,
59+
# t_r=t_r,
60+
# )
6161

62-
assert phys.history[0][0] == "phys2denoise.metrics.cardiac.cardiac_phase"
63-
assert phys.computed_metrics["cardiac_phase"].ndim == 2
64-
assert phys.computed_metrics["cardiac_phase"].shape == (
65-
n_scans,
66-
slice_timings.size,
67-
)
68-
assert phys.computed_metrics["cardiac_phase"].args["slice_timings"] is not None
69-
assert phys.computed_metrics["cardiac_phase"].args["n_scans"] is not None
70-
assert phys.computed_metrics["cardiac_phase"].args["t_r"] is not None
62+
# assert phys.history[0][0] == "phys2denoise.metrics.cardiac.cardiac_phase"
63+
# assert phys.computed_metrics["cardiac_phase"].ndim == 2
64+
# assert phys.computed_metrics["cardiac_phase"].shape == (
65+
# n_scans,
66+
# slice_timings.size,
67+
# )
68+
# assert phys.computed_metrics["cardiac_phase"].args["slice_timings"] is not None
69+
# assert phys.computed_metrics["cardiac_phase"].args["n_scans"] is not None
70+
# assert phys.computed_metrics["cardiac_phase"].args["t_r"] is not None
7171

72-
# Test where the metric is returned
73-
card_phase = cardiac.cardiac_phase(
74-
phys,
75-
slice_timings=slice_timings,
76-
n_scans=n_scans,
77-
t_r=t_r,
78-
return_physio=False,
79-
)
80-
assert card_phase.ndim == 2
81-
assert card_phase.shape == (n_scans, slice_timings.size)
72+
# # Test where the metric is returned
73+
# card_phase = cardiac.cardiac_phase(
74+
# phys,
75+
# slice_timings=slice_timings,
76+
# n_scans=n_scans,
77+
# t_r=t_r,
78+
# return_physio=False,
79+
# )
80+
# assert card_phase.ndim == 2
81+
# assert card_phase.shape == (n_scans, slice_timings.size)

phys2denoise/tests/test_metrics_chest_belt.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ def test_rrf_smoke():
2222
assert rrf_arr.size == pred_len
2323

2424

25-
def test_respiratory_phase_smoke():
26-
"""Basic smoke test for respiratory phase calculation."""
27-
t_r = 1.0
28-
n_scans = 200
29-
sample_rate = 1 / 0.01
30-
slice_timings = np.linspace(0, t_r, 22)[1:-1]
31-
n_samples = int(np.rint((n_scans * t_r) * sample_rate))
32-
resp = np.random.normal(size=n_samples)
33-
resp_phase = chest_belt.respiratory_phase(
34-
resp,
35-
fs=sample_rate,
36-
slice_timings=slice_timings,
37-
n_scans=n_scans,
38-
t_r=t_r,
39-
)
40-
assert resp_phase.ndim == 2
41-
assert resp_phase.shape == (n_scans, slice_timings.size)
25+
# def test_respiratory_phase_smoke():
26+
# """Basic smoke test for respiratory phase calculation."""
27+
# t_r = 1.0
28+
# n_scans = 200
29+
# sample_rate = 1 / 0.01
30+
# slice_timings = np.linspace(0, t_r, 22)[1:-1]
31+
# n_samples = int(np.rint((n_scans * t_r) * sample_rate))
32+
# resp = np.random.normal(size=n_samples)
33+
# resp_phase = chest_belt.respiratory_phase(
34+
# resp,
35+
# fs=sample_rate,
36+
# slice_timings=slice_timings,
37+
# n_scans=n_scans,
38+
# t_r=t_r,
39+
# )
40+
# assert resp_phase.ndim == 2
41+
# assert resp_phase.shape == (n_scans, slice_timings.size)
4242

4343

4444
def test_respiratory_pattern_variability_smoke():

0 commit comments

Comments
 (0)