def METHOD_NAME(self, frame, frame_number):
    """Do some basic processing on a single frame
    Raises NaNFrameException if a frame contains NaN
    Returns the normalized/etc modified frame
    """
    t = time.time()
    if frame is None:
        raise ObjectNotFoundError
    if np.isnan(np.sum(frame)):
        raise NaNFrameException
    frame = frame.astype(np.float32)  # or require float32 from image acquistion
    if self.onAc.params.get("online", "ds_factor") > 1:
        frame = cv2.resize(frame, self.onAc.img_norm.shape[::-1])
        # TODO check for params, onAc componenets before calling, or except
    if self.onAc.params.get("online", "normalize"):
        frame -= self.onAc.img_min
    if self.onAc.params.get("online", "motion_correct"):
        try:
            templ = (self.onAc.estimates.Ab.dot(
                    self.onAc.estimates.C_on[: self.onAc.M, (frame_number - 1)])
                    .reshape(# self.onAc.estimates.C_on[:self.onAc.M, (frame_number-1)%self.onAc.window]).reshape(
                    self.onAc.params.get("data", "dims"),order="F",)* self.onAc.img_norm)
        except Exception as e:
            logger.error("Unknown exception {0}".format(e))
            raise Exception
        if self.onAc.params.get("motion", "pw_rigid"):
            frame_cor, shift = tile_and_correct(
                frame,
                templ,
                self.onAc.params.motion["strides"],
                self.onAc.params.motion["overlaps"],
                self.onAc.params.motion["max_shifts"],
                newoverlaps=None,
                newstrides=None,
                upsample_factor_grid=4,
                upsample_factor_fft=10,
                show_movie=False,
                max_deviation_rigid=self.onAc.params.motion["max_deviation_rigid"],
                add_to_movie=0,
                shifts_opencv=True,
                gSig_filt=None,
                use_cuda=False,
                border_nan="copy",
            )[:2]
        else:
            frame_cor, shift = motion_correct_iteration_fast(
                frame, templ, self.max_shifts_online, self.max_shifts_online)
        self.onAc.estimates.shifts.append(shift)
    else:
        frame_cor = frame
    if self.onAc.params.get("online", "normalize"):
        frame_cor = frame_cor / self.onAc.img_norm
    self.procFrame_time.append([time.time() - t])
    return frame_cor