ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

The COP widget breaks with short contacts #140

Closed ivoflipse closed 10 years ago

ivoflipse commented 10 years ago
  File "C:\Dropbox\Development\Pawlabeling\pawlabeling\widgets\analysis\copviewwidget.py", line 68, in active_widget
    widget.draw()
  File "C:\Dropbox\Development\Pawlabeling\pawlabeling\widgets\analysis\copviewwidget.py", line 247, in draw
    self.draw_cop()
  File "C:\Dropbox\Development\Pawlabeling\pawlabeling\widgets\analysis\copviewwidget.py", line 201, in draw_cop
    index = [x for x in xrange(0, z, int(z / self.x))]
ValueError: xrange() arg 3 must not be zero

As usual, defaults turn out to bite you in the ass. I thought 15 was a safe value, until you get measurements from 1 week old piggies, that have contacts with a length shorter than 15...

So fix that!