Beispiel #1
0
    def do_simultaneous_fit_and_return_workspace_parameters_and_fit_function(
            self, parameters_dict):
        alg = mantid.AlgorithmManager.create("Fit")

        output_workspace, output_parameters, function_object, output_status, output_chi, covariance_matrix \
            = run_simultaneous_Fit(parameters_dict, alg)
        if len(parameters_dict['InputWorkspace']) > 1:
            for input_workspace, output in zip(parameters_dict['InputWorkspace'],
                                               mantid.api.AnalysisDataService.retrieve(output_workspace).getNames()):
                CopyLogs(InputWorkspace=input_workspace, OutputWorkspace=output, StoreInADS=False)
        else:
            CopyLogs(InputWorkspace=parameters_dict['InputWorkspace'][0], OutputWorkspace=output_workspace,
                     StoreInADS=False)
        return output_workspace, output_parameters, function_object, output_status, output_chi, covariance_matrix
Beispiel #2
0
    def _do_simultaneous_fit_and_return_workspace_parameters_and_fit_function(
            self, parameters: dict) -> tuple:
        """Performs a simultaneous fit and returns the resulting function, status and chi squared."""
        alg = self._create_fit_algorithm()
        output_workspace, parameter_table, function, fit_status, chi_squared, covariance_matrix = run_simultaneous_Fit(
            parameters, alg)

        self._copy_logs(parameters["InputWorkspace"], output_workspace)
        return output_workspace, parameter_table, function, fit_status, chi_squared, covariance_matrix
Beispiel #3
0
 def do_simultaneous_fit_and_return_workspace_parameters_and_fit_function(self, parameters_dict):
     alg = mantid.AlgorithmManager.create("Fit")
     return run_simultaneous_Fit(parameters_dict, alg)