Skip to content

Commit

Permalink
Fix data point skipping on hodo
Browse files Browse the repository at this point in the history
This seems to be a subtle off-by-one index error when drawing each colored 3-km segment of the hodo. The first data point after a segment cutoff is skipped when connecting u,v points. If z = [..., 2900, 3100, 3300, ...], then the u,v point at 3100 m AGL is skipped, since it's the first index after the 3-km segment cutoff. Only becomes noticeable with vertically sparse data.
  • Loading branch information
brettjrob authored Jan 2, 2020
1 parent a301003 commit 710ba6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharppy/viz/hodo.py
Original file line number Diff line number Diff line change
@@ -1228,7 +1228,7 @@ def draw_hodo(self, qp, prof, colors, width=2):

path = QPainterPath()
path.moveTo(seg_x[idx], seg_y[idx])
for z_idx in xrange(seg_idxs[idx] + 1, seg_idxs[idx + 1]):
for z_idx in xrange(seg_idxs[idx], seg_idxs[idx + 1]):
path.lineTo(xx[z_idx], yy[z_idx])
path.lineTo(seg_x[idx + 1], seg_y[idx + 1])

0 comments on commit 710ba6c

Please sign in to comment.