-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update C++ codebase for handling of feature dependencies [vcs: #minor] (
#334) * throw runtime_error, rm exit(1) in featuretype&calcfeatures * rename type->input_type * throw EfelAssertionError to avoid exit(-1) * add test to trigger C++->Python AssertionError * remove featurename.find(";") check * typo in docstring * add feature's name to the error message * Revert "remove featurename.find(";") check" This reverts commit 954613a. * remove setversion function * draft: removing alternative wildcard syntax * remove variable features in LibV5 * remove variable (alias) features in LibV2 * simplify feature pointers representation in cppcore, remove wildcards * make AddUniqueItem void * remove empty function getDependencyList * directly check stream's state after opening the file * remove dead code in efel and cfeature * merge efel into cppcore * add template to getParam * add getFeatures fn to get all dependent features * LibV5.cpp update until time_to_last_spike * libv5 update ISI computations * LibV5 remove ISI first, second etc. duplication * calculateInvISI throw except instead of return 0 * use getFeatures in depolarized_base * use getFeatures in steady_state_hyper * depolarized_based consider retVal==0 failure * use getFeatures in LibV2 * use getFeatures in LibV1 * using to replace scope resolution * define distinct errors: FeatureComputationError, EmptyFeatureError * use getFeature/s in LibV5 for consistent handling of edge cases * remove unnecessary initializer_list * min_AHP_indices to use getFeatures * AHP_depth_abs with getFeature * spike_half_width to use getFeatures * AP_begin_indices to use getFeatures * use getFeatures in current_base * getfeatures in burst_begin_indices * decay_time_constant_after_stim to use getFeatures * libv5 exception handling * remove getVec completely * make format * replace throw EmptyFeatureError with return -1 for consistency * remove redundant else condition * avoid fetching ignore_first_ISI twice * in the spikewidth2 error message mention spikewidth2 * update maximum_voltage's success case to be same asminimum_voltages * make peakvoltage vector a reference in amp_drop_first_last * remove obsolete empty feature checks in spike_width1 * remove else after throw * update new line in code comment for readability * replace GErrorStr+1 and return -1 via exception * add test to cover single spike case in min_voltage_between_spikes * cover stimulus_current==0.0 edge case in ohmic resistance features * remove else after throw in 3 LibV5 places * typo in test name * test_ohmic_input_resistance_zero_stimulus_current update stim params * update fail case for spikecount & spikecount_stimint * add test calling all features on constant trace * remove re imported import in test * impute Spikecount missing val to 0.0 in GranuleCellDeap1.ipynb * remove unnecessary variable * move Spikecount implementation to Python * change doc of Spikecount as Python efeature * move Spikecount_stimint to Python * add validation module with check_ais_initiation * add bpap_attenuation as a multitrace feature * move burst_number and strict_burst_number to Python * update impedance, remove spikecount is None check * add CHANGELOG.md * docs: add multitrace and validation modules to API * Docs: add name change warnings * add int/double template instantiations to cfeature * remove getDistance_cpp, use python implementation * move trace_check to pyfeatures * lint fix * add from __future__ import annotations * add stimulus_current to test_allfeatures_on_constant_V * allow both spike_count and Spikecount * move validation.py inside pyfeatures * Revert "add stimulus_current to test_allfeatures_on_constant_V" This reverts commit 41b087e. * add spike_count expect it to be 0 for allfeatures_on_constant_voltage * encourage use of spike_count instead of Spikecount * update deprecation note in the docs
- Loading branch information
Showing
47 changed files
with
2,513 additions
and
5,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ bin | |
*.ipynb_checkpoints | ||
lib | ||
fllog.txt | ||
*.DS_Store | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
## [5.4.0] - 2024-01 | ||
|
||
### C++ changes | ||
- New C++ function `getFeatures` replaced `getVec`. | ||
- `getFeatures` automatically handles failures & distinguishes empty results from failures. | ||
- Centralized error handling in `getFeatures` shortens the code by removing repetitions. | ||
- C++ features' access is restricted. Read-only references are marked `const`. | ||
- Removed wildcard features from C++ API. Use of Python is encouraged for that purpose. | ||
|
||
### Python changes | ||
- `bpap_attenuation` feature is added to the Python API. | ||
- `Spikecount`, `Spikecount_stimint`, `burst_number`, `strict_burst_number` and `trace_check` features migrated to Python from C++. | ||
- `check_ais_initiation` is added to the Python API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ Submodules | |
|
||
api | ||
io | ||
pyfeatures.multitrace | ||
pyfeatures.pyfeatures | ||
pyfeatures.validation | ||
units | ||
settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.