else: extra_t = xcalc / vmax extra_v = np.linspace(vmax, vmax, int(round(extra_t * 1000))) v_profile = velocity.copy() v_profile = np.concatenate((v_profile, extra_v)) if extra: extra_a = np.zeros(int(round(extra_t * 1000))) accel = np.concatenate((accel, extra_a, -accel)) v_profile = np.concatenate((v_profile, np.flip(velocity))) x = np.zeros(len(v_profile)) for i, v in enumerate(v_profile): x[i] = np.trapz(v_profile[:i]) if extra: return x / 1000, v_profile, accel return x / 1000 if __name__ == "__main__": logger = logging.getLogger() logger.setLevel(logging.INFO) system = CESystem() system.load_config() system.open_controllers() tm = AutomatedControl.Template() xyz0 = [20, 20, 3] xyz1 = [100, 35, 10] path = SafeMove(system, tm, xyz0, xyz1, visual=True).move()
:param lower_y: :param right_x: :param upper_y: :return: """ self.dimensions = [left_x, lower_y, right_x, upper_y] class AutoSpecial: pass if __name__ == "__main__": import matplotlib.pyplot as plt import numpy as np import logging import os os.chdir(os.path.abspath('..')) logger = logging.getLogger() logger.setLevel(logging.INFO) system = CESystem() system.load_config( config_file=r'E:\Scripts\AutomatedCE\config\TestChip.cfg') system.open_controllers() auto = ChipRun(system) auto.add_method(r'E:\Scripts\AutomatedCE\config\methods-chep.txt') # auto.set_template() auto.repetitions = 2 # auto.start_run()