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

change naming for class modifiers to variant

from strategy
parent 4bdbb136
......@@ -98,7 +98,6 @@ class View(np.ndarray):
return cls
# subclassing subclass of numpy http://stackoverflow.com/questions/7342637/how-to-subclass-a-subclass-of-numpy-ndarray
# TODO es gibt noch das Problem, dass numpy nach mehreren Berechnungen von drive eine max recursion Warnung ausgiebt, warum? Brauche ich __del__
class MultivariateSequence(View):
......@@ -194,17 +193,17 @@ class BivariateSequence(View):
View.__array_finalize__(self, obj)
# das kann ich jetzt auch mit quantilen machen
def populate(self, strategy='peak', ctrst='light_dark',
def populate(self, variant='peak', ctrst='light_dark',
method='luminance', frm_stp=10, bins=256, **kwargs):
"""Creates a scatterplot for the dynamic of contrast across movie frames
strategy: peak or bin (one of max/min peak; uper/lower mean)
threshold: for the peak strategy TODO
variant: peak or bin (one of max/min peak; uper/lower mean)
threshold: for the peak variant TODO
smooth: smooth plot TODO
"""
# set class properties
self._strategy = strategy
self._variant = variant
self._contrast = ctrst
self._method = method
self._frame_step = frm_stp
......@@ -273,7 +272,7 @@ class BivariateSequence(View):
else:
maxs.append(int(total_value / sum(hist_maxs)) + 127)
# peak strategy
# peak variant
else:
ctrst_cls = self._get_ctrst_cls_name(self._contrast)
ctrst_img = ctrst_cls(img).ctrst
......@@ -310,3 +309,5 @@ class BivariateSequence(View):
self.resize(shape, refcheck=False)
self[:, :] = contrast_points
contrast_points = None
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