diff --git a/topostats/grains.py b/topostats/grains.py index f8ce199f63..778f753c08 100644 --- a/topostats/grains.py +++ b/topostats/grains.py @@ -940,9 +940,7 @@ def vet_class_sizes_single_grain( continue lower_threshold, upper_threshold = [ - vetting_criteria[1:] - for vetting_criteria in class_size_thresholds - if vetting_criteria[0] == class_index + vetting_criteria[1:] for vetting_criteria in class_size_thresholds if vetting_criteria[0] == class_index ][0] if lower_threshold is not None: @@ -1669,9 +1667,7 @@ def extract_grains_from_full_image_tensor( # Crop the tensor # Get the bounding box for the region - flat_bounding_box: tuple[int, int, int, int] = tuple( - flat_region.bbox - ) # min_row, min_col, max_row, max_col + flat_bounding_box: tuple[int, int, int, int] = tuple(flat_region.bbox) # min_row, min_col, max_row, max_col # Pad the mask padded_flat_bounding_box = pad_bounding_box( diff --git a/topostats/processing.py b/topostats/processing.py index 3f80df390e..d2dd8d3948 100644 --- a/topostats/processing.py +++ b/topostats/processing.py @@ -811,9 +811,7 @@ def run_splining( f"[{filename}] : No grains exist for the {direction} direction. Skipping disordered_tracing for {direction}." ) splining_grainstats = create_empty_dataframe(column_set="grainstats", index_col="grain_number") - splining_molstats = create_empty_dataframe( - column_set="mol_statistics", index_col="molecule_number" - ) + splining_molstats = create_empty_dataframe(column_set="mol_statistics", index_col="molecule_number") raise ValueError(f"No grains exist for the {direction} direction") # if grains are found ( @@ -1195,9 +1193,7 @@ def process_scan( else: grainstats_df = create_empty_dataframe(column_set="grainstats", index_col="grain_number") molstats_df = create_empty_dataframe(column_set="mol_statistics", index_col="molecule_number") - disordered_tracing_stats = create_empty_dataframe( - column_set="disordered_tracing_statistics", index_col="index" - ) + disordered_tracing_stats = create_empty_dataframe(column_set="disordered_tracing_statistics", index_col="index") height_profiles = {} # Get image statistics