Browse Source

fixed bug due to removing outlier detection

master
Holger Frey 6 years ago
parent
commit
9a02e4f4e0
  1. 19
      mtor/workflows.py

19
mtor/workflows.py

@ -12,8 +12,7 @@ from .dataproc import ( @@ -12,8 +12,7 @@ from .dataproc import (
construct_data_frame,
find_guard_threshold,
check_guards,
find_outliers,
select_on_guards_and_outliers,
select_on_guards,
smooth_rolling_min,
smooth_savgol_filter,
find_extremas,
@ -23,15 +22,14 @@ from .dataproc import ( @@ -23,15 +22,14 @@ from .dataproc import (
from .postproc import (
stem_file_list,
annotate_color_coded_images,
sort_cut_images,
remove_cuts_dir,
rename_cut_images,
)
def prescan_workflow(folder, top, right, bottom, left, **kargs):
print("1/5: scanning tifs for common autocontrast values")
parameters = Parameters(folder, top, right, bottom, left)
parameters = Parameters(folder, top, right, bottom, left, **kargs)
parameters = scan_tifs(parameters)
parameters.offset = parameters.intensity_min
@ -64,9 +62,8 @@ def data_workflow(stats_results, parameters): @@ -64,9 +62,8 @@ def data_workflow(stats_results, parameters):
find_guard_threshold(data_frame, parameters)
data_frame = check_guards(data_frame, parameters)
data_frame = find_outliers(data_frame, parameters)
selected_df = select_on_guards_and_outliers(data_frame, parameters)
selected_df = select_on_guards(data_frame, parameters)
selected_df = smooth_rolling_min(selected_df, parameters)
selected_df = smooth_savgol_filter(selected_df, parameters)
@ -79,10 +76,9 @@ def data_workflow(stats_results, parameters): @@ -79,10 +76,9 @@ def data_workflow(stats_results, parameters):
def postprocessing_workflow(selected_files, parameters):
print("4/5: Post processing, sorting cut images")
print("4/5: Post processing, renaming cut images")
file_stems = stem_file_list(selected_files)
sort_cut_images(file_stems, parameters)
remove_cuts_dir(parameters)
rename_cut_images(file_stems, parameters)
print("5/5: Post processing, annotating color coded images")
annotate_color_coded_images(file_stems, parameters)
return WorkflowResult(None, parameters)
@ -96,9 +92,8 @@ def cached_data_workflow(folder): @@ -96,9 +92,8 @@ def cached_data_workflow(folder):
data_frame, parameters = load_temp(folder)
find_guard_threshold(data_frame, parameters)
data_frame = check_guards(data_frame, parameters)
data_frame = find_outliers(data_frame, parameters)
selected_df = select_on_guards_and_outliers(data_frame, parameters)
selected_df = select_on_guards(data_frame, parameters)
selected_df = smooth_rolling_min(selected_df, parameters)
selected_df = smooth_savgol_filter(selected_df, parameters)

Loading…
Cancel
Save