Skip to content

Commit

Permalink
Return width 1 as fallback in flux.get_width()
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Nov 28, 2023
1 parent 9b590e5 commit 380b764
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t3/utils/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ def get_width(x: float,
max_width, min_width = 4, 0.2
x, x_min, x_max = abs(x), abs(x_min), abs(x_max)
if not log_scale:
if x == x_min == x_max:
return 1
return min_width + (x - x_min) * (max_width - min_width) / (x_max - x_min)
return get_width(x=-np.log10(x_min) - np.log10(x_max) + np.log10(x),
x_min=-np.log10(x_max),
Expand Down

0 comments on commit 380b764

Please sign in to comment.