Skip to content

Commit 70fafb4

Browse files
committed
Round intensities to 6 decimal places when printing in ClickEventHandler.
1 parent 1c528f4 commit 70fafb4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pymassspec_plot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def onclick(self, event: MouseEvent) -> None:
361361
print(f"RT: {peak.rt}")
362362
print("Mass\t Intensity")
363363
for i in range(self.n_intensities):
364-
print(f"{mass_list[largest[i]]}\t {intensity_list[largest[i]]}")
364+
print(f"{mass_list[largest[i]]}\t {intensity_list[largest[i]]:0.6f}")
365365

366366
# Check if right mouse button pressed, if so plot mass spectrum
367367
# Also check that a peak was selected, not just whitespace
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RT: 7.38799989223
22
Mass Intensity
3-
208 94410.66666666669
4-
56 14490.714285714279
5-
131 14176.23809523809
6-
119 10009.476190476187
7-
97 7207.714285714283
3+
208 94410.666667
4+
56 14490.714286
5+
131 14176.238095
6+
119 10009.476190
7+
97 7207.714286

0 commit comments

Comments
 (0)