def METHOD_NAME(self, x_i, y_i):
    #test to see whether toggling a pixel improves or worsens log likelihood
    #if there are no points near, then don't bother doing anythin more
    if not self.mask[x_i, y_i]:
        return False
    xi = x_i*self.pixelSize +  self.imageBounds.x0
    yi = y_i*self.pixelSize +  self.imageBounds.y0
    dn, neigh = self.kdt.query(np.array([xi,yi]), 50)
    neigh = neigh[dn < 100]
    if len(neigh) > 1:
        #calculate old likelihood
        lh = 0
        for j in neigh:
            lh += self.pointlHood(self.im, self.x[j], self.y[j], self.sx[j])
        #toggle pixel
        self.im[x_i, y_i] = 1 - self.im[x_i, y_i]
        lhn = 0
        for j in neigh:
            lhn += self.pointlHood(self.im, self.x[j], self.y[j], self.sx[j])
        if lhn > lh:
            #toggling improves image
            return True
        else:
            #switch back
            self.im[x_i, y_i] = 1 - self.im[x_i, y_i]
            return False
    else:
        #this pixel has no events near it and should never be on
        self.mask[x_i, y_i] = 0
        if self.im[x_i, y_i]:
            self.im[x_i, y_i] = 0
            return True
        else:
            return False