def METHOD_NAME(self):
    self.calc_min_max_guess()
    if len(self.flt_meas) < 10:
        logging.warning("Not enough measurements")
        return
    cp0, np0 = calibration_utils.scale_measurements(self.flt_meas, self.p0)
    logging.info("initial guess : avg "+str(np0.mean())+" std "+str(np0.std()))
    calibration_utils.print_xml(self.p0, "MAG", 11)
    def err_func(p, meas, y):
        cp, np = calibration_utils.scale_measurements(meas, p)
        err = y * scipy.ones(len(meas)) - np
        return err
    p1, cov, info, msg, success = optimize.leastsq(err_func, self.p0[:], args=(self.flt_meas, 1.0), full_output=1)
    self.optimization_done = success in [1, 2, 3, 4]
    if not self.optimization_done:
        logging.warning("Optimization error: ", msg)
    cp1, np1 = calibration_utils.scale_measurements(self.flt_meas, p1)
    if self.optimization_done:
        logging.info("optimized guess : avg " + str(np1.mean()) + " std " + str(np1.std()))
        calibration_utils.print_xml(p1, "MAG", 11)
    else:
        logging.info("last iteration of failed optimized guess : avg " + str(np1.mean()) + " std " + str(np1.std()))
    if self.plot_results:
        calibration_utils.plot_results("MAG", np.array(self.data), range(len(self.data)),
                                       self.flt_meas, cp0, np0, cp1, np1, 1.0, blocking=False)
        calibration_utils.plot_mag_3d(self.flt_meas, cp1, p1)