"Response Surface" method in magnetic optimization