{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/41102068","id":41102068,"diff_hunk":"@@ -1355,3 +1357,260 @@ def write_bem_solution(fname, bem):\n                                bem['solution'])\n         end_block(fid, FIFF.FIFFB_BEM)\n         end_file(fid)\n+\n+\n+# #############################################################################\n+# Create 3-Layers BEM model from Flash MRI images\n+\n+def make_flash_bem(subject, subjects_dir, noflash30=False, noconvert=False,\n+                   unwarp=False, show=False):\n+    \"\"\"Create 3-Layers BEM model from Flash MRI images\n+\n+    Parameters\n+    -----------\n+    subject : string\n+        Subject name.\n+    subjects_dir : string\n+        Directory containing subjects data (Freesurfer SUBJECTS_DIR).\n+    noflash30 : bool\n+        Skip the 30-degree flip angle data.\n+    noconvert : bool\n+        Assume that the Flash MRI images have already been converted\n+        to mgz files.\n+    show : bool\n+        Show surfaces in 3D to visually inspect all three BEM\n+        surfaces (recommended).\n+\n+    Notes\n+    -----\n+    This program assumes that both Freesurfer/FSL, and MNE, including MNE's\n+    Matlab Toolbox, are installed properly.\n+\n+    This function extracts the BEM surfaces (outer skull, inner skull, and\n+    outer skin) from multiecho FLASH MRI data with spin angles of 5 and 30\n+    degrees. The multiecho FLASH data are inputted in DICOM format.\n+    This function assumes that the Freesurfer segmentation of the subject\n+    has been completed. In particular, the T1.mgz and brain.mgz MRI volumes\n+    should be, as usual, in the subject's mri directory.\n+\n+    Before running this script do the following:\n+    (unless the --noconvert option is specified)\n+\n+        1. Copy all of your FLASH images in a single directory <source> and\n+           create a directory <dest> to hold the output of mne_organize_dicom\n+        2. cd to <dest> and run\n+           $ mne_organize_dicom <source>\n+           to create an appropriate directory structure\n+        3. Create symbolic links to make flash05 and flash30 point to the\n+           appropriate series:\n+           $ ln -s <FLASH 5 series dir> flash05\n+           $ ln -s <FLASH 30 series dir> flash30\n+        4. cd to the directory where flash05 and flash30 links are\n+        5. Set SUBJECTS_DIR and SUBJECT environment variables appropriately\n+        6. Run this script\n+    \"\"\"\n+    from . import read_surface\n+    env = os.environ.copy()\n+\n+    if subject:\n+        env['SUBJECT'] = subject\n+    else:\n+        raise RuntimeError('The subject argument must be set')\n+    subjects_dir = get_subjects_dir(subjects_dir, raise_error=True)\n+    env['SUBJECTS_DIR'] = subjects_dir\n+\n+    mri_dir = op.join(subjects_dir, subject, 'mri')\n+    bem_dir = op.join(subjects_dir, subject, 'bem')\n+\n+    logger.info('\\nProcessing the flash MRI data to produce BEM meshes with '\n+                'the following parameters:\\n'\n+                'SUBJECTS_DIR = %s\\n'\n+                'SUBJECT = %s\\n'\n+                'Result dir = %s\\n' % (subjects_dir, subject,\n+                                       op.join(bem_dir, 'flash')))\n+    # Step 1a : Data conversion to mgz format\n+    if not op.exists(op.join(mri_dir, 'flash', 'parameter_maps')):\n+        os.makedirs(op.join(mri_dir, 'flash', 'parameter_maps'))\n+    echos_done = 0\n+    if not noconvert:\n+        logger.info(\"\\n---- Converting Flash images ----\")\n+        echos = ['001', '002', '003', '004', '005', '006', '007', '008']\n+        if noflash30:\n+            flashes = ['05']\n+        else:\n+            flashes = ['05', '30']\n+        #\n+        missing = False\n+        for flash in flashes:\n+            for echo in echos:\n+                if not op.isdir(op.join('flash' + flash, echo)):\n+                    missing = True\n+        if missing:\n+            echos = ['002', '003', '004', '005', '006', '007', '008', '009']\n+            for flash in flashes:\n+                for echo in echos:\n+                    if not op.isdir(op.join('flash' + flash, echo)):\n+                        raise RuntimeError(\"Directory %s is missing.\"\n+                                           % op.join('flash' + flash, echo))\n+        #\n+        for flash in flashes:\n+            for echo in echos:\n+                if not op.isdir(op.join('flash' + flash, echo)):\n+                    raise RuntimeError(\"Directory %s is missing.\"\n+                                       % op.join('flash' + flash, echo))\n+                sample_file = glob.glob(op.join('flash' + flash, echo, '*'))[0]\n+                dest_file = op.join(mri_dir, 'flash',\n+                                    'mef' + flash + '_' + echo + '.mgz')\n+                # do not redo if already present\n+                if op.isfile(dest_file):\n+                    logger.info(\"The file %s is already there\")\n+                else:\n+                    cmd = ['mri_convert', sample_file, dest_file]\n+                    run_subprocess(cmd, env=env, stdout=sys.stdout)\n+                    echos_done += 1\n+    # Step 1b : Run grad_unwarp on converted files\n+    os.chdir(op.join(mri_dir, \"flash\"))\n+    files = glob.glob(\"mef*.mgz\")\n+    if unwarp:\n+        logger.info(\"\\n---- Unwarp mgz data sets ----\")\n+        for infile in files:\n+            outfile = infile.replace(\".mgz\", \"u.mgz\")\n+            cmd = ['grad_unwarp', '-i', infile, '-o', outfile, '-unwarp',\n+                   'true']\n+            run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    # Clear parameter maps if some of the data were reconverted\n+    if echos_done > 0 and op.exists(\"parameter_maps\"):\n+        shutil.rmtree(\"parameter_maps\")\n+        logger.info(\"\\nParameter maps directory cleared\")\n+    if not op.exists(\"parameter_maps\"):\n+        os.makedirs(\"parameter_maps\")\n+    # Step 2 : Create the parameter maps\n+    if not noflash30:\n+        logger.info(\"\\n---- Creating the parameter maps ----\")\n+        if unwarp:\n+            files = glob.glob(\"mef05*u.mgz\")\n+        if len(os.listdir('parameter_maps')) == 0:\n+            cmd = ['mri_ms_fitparms'] + files + ['parameter_maps']\n+            run_subprocess(cmd, env=env, stdout=sys.stdout)\n+        else:\n+            logger.info(\"Parameter maps were already computed\")\n+    # Step 3 : Synthesize the flash 5 images\n+        logger.info(\"\\n---- Synthesizing flash 5 images ----\")\n+        os.chdir('parameter_maps')\n+        if not op.exists('flash5.mgz'):\n+            cmd = ['mri_synthesize', '20 5 5', 'T1.mgz', 'PD.mgz',\n+                   'flash5.mgz']\n+            run_subprocess(cmd, env=env, stdout=sys.stdout)\n+            os.remove('flash5_reg.mgz')\n+        else:\n+            logger.info(\"Synthesized flash 5 volume is already there\")\n+    else:\n+        logger.info(\"\\n---- Averaging flash5 echoes ----\")\n+        os.chdir('parameter_maps')\n+        if unwarp:\n+            files = glob.glob(\"mef05*u.mgz\")\n+        else:\n+            files = glob.glob(\"mef05*.mgz\")\n+        cmd = ['mri_average', '-noconform', files, 'flash5.mgz']\n+        run_subprocess(cmd, env=env, stdout=sys.stdout)\n+        if op.exists('flash5_reg.mgz'):\n+            os.remove('flash5_reg.mgz')\n+    # Step 4 : Register with MPRAGE\n+    logger.info(\"\\n---- Registering flash 5 with MPRAGE ----\")\n+    if not op.exists('flash5_reg.mgz'):\n+        if op.exists(op.join(mri_dir, 'T1.mgz')):\n+            ref_volume = op.join(mri_dir, 'T1.mgz')\n+        else:\n+            ref_volume = op.join(mri_dir, 'T1')\n+        cmd = ['fsl_rigid_register', '-r', ref_volume, '-i', 'flash5.mgz',\n+               '-o', 'flash5_reg.mgz']\n+        run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    else:\n+        logger.info(\"Registered flash 5 image is already there\")\n+    # Step 5a : Convert flash5 into COR\n+    logger.info(\"\\n---- Converting flash5 volume into COR format ----\")\n+    shutil.rmtree(op.join(mri_dir, 'flash5'), ignore_errors=True)\n+    os.makedirs(op.join(mri_dir, 'flash5'))\n+    cmd = ['mri_convert', 'flash5_reg.mgz', op.join(mri_dir, 'flash5')]\n+    run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    # Step 5b and c : Convert the mgz volumes into COR\n+    os.chdir(mri_dir)\n+    convertT1 = False\n+    if op.isdir('T1'):\n+        if len(glob.glob('T1/COR*')) == 0:\n+            convertT1 = True\n+    else:\n+        convertT1 = True\n+    convertbrain = False\n+    if op.isdir('brain'):\n+        if len(glob.glob('brain/COR*')) == 0:\n+            convertbrain = True\n+    else:\n+        convertbrain = True\n+    logger.info(\"\\n---- Converting T1 volume into COR format ----\")\n+    if convertT1:\n+        if not op.isfile('T1.mgz'):\n+            raise RuntimeError(\"Both T1 mgz and T1 COR volumes missing.\")\n+        os.makedirs('T1')\n+        cmd = ['mri_convert', 'T1.mgz', 'T1']\n+        run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    else:\n+        logger.info(\"T1 volume is already in COR format\")\n+    logger.info(\"\\n---- Converting brain volume into COR format ----\")\n+    if convertbrain:\n+        if not op.isfile('brain.mgz'):\n+            raise RuntimeError(\"Both brain mgz and brain COR volumes missing.\")\n+        os.makedirs('brain')\n+        cmd = ['mri_convert', 'brain.mgz', 'brain']\n+        run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    else:\n+        logger.info(\"Brain volume is already in COR format\")\n+    # Finally ready to go\n+    logger.info(\"\\n---- Creating the BEM surfaces ----\")\n+    cmd = ['mri_make_bem_surfaces', subject]\n+    run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    logger.info(\"\\n---- Converting the tri files into surf files ----\")\n+    os.chdir(bem_dir)\n+    if not op.exists('flash'):\n+        os.makedirs('flash')\n+    os.chdir('flash')\n+    surfs = ['inner_skull', 'outer_skull', 'outer_skin']\n+    for surf in surfs:\n+        shutil.move(op.join(bem_dir, surf + '.tri'), surf + '.tri')\n+        cmd = ['mne_convert_surface', '--tri', surf + '.tri', '--surfout',\n+               surf + '.surf', '--swap', '--mghmri',\n+               op.join(subjects_dir, subject,\n+                       'mri/flash/parameter_maps/flash5_reg.mgz')]\n+        run_subprocess(cmd, env=env, stdout=sys.stdout)\n+    # Cleanup section\n+    logger.info(\"\\n---- Cleaning up ----\")\n+    os.chdir(bem_dir)\n+    os.remove('inner_skull_tmp.tri')\n+    os.chdir(mri_dir)\n+    if convertT1:\n+        shutil.rmtree('T1')\n+        logger.info(\"Deleted the T1 COR volume\")\n+    if convertbrain:\n+        shutil.rmtree('brain')\n+        logger.info(\"Deleted the brain COR volume\")\n+    shutil.rmtree('flash5')\n+    logger.info(\"Deleted the flash5 COR volume\")\n+    logger.info(\"\\nThank you for waiting.\\nThe BEM triangulations for this \"\n+                \"subject are now available at:\\n%s.\\nWe hope the BEM meshes \"\n+                \"created will facilitate your MEG and EEG data analyses.\"\n+                % op.join(bem_dir, 'flash'))\n+    # Show computed BEM surfaces\n+    if show:\n+        os.chdir(op.join(bem_dir, 'flash'))\n+        fnames = ['outer_skin.surf', 'outer_skull.surf', 'inner_skull.surf']\n+        head_col = (0.95, 0.83, 0.83)  # light pink\n+        skull_col = (0.91, 0.89, 0.67)\n+        brain_col = (0.67, 0.89, 0.91)  # light blue\n+        colors = [head_col, skull_col, brain_col]\n+        from mayavi import mlab\n+        mlab.clf()\n+        for fname, c in zip(fnames, colors):\n+            points, faces = read_surface(fname)\n+            mlab.triangular_mesh(points[:, 0], points[:, 1], points[:, 2],\n+                                 faces, color=c, opacity=0.3)\n+        mlab.show()","path":"mne/bem.py","position":280,"original_position":276,"commit_id":"71461f5e99a66aec1b14add171a32fe9da88d9d8","original_commit_id":"4f83ad438cb3034a22dc09b7dcffe0a4bb8f0971","user":{"login":"lorenzo-desantis","id":8113283,"avatar_url":"https://avatars.githubusercontent.com/u/8113283?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo-desantis","html_url":"https://github.com/lorenzo-desantis","followers_url":"https://api.github.com/users/lorenzo-desantis/followers","following_url":"https://api.github.com/users/lorenzo-desantis/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo-desantis/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo-desantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo-desantis/subscriptions","organizations_url":"https://api.github.com/users/lorenzo-desantis/orgs","repos_url":"https://api.github.com/users/lorenzo-desantis/repos","events_url":"https://api.github.com/users/lorenzo-desantis/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo-desantis/received_events","type":"User","site_admin":false},"body":"No, it's not the case, I will add that (but it wasn't the case also for the mne-c script)","created_at":"2015-10-04T20:34:56Z","updated_at":"2015-10-04T20:34:56Z","html_url":"https://github.com/mne-tools/mne-python/pull/2254#discussion_r41102068","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/41102068"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2254#discussion_r41102068"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254","id":39181701,"html_url":"https://github.com/mne-tools/mne-python/pull/2254","diff_url":"https://github.com/mne-tools/mne-python/pull/2254.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2254.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2254","number":2254,"state":"open","locked":false,"title":"mne_flash_bem","user":{"login":"lorenzo-desantis","id":8113283,"avatar_url":"https://avatars.githubusercontent.com/u/8113283?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo-desantis","html_url":"https://github.com/lorenzo-desantis","followers_url":"https://api.github.com/users/lorenzo-desantis/followers","following_url":"https://api.github.com/users/lorenzo-desantis/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo-desantis/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo-desantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo-desantis/subscriptions","organizations_url":"https://api.github.com/users/lorenzo-desantis/orgs","repos_url":"https://api.github.com/users/lorenzo-desantis/repos","events_url":"https://api.github.com/users/lorenzo-desantis/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo-desantis/received_events","type":"User","site_admin":false},"body":"Converting bash scripts\r\nAdded `mne/commands/mne_flash_bem.py` (which is integrating `mne/commands/mne_flash_bem_model.py`)","created_at":"2015-07-03T14:58:58Z","updated_at":"2015-10-04T20:34:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a75ad9da2acaef1ddc49e89d9b1be158bb23ac5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2254/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/71461f5e99a66aec1b14add171a32fe9da88d9d8","head":{"label":"lorenzo-desantis:bem_commands_flash","ref":"bem_commands_flash","sha":"71461f5e99a66aec1b14add171a32fe9da88d9d8","user":{"login":"lorenzo-desantis","id":8113283,"avatar_url":"https://avatars.githubusercontent.com/u/8113283?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo-desantis","html_url":"https://github.com/lorenzo-desantis","followers_url":"https://api.github.com/users/lorenzo-desantis/followers","following_url":"https://api.github.com/users/lorenzo-desantis/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo-desantis/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo-desantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo-desantis/subscriptions","organizations_url":"https://api.github.com/users/lorenzo-desantis/orgs","repos_url":"https://api.github.com/users/lorenzo-desantis/repos","events_url":"https://api.github.com/users/lorenzo-desantis/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo-desantis/received_events","type":"User","site_admin":false},"repo":{"id":30750954,"name":"mne-python","full_name":"lorenzo-desantis/mne-python","owner":{"login":"lorenzo-desantis","id":8113283,"avatar_url":"https://avatars.githubusercontent.com/u/8113283?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo-desantis","html_url":"https://github.com/lorenzo-desantis","followers_url":"https://api.github.com/users/lorenzo-desantis/followers","following_url":"https://api.github.com/users/lorenzo-desantis/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo-desantis/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo-desantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo-desantis/subscriptions","organizations_url":"https://api.github.com/users/lorenzo-desantis/orgs","repos_url":"https://api.github.com/users/lorenzo-desantis/repos","events_url":"https://api.github.com/users/lorenzo-desantis/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo-desantis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lorenzo-desantis/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/lorenzo-desantis/mne-python","forks_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/forks","keys_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/teams","hooks_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/hooks","issue_events_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/events","assignees_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/tags","blobs_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/languages","stargazers_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/stargazers","contributors_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/contributors","subscribers_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/subscribers","subscription_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/subscription","commits_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/merges","archive_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/downloads","issues_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/lorenzo-desantis/mne-python/releases{/id}","created_at":"2015-02-13T10:05:20Z","updated_at":"2015-04-12T18:13:13Z","pushed_at":"2015-10-04T18:58:29Z","git_url":"git://github.com/lorenzo-desantis/mne-python.git","ssh_url":"git@github.com:lorenzo-desantis/mne-python.git","clone_url":"https://github.com/lorenzo-desantis/mne-python.git","svn_url":"https://github.com/lorenzo-desantis/mne-python","homepage":"http://martinos.org/mne/","size":81518,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"d9805c5cb431d632b4f374c0afe8016501dd252f","user":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":1301584,"name":"mne-python","full_name":"mne-tools/mne-python","owner":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mne-tools/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-python","forks_url":"https://api.github.com/repos/mne-tools/mne-python/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-python/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-python/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-python/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-python/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-python/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-python/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-python/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-python/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-python/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-python/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-python/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-python/releases{/id}","created_at":"2011-01-28T03:31:13Z","updated_at":"2015-09-26T14:37:30Z","pushed_at":"2015-10-04T20:25:39Z","git_url":"git://github.com/mne-tools/mne-python.git","ssh_url":"git@github.com:mne-tools/mne-python.git","clone_url":"https://github.com/mne-tools/mne-python.git","svn_url":"https://github.com/mne-tools/mne-python","homepage":"http://martinos.org/mne/","size":183454,"stargazers_count":148,"watchers_count":148,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":180,"forks":142,"open_issues":180,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2254"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2254"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2254/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2254/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/71461f5e99a66aec1b14add171a32fe9da88d9d8"}}}}