Commit 2ffc0736 authored by Andreas Schmidt's avatar Andreas Schmidt

Allow to specify specific threshold to jitter function.

parent 553baa09
......@@ -28,12 +28,13 @@ def jitter_causes(df, durations, export=False, file_name=None):
print("Outliers:", len(outliers), ";", "Threshold[us]:", threshold)
def trace_jitter(data_frame, export=False, file_name=None):
def trace_jitter(data_frame, threshold=None, export=False, file_name=None):
"""
Displays (and saves) a stacked boxplot of durations.
"""
thresh = get_outlier_threshold(data_frame["EndToEnd_D"].describe())
df_no_outliers = data_frame[data_frame["EndToEnd_D"] <= thresh]
if threshold is None:
threshold = get_outlier_threshold(data_frame["EndToEnd_D"].describe())
df_no_outliers = data_frame[data_frame["EndToEnd_D"] <= threshold]
box(df_no_outliers, export, file_name)
print("{} / {} are no outliers.".format(len(df_no_outliers), len(data_frame)))
fig = plt.gcf()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment