Do bestfit

def do_bestfit(self):
        """
        Do bestfit
        """
        self.check_important_variables()
        x = np.array(self.args["x"])
        y = np.array(self.args["y"])
        p = self.args.get("params", np.ones(self.args["num_vars"]))
        self.fit_args, self.cov = opt.curve_fit(self.args["func"], x, y, p)
        return self.fit_args