-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working transform_to_physio pydra task and tests
- Loading branch information
1 parent
05d90ea
commit cb67b7c
Showing
3 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""Tests for physutils.tasks and their integration.""" | ||
|
||
import os | ||
|
||
import physutils.tasks as tasks | ||
from physutils import physio | ||
|
||
|
||
def test_transform_to_physio_phys_file(): | ||
"""Test transform_to_physio task.""" | ||
physio_file = os.path.abspath("physutils/tests/data/ECG.phys") | ||
task = tasks.transform_to_physio(input_file=physio_file, mode="physio") | ||
assert task.inputs.input_file == physio_file | ||
assert task.inputs.mode == "physio" | ||
assert task.inputs.fs is None | ||
|
||
task() | ||
|
||
physio_obj = task.result().output.out | ||
assert isinstance(physio_obj, physio.Physio) | ||
assert physio_obj.fs == 1000 | ||
assert physio_obj.data.shape == (44611,) |