Skip to content

Commit

Permalink
[FIX/ENH] Address direction warning for Philips data and improve fmap…
Browse files Browse the repository at this point in the history
… detection
  • Loading branch information
Dan Levitas committed May 2, 2024
1 parent f737f38 commit 3137fdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion handler/ezBIDS_core/ezBIDS_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,8 @@ def create_lookup_info():
"spin_echo",
"sefmri",
"semri",
"pepolar"
"pepolar",
"topup"
]
)
lookup_dic[datatype][suffix]["conditions"].extend(
Expand Down
5 changes: 3 additions & 2 deletions ui/src/libUnsafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,8 @@ export function validateEntities(level: string, info: any) {
if (k === 'direction') {
/*
Ensure direction (dir) entity labels are capitalized (e.g. AP, not ap).
Can occur when user adds this themselves.
Can occur when user adds this themselves. Only do this if we have PED
info (e.g. Philips scanners don't provide this).
*/
if (entities[k] && entities[k] !== '') {
if (entities[k] !== entities[k].toUpperCase()) {
Expand All @@ -907,7 +908,7 @@ export function validateEntities(level: string, info: any) {
);
}

if (entities[k].toUpperCase() !== info.PED) {
if (entities[k].toUpperCase() !== info.PED && info.PED !== '') {
info.validationWarnings.push(
`ezBIDS detects that the direction should be ${info.PED}, not ${entities[k]}. Please verify before continuing`
);
Expand Down

0 comments on commit 3137fdb

Please sign in to comment.