Skip to content

Commit 7623a96

Browse files
committed
Fix filter default
1 parent c76860e commit 7623a96

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

flamingo_tools/segmentation/cochlea_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def tonotopic_mapping(
6767
unfiltered_graph = graph.copy()
6868

6969
if filter_factor is not None:
70-
if 0 < filter_factor < 1:
70+
if 0 <= filter_factor < 1:
7171
rng = np.random.default_rng(seed=1234)
7272
original_array = np.array(comp_label_ids)
7373
target_length = int(len(original_array) * filter_factor)

reproducibility/tonotopic_mapping/repro_tonotopic_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def repro_tonotopic_mapping(
1919
default_cell_type = "ihc"
2020
default_max_edge_distance = 30
2121
default_min_length = 50
22-
default_filter_factor = 0
22+
default_filter_factor = None
2323
default_component_list = [1]
2424

2525
with open(ddict, 'r') as myfile:

scripts/prediction/tonotopic_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def main():
1616
parser.add_argument("-o", "--output", required=True, help="Output path for post-processed table.")
1717

1818
parser.add_argument("-t", "--type", type=str, default="ihc", help="Cell type of segmentation.")
19-
parser.add_argument("--filter", type=float, default=0, help="Fraction of nodes to remove before mapping.")
19+
parser.add_argument("--filter", type=float, default=None, help="Fraction of nodes to remove before mapping.")
2020
parser.add_argument("--edge_distance", type=float, default=30, help="Maximal edge distance between nodes.")
2121
parser.add_argument("--component_length", type=int, default=50, help="Minimal number of nodes in component.")
2222

0 commit comments

Comments
 (0)