offspect.cache.plot¶
-
plot_glass
(coords, values, display_mode='z', smooth=12.5, colorbar=True, vmax=None, title='')[source]¶ takes a list of coordinates and values and plots them as glass-brain
- Parameters
coords (
List
[List
[float
]]) – a list of [x,y,z] coordinates in MNI spacevalues (
List
[float
]) – a list of values for each coordinatedisplay_mode – which views to plot, defaults to ‘z’, i.e. top-down view
smooth (float) – how much the points should be smoothened during projection
colorbar (
bool
) – whether to plot a colorbar or not, defaults to plotting onevmax – the maximum value for scaling the colorbar. Defaults to adapting it to the data at hand
title (
str
) – a textual annotation to print into the upper left corner
- Returns
display – the glass-plot object
-
plot_map
(cachefiles, foo=<function <lambda>>, ignore_rejected=True, **kwargs)[source]¶ plot the whole map for a complete cachefile
- Parameters
cachefiles (List[CacheFile]) – a list of the cachefiles to be plotted
foo (Callable) – will be applied to each value, and defaults to passing the original. But could be, e.g. lambda x : log10(x + 1) to plot logarithmized values
ignore_rejected (bool) – defaults to True, and ignores any traces which have been flagged for rejection. Alternatively, ignore the rejection and plot their values anyways.
**kwargs – additional keyword arguments are passed to
plot_glass()
- Returns
display (the figure handle for the mapping plot)
-
project_into_nifti
(coords, values, smooth=12.5)[source]¶ takes a list of coordinates and values and projects them as a NiftiImage :type coords:
List
[List
[float
]] :param coords: a list of [x,y,z] coordinates in MNI space :type values:List
[float
] :param values: a list of values for each coordinate :type smooth:float
:param smooth: how much the points should be smoothened during projection :type smooth: float :param returns: the coords/values projected into a Nifti1Image :type returns: Nifti1Image :param Because after smoothening, values are decreased, the resulting image is rescaled to the original maximum value as given in the raw data.: