//  [python]
def _poly_smoothen_raw_growth_weighted(self, power=3, time_delta=5.1, gauss_sigma=1.5, apply_median=True,
                                           edge_condition=EdgeCondition.Reflect):

        assert power > 1, "Power must be 2 or greater"

        self._logger.info(
            "Starting Weighted Multi-Polynomial smoothing"
            " (Power {0}; Time delta {1}h; Gauss sigma {2}h; {3}; {4}".format(
                power, time_delta, gauss_sigma, "Median filter" if apply_median else "No median filter",
                edge_condition
        ))

        median_kernel = np.ones((1, self._median_kernel_size))
        smooth_data = []
        times = self.times
        left_filt, right_filt = get_edge_condition_timed_filter(times, time_delta, edge_condition)
        left = left_filt.sum()
        right = right_filt.sum()

        times = filter_edge_condition(times, left_filt, right_filt, edge_condition,
                                      extrapolate_values=True,
                                      logger=self._logger)

        self._logger.info("Data with edge condition has length {0}, ({1} {2})".format(times.size, left, right))
        time_diffs = np.subtract.outer(times, times)
        filt = (time_diffs < time_delta) & (time_diffs > -time_delta)

        for id_plate, plate in enumerate(self._raw_growth_data):
            if plate is None:
                smooth_data.append(None)
                self._logger.info("Plate {0} has no data".format(id_plate + 1))
                continue

            log2_data = np.log2(plate).reshape(np.prod(plate.shape[:2]), plate.shape[-1])
            epsilon = np.finfo(log2_data.dtype).eps

            if apply_median:
                log2_data[...] = median_filter(log2_data, footprint=median_kernel, mode='reflect')

            smooth_plate = [None] * log2_data.shape[0]
            for id_curve, log2_curve in enumerate(log2_data):

                log2_curve = filter_edge_condition(
                    log2_curve, left_filt, right_filt, edge_condition, logger=self._logger)

                p, r, r0 = zip(*self._poly_estimate_raw_growth_curve(times, log2_curve, power, filt))

                if any(r0val < epsilon for r0val in r0):

                    self._logger.warning(
                        "Curve {0} has long stretches of (near) identical data and is probably corrupt".format(
                            np.unravel_index(id_curve, plate.shape[:2])
                        ))

                if any(rval == 0 for rval in r):
                    self._logger.warning(
                        "Curve {0} is probably overfitted somewhere because polynomial residual was 0".format(
                            np.unravel_index(id_curve, plate.shape[:2])
                    ))

                smooth_plate[id_curve] = tuple(self._multi_poly_smooth(
                    times, p, np.array(r), np.array(r0), filt, gauss_sigma))[left: -right if right else None]

            self._logger.info("Plate {0} data polynomial smoothed ({1} curves, {2} data-points per curve)".format(
                id_plate + 1, len(smooth_plate), len(smooth_plate[0])))

            smooth_data.append(np.array(smooth_plate).reshape(plate.shape))

        self._smooth_growth_data = np.array(smooth_data)

        self._logger.info("Completed Weighted Multi-Polynomial smoothing")