Skip to content

Commit ad06908

Browse files
committed
Merge pull request #89 from bpindelski/divnull
Avoid division by 0 in Plot Profile.
2 parents d7e31d5 + d65a902 commit ad06908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

omero/analysis_scripts/Plot_Profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def getLineData(pixels, x1, y1, x2, y2, lineW=2, theZ=0, theC=0, theT=0):
8888
sizeY = pixels.getSizeY()
8989

9090
lineX = x2-x1
91-
lineY = y2-y1
91+
lineY = 1 if y2-y1 == 0 else y2-y1
9292

9393
rads = math.atan(float(lineX) / lineY)
9494

0 commit comments

Comments
 (0)