Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cali/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def natural_sort_key(text: str) -> list:
# ==================== Default Values ====================
DEFAULT_BURST_THRESHOLD = 65.0
DEFAULT_CALCIUM_BURST_THRESHOLD = 25.0
DEFAULT_MIN_BURST_DURATION = 3
DEFAULT_MIN_BURST_DURATION = 500 # milliseconds
DEFAULT_BURST_GAUSS_SIGMA = 0.3
DEFAULT_FRAME_RATE = 10.0 # frames per second (fps)
DEFAULT_DFF_WINDOW = 10.0 # seconds
Expand Down
6 changes: 3 additions & 3 deletions src/cali/gui/_analysis_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ def reset(self) -> None:
self._burst_wdg.setValue(
(
DEFAULT_BURST_THRESHOLD,
3000.0, # 3 seconds = 3000ms
DEFAULT_MIN_BURST_DURATION,
DEFAULT_BURST_GAUSS_SIGMA,
)
)
Expand Down Expand Up @@ -1080,7 +1080,7 @@ def __init__(self, parent: QWidget | None = None) -> None:
self._burst_min_duration_ms.setDecimals(2)
self._burst_min_duration_ms.setRange(0.0, 100000.0)
self._burst_min_duration_ms.setSingleStep(100.0)
self._burst_min_duration_ms.setValue(3000.0) # 3 seconds
self._burst_min_duration_ms.setValue(DEFAULT_MIN_BURST_DURATION)

self._burst_blur_label = QLabel("Burst Gaussian Blur Sigma:", self)
self._burst_blur_label.setSizePolicy(*FIXED)
Expand Down Expand Up @@ -1317,7 +1317,7 @@ def reset(self) -> None:
self._burst_wdg.setValue(
(
DEFAULT_BURST_THRESHOLD,
3000.0, # 3 seconds = 3000ms
DEFAULT_MIN_BURST_DURATION,
DEFAULT_BURST_GAUSS_SIGMA,
)
)
Expand Down
5 changes: 3 additions & 2 deletions src/cali/sqlmodel/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
DEFAULT_ENABLE_RISING_EDGE_ANALYSIS,
DEFAULT_FRAME_RATE,
DEFAULT_HEIGHT,
DEFAULT_MIN_BURST_DURATION,
DEFAULT_SPIKE_SYNC_JITTER_WINDOW,
DEFAULT_SPIKE_SYNCHRONY_MAX_LAG,
DEFAULT_SPIKE_THRESHOLD,
Expand Down Expand Up @@ -1154,10 +1155,10 @@ class AnalysisSettings(SQLModel, table=True):
spike_threshold_value: float = DEFAULT_SPIKE_THRESHOLD
spike_threshold_mode: str = MULTIPLIER
burst_threshold: float = DEFAULT_BURST_THRESHOLD
burst_min_duration: float = 3000.0 # milliseconds (3 seconds)
burst_min_duration: float = DEFAULT_MIN_BURST_DURATION
burst_gaussian_sigma: float = DEFAULT_BURST_GAUSS_SIGMA
calcium_burst_threshold: float = DEFAULT_CALCIUM_BURST_THRESHOLD
calcium_burst_min_duration: float = 3000.0 # milliseconds (3 seconds)
calcium_burst_min_duration: float = DEFAULT_MIN_BURST_DURATION
calcium_burst_gaussian_sigma: float = DEFAULT_BURST_GAUSS_SIGMA
spikes_sync_cross_corr_lag: float = DEFAULT_SPIKE_SYNCHRONY_MAX_LAG # ms
spikes_sync_jitter_window: float = DEFAULT_SPIKE_SYNC_JITTER_WINDOW # ms
Expand Down
4 changes: 2 additions & 2 deletions tests/test_spike_jitter_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_spike_data_has_jitter_field() -> None:
spike_threshold=0.5,
spike_threshold_mode="adaptive",
burst_threshold=75.0,
burst_min_duration=3000.0,
burst_min_duration=500.0,
burst_blur_sigma=1.0,
synchrony_lag=1000.0,
synchrony_jitter=200.0,
Expand All @@ -48,7 +48,7 @@ def test_spike_data_default_jitter_value() -> None:
spike_threshold=0.5,
spike_threshold_mode="adaptive",
burst_threshold=75.0,
burst_min_duration=3000.0,
burst_min_duration=500.0,
burst_blur_sigma=1.0,
synchrony_lag=1000.0,
synchrony_jitter=DEFAULT_SPIKE_SYNC_JITTER_WINDOW,
Expand Down
Loading