Skip to content
Snippets Groups Projects
Commit 2b6c6e2a authored by Karim Ahmed's avatar Karim Ahmed
Browse files

convert min and max_pulses

parent d75cc468
No related branches found
No related tags found
1 merge request!240hist_pulse must be int
......@@ -125,8 +125,8 @@ class AgipdCorrections:
# avoid list(range(*[0]]))
self.pulses_lst = list(range(*max_pulses)) \
if not (len(max_pulses) == 1 and max_pulses[0] == 0) else max_pulses #noqa
self.min_pulse = self.pulses_lst[0]
self.max_pulse = self.pulses_lst[-1]
self.min_pulse = int(self.pulses_lst[0])
self.max_pulse = int(self.pulses_lst[-1])
self.max_cells = max_cells
self.hist_pulses = 0
self.hists_signal_low = 0
......@@ -1048,9 +1048,9 @@ class AgipdCorrections:
# avoid 0 hist_pulses, otherwise histogram plot will fail
if self.max_pulse == 0:
self.hist_pulses = int(self.max_pulse + 1)
self.hist_pulses = self.max_pulse + 1
else:
self.hist_pulses = int(self.max_pulse)
self.hist_pulses = self.max_pulse
bins = (self.bins_signal_low_range, self.hist_pulses)
rnge = [[-50, 1000], [self.min_pulse,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment