GitHub PullRequestReviewCommentEvent at 2014-04-29 06:53:51
Repository: jumeg
Actor: pravsripad
Payload: {"comment":{"url":"https://api.github.com/repos/jdammers/jumeg/pulls/comments/12081407","id":12081407,"diff_hunk":"@@ -0,0 +1,119 @@\n+import mne, sys\n+import numpy as np\n+\n+def mark_bads_batch(subject_list, subjects_dir=None):\n+    '''\n+    Opens all raw files ending with -raw.fif in subjects directory for marking bads.\n+\n+    Parameters\n+    ----------\n+    subject_list: List of subjects. \n+    subjects_dir: The subjects directory. If None, the default SUBJECTS_DIR from environment will be considered.\n+\n+    Output\n+    ------\n+    The raw files with bads marked are saved with _bads_marked.fif suffix. \n+    '''\n+    for subj in subjects:\n+        print \"For subject %s\"%(subj)\n+        if not subjects_dir: SUBJECTS_DIR = os.environ['SUBJECTS_DIR']\n+        dirname = SUBJECTS_DIR+'/'+subj\n+        for raw_fname in os.listdir(dirname):\n+            if raw_fname.endswith('-raw.fif'):","path":"utils.py","position":22,"original_position":22,"commit_id":"98388f3c58a11c6d1cfb8fdb164e6280f99baf84","original_commit_id":"98388f3c58a11c6d1cfb8fdb164e6280f99baf84","user":{"login":"pravsripad","id":4293133,"avatar_url":"https://avatars.githubusercontent.com/u/4293133?","gravatar_id":"ac3946203dcb358afc82f8bd105a8d17","url":"https://api.github.com/users/pravsripad","html_url":"https://github.com/pravsripad","followers_url":"https://api.github.com/users/pravsripad/followers","following_url":"https://api.github.com/users/pravsripad/following{/other_user}","gists_url":"https://api.github.com/users/pravsripad/gists{/gist_id}","starred_url":"https://api.github.com/users/pravsripad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravsripad/subscriptions","organizations_url":"https://api.github.com/users/pravsripad/orgs","repos_url":"https://api.github.com/users/pravsripad/repos","events_url":"https://api.github.com/users/pravsripad/events{/privacy}","received_events_url":"https://api.github.com/users/pravsripad/received_events","type":"User","site_admin":false},"body":"@jdammers @fboers  The file name conventions used in mne usually are: - \r\n\r\n-raw for raw files\r\n-ica for stored ICA sessions\r\n-eve for even files\r\n-fwd for the forward operator\r\n-inv for the inverse operator\r\n-trans for the transformation (co-ordinates)\r\n-cov for the covariance\r\n-proj for SSP projections\r\n-epochs and -ave for epochs and averages. \r\n\r\nAre they similar to conventions used by the existing IDL environment? \r\n\r\nI usually change \"101611_CAU01A_10-07-06_14:29_1_c,rfDC.fif\" to something like \"101611_audi_cued-raw.fif\" because it is easier to identify and the file name string is easy to modify. But it requires a little initial manual effort to sort and rename. \r\n\r\nWe could go for something like \"101611_CAU01A_100706_1429_1_c,rfDC-raw.fif\", notice the '-' and ':' removed and '-raw' added. What do you think? ","created_at":"2014-04-29T06:53:51Z","updated_at":"2014-04-29T06:53:51Z","html_url":"https://github.com/jdammers/jumeg/pull/4#discussion_r12081407","pull_request_url":"https://api.github.com/repos/jdammers/jumeg/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/jdammers/jumeg/pulls/comments/12081407"},"html":{"href":"https://github.com/jdammers/jumeg/pull/4#discussion_r12081407"},"pull_request":{"href":"https://api.github.com/repos/jdammers/jumeg/pulls/4"}}}}