Skip to content

Commit

Permalink
Merge branch 'tcatley/dna-width' into ns-rse/999-split-and-update-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-rse authored Nov 18, 2024
2 parents a99c9f0 + c97bee4 commit 6226b27
Show file tree
Hide file tree
Showing 8 changed files with 3,357 additions and 83 deletions.
157 changes: 89 additions & 68 deletions docs/configuration.md

Large diffs are not rendered by default.

Binary file modified tests/resources/process_scan_topostats_file_regtest.topostats
Binary file not shown.
2,379 changes: 2,371 additions & 8 deletions tests/test_grains.py

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion tests/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,13 @@ def test_check_run_steps(
) -> None:
"""Test the logic which checks whether enabled processing options are consistent."""
check_run_steps(
filter_run, grains_run, grainstats_run, disordered_tracing_run, nodestats_run, ordered_tracing_run, splining_run
filter_run,
grains_run,
grainstats_run,
disordered_tracing_run,
nodestats_run,
ordered_tracing_run,
splining_run,
)
assert log_msg in caplog.text

Expand Down
8 changes: 8 additions & 0 deletions topostats/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ grains:
grain_crop_padding: 2 # Padding to apply to the grain crop bounding box
upper_norm_bound: 5.0 # Upper bound for normalisation of input data. This should be slightly higher than the maximum desired / expected height of grains.
lower_norm_bound: -1.0 # Lower bound for normalisation of input data. This should be slightly lower than the minimum desired / expected height of the background.
vetting:
class_conversion_size_thresholds: null # Class conversion size thresholds, list of tuples of 3 integers and 2 integers, ie list[tuple[tuple[int, int, int], tuple[int, int]]] eg [[[1, 2, 3], [5, 10]]] for each region of class 1 to convert to 2 if smaller than 5 nm^2 and to class 3 if larger than 10 nm^2.
class_region_number_thresholds: null # Class region number thresholds, list of lists, ie [[class, low, high],] eg [[1, 2, 4], [2, 1, 1]] for class 1 to have 2-4 regions and class 2 to have 1 region. Can use None to not set an upper/lower bound.
class_size_thresholds: null # Class size thresholds (nm^2), list of tuples of 3 integers, ie [[class, low, high],] eg [[1, 100, 1000], [2, 1000, None]] for class 1 to have 100-1000 nm^2 and class 2 to have 1000-any nm^2. Can use None to not set an upper/lower bound.
nearby_conversion_classes_to_convert: null # Class conversion for nearby regions, list of tuples of two-integer tuples, eg [[[1, 2], [3, 4]]] to convert class 1 to 2 and 3 to 4 for small touching regions
class_touching_threshold: 5 # Number of dilation steps to use for detecting touching regions
keep_largest_labelled_regions_classes: null # Classes to keep the only largest regions for, list of integers eg [1, 2] to keep only the largest regions of class 1 and 2
class_connection_point_thresholds: null # Class connection point thresholds, [[[class_1, class_2], [min, max]]] eg [[[1, 2], [1, 1]]] for class 1 to have 1 connection point with class 2
grainstats:
run: true # Options : true, false
edge_detection_method: binary_erosion # Options: canny, binary erosion. Do not change this unless you are sure of what this will do.
Expand Down
Loading

0 comments on commit 6226b27

Please sign in to comment.