예제 #1
0
log_list = []
i = 0
for file_name in results:
    result = results[file_name]

    if 'Yaw drastic change' in result:
        j = 0
        for event in result:
            if len(result[event]) > 0:
                j += 1
        if j == 4:
            i += 1
            log_list.append(file_name)
print('found ' + str(i) + ' logs!')

for file_name, file in iterSegments(db, subcomponents, querytype='or'):
    if file_name in log_list:
        #if file_name == '':

        print(file_name)
        result = results[file_name]
        for event in result:
            if len(result[event]) == 0:
                continue
                #pass
            signal = defined_events[event]['subcomponent']

            if signal not in file:
                continue

            if file[signal].empty:
예제 #2
0
from CrashDiag.Preproc.SegDatabase import iterSegments, SegDatabase
from CrashDiag.Preproc.Segmentation import plot_segments
import matplotlib.pyplot as plt
from CrashDiag.Detection import label

seg_db = SegDatabase('Segments')

subcomponents = ['ATT_Yaw', 'ATT_ErrYaw', 'RCOU_Yaw', 'RCIN_C4']

for file_name, file in iterSegments(seg_db, subcomponents, querytype='and'):
    print(file_name)

    ATT_Yaw = label.change(file['ATT_Yaw'],
                           gradient=50,
                           height=200,
                           plot=False)
    if label.no_targets(ATT_Yaw):
        continue

    RCOU_Yaw = label.higher_than(
        file['RCOU_Yaw'], threshold=100,
        plot=False)  # Hier ebenfalls, evtl auf 100 oder sogar 150 erhöhen
    if label.no_targets(RCOU_Yaw):
        continue

    ATT_ErrYaw = label.higher_than(
        file['ATT_ErrYaw'], threshold=10, plot=False
    )  # Threshold muss viel höher sein. 10 oder so. Normaler error bis max 1 Grad denk ich
    if label.no_targets(ATT_ErrYaw):
        continue