-
Notifications
You must be signed in to change notification settings - Fork 3
Dev hendrik #101
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
Merged
Merged
Dev hendrik #101
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c97e8ae
added MPS
Hendrik-code a24d0d9
extracted function to get_identifier()
Hendrik-code 8b8ad8e
maded error msg clearer
Hendrik-code d0499f9
orientation and dtype setter
Hendrik-code 47a32d5
fixed return hint
Hendrik-code df93b0e
verbose is correctly pushed to lower function
Hendrik-code 85f2f73
fixed catching type here
Hendrik-code 2ec1be3
fixed verbose
Hendrik-code 885ea24
fixed open inference config file
Hendrik-code b66f30c
formatting
Hendrik-code 24c6ad3
merge from main
Hendrik-code 612fbc3
fix ruff
Hendrik-code 12a41dc
adress robsy comment
Hendrik-code 80cd37d
same as latest commit
Hendrik-code 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1096,6 +1096,22 @@ def get_frame_of_reference_uid(self, default=None): | |||||||||||||||||||
| base36 = chars[i] + base36 | ||||||||||||||||||||
| return base36[:length] | ||||||||||||||||||||
|
|
||||||||||||||||||||
| def get_identifier(self, sequence_splitting_keys: list[str]) -> str: | ||||||||||||||||||||
| """Generates an identifier for the BIDS_FILE based on subject and splitting keys | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Args: | ||||||||||||||||||||
| sequence_splitting_keys (list[str]): list of keys to use for splitting | ||||||||||||||||||||
| """ | ||||||||||||||||||||
| if "sub" not in self.info: | ||||||||||||||||||||
| print(f"family_id, no sub-key, got {self.info}") | ||||||||||||||||||||
| identifier = "sub-404" | ||||||||||||||||||||
| else: | ||||||||||||||||||||
| identifier = "sub-" + self.info["sub"] | ||||||||||||||||||||
| for s in self.info.keys(): | ||||||||||||||||||||
| if s in sequence_splitting_keys: | ||||||||||||||||||||
| identifier += "_" + s + "-" + self.info[s] | ||||||||||||||||||||
| return identifier | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| class Searchquery: | ||||||||||||||||||||
| def __init__(self, subj: Subject_Container, flatten=False) -> None: | ||||||||||||||||||||
|
|
@@ -1456,15 +1472,16 @@ def __lt__(self, other): | |||||||||||||||||||
|
|
||||||||||||||||||||
| def get_identifier(self): | ||||||||||||||||||||
| first_e = self.data_dict[next(iter(self.data_dict.keys()))][0] | ||||||||||||||||||||
| if "sub" not in first_e.info: | ||||||||||||||||||||
| print(f"family_id, no sub-key, got {first_e.info} and data_dict {list(self.data_dict.keys())}") | ||||||||||||||||||||
| identifier = "sub-404" | ||||||||||||||||||||
| else: | ||||||||||||||||||||
| identifier = "sub-" + first_e.info["sub"] | ||||||||||||||||||||
| for s in first_e.info.keys(): | ||||||||||||||||||||
| if s in self.sequence_splitting_keys: | ||||||||||||||||||||
| identifier += "_" + s + "-" + first_e.info[s] | ||||||||||||||||||||
| return identifier | ||||||||||||||||||||
| return first_e.get_identifier(self.sequence_splitting_keys) | ||||||||||||||||||||
| # if "sub" not in first_e.info: | ||||||||||||||||||||
| # print(f"family_id, no sub-key, got {first_e.info} and data_dict {list(self.data_dict.keys())}") | ||||||||||||||||||||
| # identifier = "sub-404" | ||||||||||||||||||||
| # else: | ||||||||||||||||||||
| # identifier = "sub-" + first_e.info["sub"] | ||||||||||||||||||||
| # for s in first_e.info.keys(): | ||||||||||||||||||||
| # if s in self.sequence_splitting_keys: | ||||||||||||||||||||
| # identifier += "_" + s + "-" + first_e.info[s] | ||||||||||||||||||||
| # return identifier | ||||||||||||||||||||
|
Comment on lines
+1484
to
+1492
|
||||||||||||||||||||
| # if "sub" not in first_e.info: | |
| # print(f"family_id, no sub-key, got {first_e.info} and data_dict {list(self.data_dict.keys())}") | |
| # identifier = "sub-404" | |
| # else: | |
| # identifier = "sub-" + first_e.info["sub"] | |
| # for s in first_e.info.keys(): | |
| # if s in self.sequence_splitting_keys: | |
| # identifier += "_" + s + "-" + first_e.info[s] | |
| # return identifier |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.