from typing import Optional import os import numpy as np import pandas as pd from intervaltree import Interval, IntervalTree from roboter import RobotPerformance, TWC_Performance class PerformanceProcessor: def calc_performance(self, path, df): robot = RobotPerformance() TWC = TWC_Performance() point_tree, movement_tree, dialog_tree = robot.job(path) closing_tree, squeeze_tree, relief_tree = TWC.job(df) dialog_inPoint = point_tree & dialog_tree dialog_inMovement = movement_tree & dialog_tree closing_inPoint = point_tree & closing_tree closing_inMovement = movement_tree & closing_tree squeeze_inPoint = point_tree & squeeze_tree squeeze_inMovement = movement_tree & squeeze_tree relief_inPoint = point_tree & relief_tree relief_inMovement = movement_tree & relief_tree if __name__ == "__main__": path = "D:\downloads\Test2\TeslaTIME29_71_KRCIO.dat" robot = RobotPerformance() #TWC = TWC_Performance() result = robot.job(path) print (result[0]) print (result[1])