Last active
September 4, 2018 19:42
-
-
Save neuromusic/7e197ed1d54c03bc9f4ad115b53762c3 to your computer and use it in GitHub Desktop.
example of nwb viz library API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nwbviz import view, option | |
@view(requirements='DfOverF') | |
def rastermap(nwbfile): | |
""" Generates a sorted raster map of calcium data | |
https://github.com/MouseLand/rastermap | |
Parameters: | |
------- | |
nwbfile : pynwb NwbFile instance | |
Returns: | |
------- | |
ax : matplotlib axes | |
""" | |
<...> | |
return ax | |
@option('Lower bound',keyword='lower',default=0.0,help="Lower bound of window") | |
@option('Upper bound',keyword='upper',default=0.5,help="Upper bound of window") | |
@view(requirements=["DfOverF", "ImageSeries"]) | |
def image_evoked_calcium_response(nwbfile,lower,upper): | |
""" Calculates mean calcium response to each stimulus image. | |
Parameters: | |
------- | |
nwbfile : pynwb NwbFile instance | |
lower : lower bound of window | |
upper : upper bound of window | |
Returns: | |
------- | |
hv : Holoviews object | |
""" | |
<...> | |
return hv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@tarelli yes, I suppose my proposal is twofold...