{"action":"created","issue":{"url":"https://api.github.com/repos/INCF/bids-validator/issues/341","repository_url":"https://api.github.com/repos/INCF/bids-validator","labels_url":"https://api.github.com/repos/INCF/bids-validator/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/INCF/bids-validator/issues/341/comments","events_url":"https://api.github.com/repos/INCF/bids-validator/issues/341/events","html_url":"https://github.com/INCF/bids-validator/issues/341","id":265769607,"number":341,"title":"add a check that 'PhaseEncodingDirection' is consistent between fmap and \"Intended\" files","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars3.githubusercontent.com/u/39889?v=4","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2017-10-16T13:26:54Z","updated_at":"2017-10-16T18:36:30Z","closed_at":null,"author_association":"MEMBER","body":"For a fieldmap to be useful, its 'PhaseEncodingDirection' must match the 'PhaseEncodingDirection' in the sidecar files of \"IntentedFor\" files.\r\n\r\nHere is a quick & dirty grep on openfmri which could have false positives and miss stuff... just a quick check -- whenever you see them present and not matching, might be an issue\r\n\r\n```shell\r\n(git)smaug:/mnt/btrfs/datasets/datalad/crawl/openfmri[master]git\r\n$> for ds in ds*; do echo $ds; ( builtin cd $ds; s=`/bin/ls -d sub-*|head -n 1`; [ ! -z $s ] || continue; fmap=`/usr/bin/find $s -iname '*.json' | grep fmap | head -n 1`; func=`/usr/bin/find $s -iname '*.json' | grep '\\(func\\|dwi\\)' | head -n 1`; [ -z \"$fmap\" ] && continue; [ -z \"$func\" ] && continue; grep '\"PhaseEncodingDirection' $fmap $func; ); done\r\nds000001\r\nds000002\r\nds000003\r\nds000005\r\nds000006\r\nds000007\r\nds000008\r\nds000009\r\nds000011\r\nds000017\r\nds000017A\r\n/bin/ls: cannot access 'sub-*': No such file or directory\r\nds000017B\r\n/bin/ls: cannot access 'sub-*': No such file or directory\r\nds000030\r\nds000031\r\nds000051\r\nds000052\r\nds000053\r\nds000101\r\nds000102\r\nds000105\r\nds000107\r\nds000108\r\nds000109\r\nds000110\r\nds000113\r\n/bin/ls: cannot access 'sub-*': No such file or directory\r\nds000113b\r\nds000113c\r\nds000113d\r\nds000114\r\nds000115\r\nds000116\r\nds000117\r\n/bin/ls: cannot access 'sub-*': No such file or directory\r\nds000119\r\nds000120\r\nds000121\r\nds000122\r\nds000133\r\nds000138\r\nds000140\r\nds000148\r\nds000149\r\n/bin/ls: cannot access 'sub-*': No such file or directory\r\nds000157\r\nds000158\r\nds000164\r\nds000168\r\nds000170\r\nds000171\r\nds000172\r\nsub-control01/func/sub-control01_task-rest_acq-voxelsize112_bold.json:   \"PhaseEncodingDirection\": \"j-\", \r\nds000174\r\nds000177\r\nds000200\r\nds000201\r\nsub-9001/ses-1/fmap/sub-9001_ses-1_magnitude1.json:  \"PhaseEncodingDirection\" : \"j\",\r\nsub-9001/ses-2/dwi/sub-9001_ses-2_dwi.json:  \"PhaseEncodingDirection\" : \"j\",\r\nds000202\r\nds000203\r\nds000204\r\nds000205\r\nds000206\r\nds000208\r\nds000210\r\nds000212\r\nds000213\r\nds000214\r\nds000216\r\nds000217\r\nds000218\r\nds000219\r\nds000220\r\nds000221\r\nsub-010001/ses-02/fmap/sub-010001_ses-02_acq-GEfmap_run-01_magnitude1.json:    \"PhaseEncodingDirection\": \"i-\", \r\nsub-010001/ses-02/func/sub-010001_ses-02_task-rest_acq-AP_run-01_bold.json:    \"PhaseEncodingDirection\": \"j-\", \r\nds000222\r\nds000223\r\nsub-01/fmap/sub-01_dir-opposing_run-01_epi.json:     \"PhaseEncodingDirection\": \"j-\"\r\nsub-01/func/sub-01_task-mag_run-01_bold.json:\"PhaseEncodingDirection\": \"j\",\r\nds000224\r\nds000228\r\nds000229\r\nds000231\r\nds000232\r\nds000233\r\nds000234\r\nds000235\r\nds000236\r\nds000237\r\nds000239\r\nds000243\r\n```"},"comment":{"url":"https://api.github.com/repos/INCF/bids-validator/issues/comments/336987978","html_url":"https://github.com/INCF/bids-validator/issues/341#issuecomment-336987978","issue_url":"https://api.github.com/repos/INCF/bids-validator/issues/341","id":336987978,"user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars3.githubusercontent.com/u/39889?v=4","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"created_at":"2017-10-16T18:36:30Z","updated_at":"2017-10-16T18:36:30Z","author_association":"MEMBER","body":"thanks you @oesteban -- this quote applies to just how to correct for the distortion, not how it could apply if the distortion/warping has happened in the opposite direction (i.e. e.g. if PE was i, while EPI was i-)\r\n\r\n@chrisfilo thanks for the explanation! re **The field susceptibility is not related to phase encoding direction** --  ignorant me could only trust and check ;) will do."}}
{"actor":{"display_login":"yarikoptic"}}