Skip to content
Open
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/cl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def _validate(self, durations, currents) -> None:
for i, (duration_us, current_uA) in enumerate(zip(durations, currents)):
# Total charge
charge_pC = current_uA * duration_us
if charge_pC > self._PHASE_CHARGE_INJECTION_LIMIT_PC:
if abs(charge_pC) > self._PHASE_CHARGE_INJECTION_LIMIT_PC:
raise ValueError(
f"Charge injection of "
f"{duration_us} us x {current_uA} uA = {charge_pC / 1000} nC "
Expand Down
2 changes: 1 addition & 1 deletion src/cl/analysis/_metrics/_criticality.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _analyse_criticality(
time_lags_k = branching_ratio_result["time_lags_k"]
time_lags_slopes = branching_ratio_result["slopes"]
time_lags_fit_parameters = branching_ratio_result["optimal_fit_parameters"]
except:
except Exception:
...

return AnalysisResultCriticality(
Expand Down
2 changes: 1 addition & 1 deletion src/cl/analysis/_metrics/_functional_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _analyse_functional_connectivity(
result.graph_partition = community_louvain.best_partition(graph, weight="weight") # dict {node: community_id}
if len(set(result.graph_partition.values())) > 1:
result.modularity_index = float(community_louvain.modularity(result.graph_partition, graph, weight="weight"))
except:
except Exception:
...

# Betweenness centrality (weighted)
Expand Down
2 changes: 1 addition & 1 deletion src/cl/analysis/_metrics/_information_entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _analyse_information_entropy(
log_base: float | None = None,
) -> AnalysisResultInformationEntropy:
"""
See RecordingView.analyse_lempel_ziv_complexity()
See RecordingView.analyse_information_entropy()
"""
sampling_frequency = recording._analysis_cache.metadata.sampling_frequency
bin_size_frames = max(1, int(round(bin_size_sec * sampling_frequency)))
Expand Down