brainplotlib

A lightweight package to plot brain surfaces with Python.

https://github.com/feilong/brainplotlib

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

brain fmri neuroimaging plotting python visualization
Last synced: 6 months ago · JSON representation ·

Repository

A lightweight package to plot brain surfaces with Python.

Basic Info
Statistics
  • Stars: 41
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
brain fmri neuroimaging plotting python visualization
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

PyPI Downloads PyPI - Python Version DOI

brainplotlib is a Python package that plots data on cortical surface. It's designed to have minimal requirements --- only NumPy and matplotlib.

brain image

Installation

The package can be installed with pip: bash pip install brainplotlib

Example usage

See the examples gallery for all code examples with detailed explanations.

```Python import numpy as np from brainplotlib import brainplot, exampledata

The example_data is icoorder5 resolution (10242 vertices per hemisphere),

and the non-cortical vertices have been masked out (9372 and 9370 remaining

vertices for the left and right hemisphere, respectively).

img, scale = brainplot( exampledata, vmax=10, vmin=-10, cmap='seismic', return_scale=True) ```

The rendered image is a NumPy array. It can be rendered using matplotlib: Python import matplotlib.pyplot as plt fig = plt.figure(figsize=(img.shape[1] / 200, img.shape[0] / 200), dpi=200) plt.imshow(img) plt.axis('off') cbar = plt.colorbar(scale, shrink=0.8, aspect=30) plt.savefig('example_data_with_colorbar.png', bbox_inches='tight') plt.show()

Alternatively, the high-resolution image can be saved directly using OpenCV. Python import cv2 cv2.imwrite( 'example_data.png', np.round(img[:, :, [2, 1, 0]] * 255).astype(np.uint8))

Citation

If you use this software in your publications, please cite it DOI bibtex @software{brainplotlib, author = {Ma Feilong and Guo Jiahui and M. Ida Gobbini and James V. Haxby}, title = {brainplotlib: plotting brain data on cortical surface}, month = feb, year = 2022, publisher = {Zenodo}, doi = {10.5281/zenodo.5979819}, url = {https://doi.org/10.5281/zenodo.5979819} }

Owner

  • Name: Feilong Ma
  • Login: feilong
  • Kind: user

Citation (CITATION.bib)

@software{brainplotlib,
  author       = {Ma Feilong and Guo Jiahui and M. Ida Gobbini and James V. Haxby},
  title        = {brainplotlib: plotting brain data on cortical surface},
  month        = feb,
  year         = 2022,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.5979819},
  url          = {https://doi.org/10.5281/zenodo.5979819}
}

GitHub Events

Total
  • Watch event: 7
  • Fork event: 1
Last Year
  • Watch event: 7
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 28
  • Total Committers: 1
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Feilong Ma m****g@g****m 28

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 44 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 7
  • Total maintainers: 1
pypi.org: brainplotlib

A lightweight package to plot brain surfaces with Python.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 44 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 12.1%
Average: 20.8%
Dependent repos count: 21.5%
Forks count: 29.8%
Downloads: 30.4%
Maintainers (1)
Last synced: 6 months ago