def __call__(self, ordered_parameters=[], **parameters):
        """
        Returns the value of the square root of :math:`\\chi^2`, summing over the components.

        This function now supports setting variables to None.

        :param flatten_components: If True, summing is performed over the data indices (default).
        :return: :math:`\\sqrt(\\chi^2)`
        """
        flatten_components = parameters.pop('flatten_components')
        evaluated_func = super(VectorLeastSquares, self).__call__(
            ordered_parameters, **parameters
        )
        result = []

        # zip together the dependent vars and evaluated component
        for y, ans in zip(self.model.dependent_vars, evaluated_func):
            if self.dependent_data[y] is not None:
                result.append(((self.dependent_data[y] - ans) / self.sigma_data[self.model.sigmas[y]]) ** 2)
                if flatten_components: # Flattens *within* a component
                    result[-1] = result[-1].flatten()
        return np.sqrt(sum(result))
def __call__ ( self , ordered_parameters = [ ] , ** parameters ) : flatten_components = parameters . pop ( 'flatten_components' ) evaluated_func = super ( VectorLeastSquares , self ) . __call__ ( ordered_parameters , ** parameters ) result = [ ] for y , ans in zip ( self . model . dependent_vars , evaluated_func ) : if self . dependent_data [ y ] is not None : result . append ( ( ( self . dependent_data [ y ] - ans ) / self . sigma_data [ self . model . sigmas [ y ] ] ) ** 2 ) if flatten_components : result [ - 1 ] = result [ - 1 ] . flatten ( ) return np . sqrt ( sum ( result ) )
Returns the value of the square root of :math:`\\chi^2`, summing over the components.

        This function now supports setting variables to None.

        :param flatten_components: If True, summing is performed over the data indices (default).
        :return: :math:`\\sqrt(\\chi^2)`