def likelihood_data_given_model(self, kwargs_lens, kwargs_source, kwargs_lens_light, kwargs_ps, source_marg=False):
        """
        computes the likelihood of the data given a model
        This is specified with the non-linear parameters and a linear inversion and prior marginalisation.
        :param kwargs_lens:
        :param kwargs_source:
        :param kwargs_lens_light:
        :param kwargs_ps:
        :return: log likelihood (natural logarithm) (sum of the log likelihoods of the individual images)
        """
        # generate image
        logL = 0
        for i in range(self._num_bands):
            if self._compute_bool[i] is True:
                kwargs_source_i = [kwargs_source[k] for k in self._index_source_list[i]]
                kwargs_lens_light_i = [kwargs_lens_light[k] for k in self._index_lens_light_list[i]]
                logL += self._imageModel_list[i].likelihood_data_given_model(kwargs_lens, kwargs_source_i,
                                                                             kwargs_lens_light_i, kwargs_ps,
                                                                             source_marg=source_marg)
        return logL