    def __regress_extrapolation_and_noise_cascades(self, j, worker_state):
        """
        Apply autoregressive (AR) updates to the extrapolation and noise cascades
        for the next time step. If noise is enabled, generate and decompose a
        spatially correlated noise field before applying the AR process.
        """
        # Determine the epsilon, a cascade of temporally independent
        # but spatially correlated noise
        if self.__config.noise_method is not None:
            # generate noise field
            epsilon = self.__params.noise_generator(
                self.__params.perturbation_generator,
                randstate=worker_state.randgen_precip[j],
                fft_method=self.__params.fft_objs[j],
                domain=self.__config.domain,
            )

            # decompose the noise field into a cascade
            epsilon_decomposed = self.__params.decomposition_method(
                epsilon,
                self.__params.bandpass_filter,
                fft_method=self.__params.fft_objs[j],
                input_domain=self.__config.domain,
                output_domain=self.__config.domain,
                compute_stats=True,
                normalize=True,
                compact_output=True,
            )
        else:
            epsilon_decomposed = None

        # Regress the extrapolation component to the subsequent time
        # step
        # iterate the AR(p) model for each cascade level
        for i in range(self.__config.n_cascade_levels):
            # apply AR(p) process to extrapolation cascade level
            if (
                epsilon_decomposed is not None
                or self.__config.velocity_perturbation_method is not None
            ):
                worker_state.precip_cascades[j][i] = autoregression.iterate_ar_model(
                    worker_state.precip_cascades[j][i], self.__params.PHI[i, :]
                )
                # Renormalize the cascade
                worker_state.precip_cascades[j][i][1] /= np.std(
                    worker_state.precip_cascades[j][i][1]
                )
            else:
                # use the deterministic AR(p) model computed above if
                # perturbations are disabled
                worker_state.precip_cascades[j][i] = (
                    worker_state.final_blended_forecast_non_perturbed[i]
                )

        # Regress the noise component to the subsequent time step
        # iterate the AR(p) model for each cascade level
        for i in range(self.__config.n_cascade_levels):
            # normalize the noise cascade
            if epsilon_decomposed is not None:
                epsilon_temp = epsilon_decomposed["cascade_levels"][i]
                epsilon_temp *= self.__params.noise_std_coeffs[i]
            else:
                epsilon_temp = None
            # apply AR(p) process to noise cascade level
            # (Returns zero noise if epsilon_decomposed is None)
            worker_state.precip_noise_cascades[j][i] = autoregression.iterate_ar_model(
                worker_state.precip_noise_cascades[j][i],
                self.__params.PHI[i, :],
                eps=epsilon_temp,
            )

        epsilon_decomposed = None
        epsilon_temp = None
Apply autoregressive (AR) updates to the extrapolation and noise cascades
for the next time step. If noise is enabled, generate and decompose a
spatially correlated noise field before applying the AR process.
pysteps/blending/steps.py