def __init__(self, dm: np.array):
        lib.aa_py_ddtr_plan.argtypes = []
        lib.aa_py_ddtr_plan.restype = ctypes.c_void_p
        self.m_obj = lib.aa_py_ddtr_plan()

        lib.aa_py_ddtr_plan_add_dm.argtypes = [
            ctypes.c_void_p, ctypes.c_float, ctypes.c_float, ctypes.c_float,
            ctypes.c_int, ctypes.c_int
        ]
        lib.aa_py_ddtr_plan_add_dm.restype = ctypes.c_bool
        self.m_power = 0.0
        self.m_set_enable_msd_baseline_noise = False

        if (dm.size):
            if (type(dm[0]) is not aa_py_dm):
                print("ERROR: Supplied dm is the wrong type, {}".format(
                    type(dm[0]).__name__))
            else:
                self.m_dm = dm
                for dm in self.m_dm:
                    lib.aa_py_ddtr_plan_add_dm(self.m_obj,
                                               ctypes.c_float(dm.low()),
                                               ctypes.c_float(dm.high()),
                                               ctypes.c_float(dm.step()),
                                               ctypes.c_int(dm.inBin()),
                                               ctypes.c_int(dm.outBin()))
        else:
            print("ERROR: The array is empty.")