File tree Expand file tree Collapse file tree 2 files changed +15
-24
lines changed
src/snake/toolkit/analysis Expand file tree Collapse file tree 2 files changed +15
-24
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ from .stats import contrast_zscore , get_scores , bacc , mcc
4+ from .metrics import get_snr , get_snr_console_db , get_tsnr
5+
6+
7+ __all__ = [
8+ "contrast_zscore" ,
9+ "get_scores" ,
10+ "bacc" ,
11+ "mcc" ,
12+ "get_snr" ,
13+ "get_snr_console_db" ,
14+ "get_tsnr" ,
15+ ]
Original file line number Diff line number Diff line change @@ -58,30 +58,6 @@ def contrast_zscore(
5858 return z_image
5959
6060
61- def get_thresh_map (
62- z_image : np .ndarray ,
63- alpha : float | list [float ],
64- height_control : HeightControl = "fpr" ,
65- ) -> dict [float , np .ndarray ]:
66- """Get thresholded map."""
67- thresh_dict = {}
68- if not isinstance (alpha , list ):
69- alphas = [alpha ]
70- else :
71- alphas = alpha
72- for a in alphas :
73- if height_control == "fpr" :
74- z_thresh = norm .isf (a )
75- elif height_control == "fdr" :
76- z_thresh = fdr_threshold (z_image , a )
77-
78- above_thresh = z_image > z_thresh
79- thresh_dict [a ] = above_thresh
80- if len (alphas ) == 1 :
81- return thresh_dict [alphas [0 ]]
82- return thresh_dict
83-
84-
8561def get_scores (
8662 contrast : np .ndarray , roi_mask : np .ndarray , roi_threshold : float
8763) -> dict [str , float ]:
You can’t perform that action at this time.
0 commit comments