Commit d7db668c authored by Niels-Oliver Walkowski's avatar Niels-Oliver Walkowski
Browse files

redit docstring of analyze function

and change param name dtype to view for better consistency with class
parent 3cd855a4
......@@ -112,20 +112,32 @@ class Movie(object):
ctrst + ' - ' + desc
vis.saveplt(fname=filename, title=header)
def analyze(self, ctrst, meth, dtype, start=1, end=0, stp=5):
def analyze(self, ctrst, meth, view, start=1, end=0, stp=5):
"""Calculates contrast data for a specific contrast in the movie
ctrst: the contrast to be plotted
method: the method which should be used by the contrast class in order
to calculate the contrast
dtype: type of the visualization (distribution, seqmean, seqmad, etc)
possible values are: monochromatic, saturation, hue, cold-warm,
method: the method by which the peculiar contrast is calculated.
Possible values depend on the contrast type and include:
luminance, value, lightness, redniss_lab (monochromatic)
saturation, colourfulness (saturation)
hsV, labHcl (hue)
view: the way contrast is modeled in the data
possible values are: distribution, seqmean, seqmad, seqvar, seqper
start: Int which defines the start frame for the description
end: Int which defines the end frame for the description (0 defines
the unknown end frame)
stp: the frequency in sec by which frames are used to calculate the
stp: the frequency in frame number by which frames are used to calculate
the contrast
......@@ -136,7 +148,7 @@ class Movie(object):
self._frames.start = start
self._frames.end = end
if dtype == 'distribution':
if view == 'distribution':
# CTRL funktioniert start/end hier wenn ich es nicht noch einmal
# mit übergebe ?
data = views.MultivariateSequence(self._frames,)
......@@ -144,9 +156,9 @@ class Movie(object):
return data
elif dtype in ['seqmean', 'seqmad', 'seqvar', 'seqper']:
elif view in ['seqmean', 'seqmad', 'seqvar', 'seqper']:
data = views.UnivariateSequence(self._frames,)
getattr(data, dtype)(ctrst=ctrst, method=meth, frm_stp=stp)
getattr(data, view)(ctrst=ctrst, method=meth, frm_stp=stp)
return data
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment