Teetool
Probabilistic modelling of trajectories
Public Member Functions | Private Attributes | List of all members
teetool.visual_3d.Visual_3d Class Reference

Visual_3d class generates the 3d output using Mayavi. More...

Inheritance diagram for teetool.visual_3d.Visual_3d:

Public Member Functions

def __init__ (self, thisWorld, kwargs)
 Constructor for Visual_3d. More...
 
def plot (self, args, kwargs)
 standard plotting function for Mayavi, plot3d More...
 
def plotMean (self, list_icluster=None, colour=None, kwargs)
 Plot mean of trajectories. More...
 
def plotTrajectories (self, list_icluster=None, ntraj=50, colour=None, kwargs)
 Plot trajectories of cluster. More...
 
def plotTrajectoriesPoints (self, x1, list_icluster=None, ntraj=50, colour=None, kwargs)
 Plot points in trajectories of cluster. More...
 
def plotLogDifference (self, icluster1, icluster2, pmin=0.0, pmax=1.0)
 
def plotTube (self, list_icluster=None, sdwidth=1, alpha=1.0, resolution=None, colour=None, kwargs)
 
def plotTubeDifference (self, list_icluster=None, sdwidth=1, alpha=1.0, resolution=None, kwargs)
 
def setView (self, kwargs)
 passes arguments to view More...
 
def setLabels (self, xlabel="", ylabel="", zlabel="")
 
def setAxesFormat (self, newFormat="%.0f")
 
def plotGrid (self, list_icluster=None, resolution=1, outline=None)
 
def plotLogLikelihood (self, list_icluster=None, pmin=0.0, pmax=1.0, popacity=0.3, resolution=None)
 
def plotOutline (self, list_icluster=None)
 
def plotTitle (self, title=None)
 
def save (self, add=None, path="output")
 
def show (self)
 
def close (self)
 

Private Attributes

 _mfig
 Mayavi figure. More...
 
 _world
 World object. More...
 

Detailed Description

Visual_3d class generates the 3d output using Mayavi.

Constructor & Destructor Documentation

§ __init__()

def teetool.visual_3d.Visual_3d.__init__ (   self,
  thisWorld,
  kwargs 
)

Constructor for Visual_3d.

Parameters
selfobject pointer
thisWorldWorld object, filled with trajectory data and models
kwargsadditional parameters for mlab.figure()

Member Function Documentation

§ close()

def teetool.visual_3d.Visual_3d.close (   self)
closes figure(s)

§ plot()

def teetool.visual_3d.Visual_3d.plot (   self,
  args,
  kwargs 
)

standard plotting function for Mayavi, plot3d

Parameters
selfobject pointer
argsadditional arguments for plotting
kwargsadditional labeled parameters for plotting

§ plotGrid()

def teetool.visual_3d.Visual_3d.plotGrid (   self,
  list_icluster = None,
  resolution = 1,
  outline = None 
)
plots a gridplane, based on src

input:
    - list_icluster
    - resolution

§ plotLogDifference()

def teetool.visual_3d.Visual_3d.plotLogDifference (   self,
  icluster1,
  icluster2,
  pmin = 0.0,
  pmax = 1.0 
)

§ plotLogLikelihood()

def teetool.visual_3d.Visual_3d.plotLogLikelihood (   self,
  list_icluster = None,
  pmin = 0.0,
  pmax = 1.0,
  popacity = 0.3,
  resolution = None 
)
plots log-likelihood

input parameters:
    - list_icluster
    - pmin
    - pmax

§ plotMean()

def teetool.visual_3d.Visual_3d.plotMean (   self,
  list_icluster = None,
  colour = None,
  kwargs 
)

Plot mean of trajectories.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotOutline()

def teetool.visual_3d.Visual_3d.plotOutline (   self,
  list_icluster = None 
)
adds an outline

input parameters:
    - list_icluster

§ plotTitle()

def teetool.visual_3d.Visual_3d.plotTitle (   self,
  title = None 
)
adds a title

§ plotTrajectories()

def teetool.visual_3d.Visual_3d.plotTrajectories (   self,
  list_icluster = None,
  ntraj = 50,
  colour = None,
  kwargs 
)

Plot trajectories of cluster.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
ntrajmaximum number of trajectories
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotTrajectoriesPoints()

def teetool.visual_3d.Visual_3d.plotTrajectoriesPoints (   self,
  x1,
  list_icluster = None,
  ntraj = 50,
  colour = None,
  kwargs 
)

Plot points in trajectories of cluster.

Parameters
selfobject pointer
x1timing [0, 1] to visualise points
list_iclusterlist of clusters to plot
ntrajmaximum number of trajectories
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotTube()

def teetool.visual_3d.Visual_3d.plotTube (   self,
  list_icluster = None,
  sdwidth = 1,
  alpha = 1.0,
  resolution = None,
  colour = None,
  kwargs 
)
plots log-probability

list_icluster is a list of lcusters, None is all
alpha relates to the opacity [0, 1]
resolution does the grid

§ plotTubeDifference()

def teetool.visual_3d.Visual_3d.plotTubeDifference (   self,
  list_icluster = None,
  sdwidth = 1,
  alpha = 1.0,
  resolution = None,
  kwargs 
)
plots difference between sets

input parameters:
    - icluster1
    - icluster2
    - sdwidth
    - alpha

§ save()

def teetool.visual_3d.Visual_3d.save (   self,
  add = None,
  path = "output" 
)
saves as file

§ setAxesFormat()

def teetool.visual_3d.Visual_3d.setAxesFormat (   self,
  newFormat = "%.0f" 
)
changes the format of axis

input:
    - newFormat

§ setLabels()

def teetool.visual_3d.Visual_3d.setLabels (   self,
  xlabel = "",
  ylabel = "",
  zlabel = "" 
)
sets the label

input:
    - xlabel
    - ylabel
    - zlabel

§ setView()

def teetool.visual_3d.Visual_3d.setView (   self,
  kwargs 
)

passes arguments to view

Parameters
selfobject pointer
kwargsoptional keyword parmeters azimuth float, optional. The azimuthal angle (in degrees, 0-360), i.e. the angle subtended by the position vector on a sphere projected on to the x-y plane with the x-axis. elevation float, optional. The zenith angle (in degrees, 0-180), i.e. the angle subtended by the position vector and the z-axis. distance float or auto, optional. A positive floating point number representing the distance from the focal point to place the camera. New in Mayavi 3.4.0: if auto is passed, the distance is computed to have a best fit of objects in the frame. focalpoint array_like or auto, optional. An array of 3 floating point numbers representing the focal point of the camera. New in Mayavi 3.4.0: if auto is passed, the focal point is positioned at the center of all objects in the scene. roll float, optional Controls the roll, ie the rotation of the camera around its axis. reset_roll boolean, optional. If True, and roll is not specified, the roll orientation of the camera is reset. figure The Mayavi figure to operate on. If None is passed, the current one is used.

§ show()

def teetool.visual_3d.Visual_3d.show (   self)
shows the image [waits for user input]

Member Data Documentation

§ _mfig

teetool.visual_3d.Visual_3d._mfig
private

Mayavi figure.

§ _world

teetool.visual_3d.Visual_3d._world
private

World object.


The documentation for this class was generated from the following file: