Hi all. I am using Andor Ixon888 camera with grabber interface. I use the following code to grab the pixel value of a single pixel and from multiple captures.

def run(self):
        self.cameraTrigger()
        print(self.data)
    def updateData(self, data):
        self.data = data
    @kernel
    def cameraTrigger(self):   
        mask = 1
        data = [0] * int(self.Number_of_Images)
        self.core.reset()
        self.core.break_realtime()                    
        x0 = self.X_start
        x1 = self.X_end
        y0 = self.Y_start
        y1 = self.Y_end
        self.grabber0.setup_roi(0, x0, y0, x1, y1)
        for j in range(0, int(self.Number_of_Images)):
            self.camera_mot.pulse(self.Exposure_ms*ms)  # camera trigger
            n = [0]
            delay(100*ms)
            self.grabber0.gate_roi(mask)
            delay(100*ms)
            self.grabber0.input_mu(n)
            delay(100*ms)
            self.grabber0.gate_roi(0)
            data[j] = n[0]
            delay(self.Time_between_captures_ms* ms)
        self.updateData(data)

The output for 5 captures are as follows:
print:[518, 488, 501, 490, 9718]
While the first 4 values are matching with the Andor software, the last value is significantly higher than the actual value. If I rerun the program with same conditions, it shows as follows:
print:[494, 12769, 11763, 509, 488]
Now the 2nd and 3rd values are significantly higher than the actual value.
Can anyone help me with this? If you need any more information please feel free to ask.
Thanks in advance.