-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure #38
Merged
Merged
Restructure #38
Changes from 29 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
e2dec6a
Added heudiconv link
f5dfaf0
Added main call
89240f9
Started writing classes for phys2bids
e936b58
Start writing methods
9bc82f4
Turned a string into f string
afad556
Finished object organisation
dcb2419
Just flake8ed the eof
79acc27
Started writing interface for acq files
c6d69e3
changed name of objects
b94def5
Started moving acq related code into proper interface file
b603285
Removed parent class, added start_time in output
70e6965
Adapted print_info to general input object, moved into utils, improve…
4497f82
Changed default tr
9f4ea24
removed unnecessary steps and corrected export error
6bb89fa
Changed function has_data_size into has_size, added ch_amount to obje…
600c0f9
Created new function to automatically detect extension of input file …
be37a34
Started adjusting to new objects and functions.
07f4245
Pseudo code and docstrings
294e122
Completed docstrings
f4223db
Added blueprint output and method to populate it from blueprint input
2d57c5a
added methods to delete an indexed element and to return an indexed e…
11c689c
Added creation of one class property (number of tr found)
75e6387
Changed heuristic to add "recording" label
fd3413e
Adapted channel selection for new objects, added frequency splitting …
4f806c0
Renamed parser argument and changed default
28e0406
Improved docstrings, added method to rename channels in blueprint_input
cfc333e
renamed "table_header" into "ch_name", added a check on input file ex…
2c61fa1
Addressed @eurunuela 's review to PR #38
9b139d6
Added more docstrings, Keep addressing @eurunuela's review to PR #38,…
c924c32
Addressed @rmarkello 's reviews in PR #38
e641231
Changed ch_name default from Nonetype to empty list
d355bbd
Assignment of empty `recording`
b970ae3
Addressing @vinferrer 's review in PR #38, moving method from `utils.…
a18b2b7
Keep addressing @vinferrer 's PR #38 review
a257472
Bug fix due to external commit
056e0e1
Bug fixes
d896d5b
Added check on extension entry in check_input_ext prior to Path().wit…
61b7f32
Added heuristic for acq test file
5ad1f3f
Bug fixing post-reviews
3d1a47b
Corrected handling of path objects while using heuristics
5b7bd9d
Changed use of heuristics
a80c6e9
Improved heuristic files
42da7bd
Merge branch 'master' into restructure
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
phys2bids interface for acqknowledge files. | ||
""" | ||
from bioread import read_file | ||
|
||
from phys2bids.physio_obj import blueprint_input | ||
|
||
|
||
def populate_phys_input(filename, chtrig): | ||
rmarkello marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
Populate object phys_input | ||
""" | ||
|
||
data = read_file(filename).channels | ||
|
||
freq = [data[chtrig].samples_per_second] * 2 | ||
timeseries = [data[chtrig].time_index, data[chtrig].data] | ||
units = ['s', data[chtrig].units] | ||
names = ['time', 'trigger'] | ||
|
||
k = 0 | ||
for ch in data: | ||
if k != chtrig: | ||
print(f'{k:02d}. {ch}') | ||
timeseries.append(ch.data) | ||
freq.append(ch.samples_per_second) | ||
units.append(ch.units) | ||
k += 1 | ||
smoia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
return blueprint_input(timeseries, freq, names, units) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the default as
['']
will mean thatoptions.ch_name
in thephys2bids.py
module will always evaluate to True. I think we should just leave the default off (which means, if not provided, it will default to None), and then check for equivalency to NoneType inphys2bids.py
. I'll make a comment in the relevant spot!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it interfere with the check that the parser is doing on the type of input we expect?