Skip to content

Commit

Permalink
Merge pull request #33 from childmindresearch/refactor_bids_layout
Browse files Browse the repository at this point in the history
Refactor bids layout
  • Loading branch information
Sam54000 authored Dec 9, 2024
2 parents 0ca3285 + 63e9b86 commit 559527b
Show file tree
Hide file tree
Showing 8 changed files with 4,998 additions and 326 deletions.
7 changes: 1 addition & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ pythonpath = [
testpaths = [
"tests"
]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]

[tool.mypy]
ignore_missing_imports = true
Expand Down
16 changes: 1 addition & 15 deletions src/eeg_research/preprocessing/tools/artifacts_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,22 +268,8 @@ def print_statistics(self) -> 'ZscoreAnnotator':
Total duration of good signal:......... {
np.round(self.statistics['tot_good']['seconds'],2)}s ({
np.round(self.statistics['tot_good']['ratio']*100,2)
}%)
Types of artifacts annotated: {', '.join(
self.statistics['tot_bad']['artifact_types']
)}""")
}%)""")

for artifact_type in self.statistics['tot_bad']['artifact_types']:
this_artifact = self.statistics[artifact_type]

this_artifact_duration = np.round(this_artifact['seconds'],2)
this_artifact_perc = np.round(this_artifact['ratio']*100,2)

messages_list.extend(f"""
|__{artifact_type} duration (sec): {this_artifact_duration}s ({
this_artifact_perc}%)""")

self.statistics_message = ''.join(messages_list)
print(self.statistics_message)
return self
Expand Down
Loading

0 comments on commit 559527b

Please sign in to comment.