Plotting Module

The plotting module is for the collection and plotting of the data created by the toolbox. Many of these plots can be seen in the paper associated with this work.

Main Function

plotting.GenPlot(name1, value1, name2, value2, ...)
Description:

A function to load and plot the processed data from the specified ROMEG_DATA repository of data.

Parameters:
  • sense – plot the sensitivity analysis

  • layer_names – list of names in a cell

  • plot – type of plot, “Bar”, “Box”

  • num_samples – number of samples to read from

  • anis – isotropic layer to be compared to anisotropic counter parts

  • snap – plot the snap shot comparison data

  • bound – plot the bound data

Example

After running AllPlot.m script you may wish to make all the plots like so:

GenPlot(‘sense’,true,’snap’,true,’bound’,true)

Or to simply see the sense plot as a Bar graph instead of Box (default):

GenPlot(‘sense’,true,’plot’,’Bar’)

Classes

class plotting.PlottingClass

Bases: core.OrderedModelClass

Method Summary
plotHeadModel(name1, value1, name2, value2...)
Parameters:
  • model – path to model

  • axis – axis to cut along if desired e.g. ‘x’ or ‘y’

  • cut – how far along would you like to cut

  • fill – how would you like to colour in the tetrahedrons

  • solution – solution to the FEM equations.

  • electrodes – (boolean) would you like the electrodes plotted on the scalp?

  • cond_map – (boolean) for mapping the anisotropy in the skull which should be the second layer

  • sources – is the cond_map made with sources

  • sample_num – sample number to load estimates for.

  • folder – (character vector) name of inverse sub-folder, leave out to indicate main folder

  • elec_err – plot the error of estimation on each electrode, give layer number.

  • tag – tag for estimates file

  • tissue – which tissue to display (a number)

  • map_tissue – tissue to interpolate onto skull

  • amp_dense – plot the current density - must come with fill argument and conds argument

  • conds – conductivity of head model for current density

  • LIC – plot vector field

  • thickness – boolean dispay thickness of skull as colour

  • cmap – matlab colormap option

  • estimates – the estimates on the electrodes to plot

  • elec_centers – centre point in metres of the electrodes

Examples

plotting.plotHeadModel(‘model’,model,’electrodes’,true,… ‘sample_num’,4,’folder’,’inverse_12345’,’elec_err’,3)

plotting.plotHeadModel(‘model’,model,’cond_map’,true,… ‘sample_num’,4,)

class plotting.SenseClass(name1, value1, name2, value2, ...)

Bases: plotting.PlottingClass

Constructor Summary
SenseClass(name1, value1, name2, value2, ...)
Parameters:
  • layer_names – list of names in a cell

  • layers – layers to be estimated

  • plot – type of plot, “Bar”, “Box”

  • num_samples – array of sample numbers to read from

  • anis – isotropic layer to be compared to anisotropic counter parts

  • split_elec – split RE into individual electrodes

  • c – used to make folder string, layers estimated

  • tag – tag used to save estimates

Method Summary
plotSensitivity(name1, value1, name2, value2, ...)
Parameters:
  • layer_names – list of names in a cell

  • plot – type of plot, “Bar”, “Box”

  • num_samples – number of samples to read from

  • anis – isotropic layer to be compared to anisotropic counter parts

  • elec – electrode to view sensitivity

processResults()

obj.num_samples = size(obj.results_ROM,3);

class plotting.SnapShotClass(name1, value1, name2, value2, ...)

Bases: plotting.PlottingClass

Constructor Summary
SnapShotClass(name1, value1, name2, value2, ...)
Parameters:
  • range – (int) visualize how many snapshots

  • num_samples – array of sample numbers to read from

  • sample_num – sample or samples to visualize

  • split_conds – don’t average across all samples

  • split_layers – split the layers being displayed

  • omit – array for each sample, omit convergences that take longer than this

  • split_elec – don’t average across electrodes

  • tissue – which tissue to plot

  • layer_names – names of tissue layers in cell array

  • ROM – Only load ROM values

  • COV – plot the coefficient of variation for ROM