-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Psth tests #347
Merged
Merged
Psth tests #347
Conversation
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
- proportion makes troubles because of potentially empty (all 0s) time-histograms Changes to be committed: modified: syncopy/spikes/compRoutines.py modified: syncopy/spikes/psth.py modified: syncopy/spikes/spike_psth.py modified: syncopy/tests/test_spike_psth.py
- normalization by np.histogram2d is done in, well, 2d - we need for output='proportion' normalized 1d histograms - fixed the case of 0 events Changes to be committed: modified: syncopy/spikes/psth.py
- it's maybe now too intricate, on the other hand hopefully also more more realistic Changes to be committed: modified: syncopy/tests/synth_data.py
Changes to be committed: modified: syncopy/tests/synth_data.py
Changes to be committed: modified: syncopy/spikes/spike_psth.py modified: syncopy/tests/test_spike_psth.py
- for various applications (psth time window/toi selections) it is good to know/see what are the relative start and end times of each trial Changes to be committed: modified: syncopy/datatype/base_data.py modified: syncopy/datatype/continuous_data.py modified: syncopy/spikes/spike_psth.py
- poisson_noise now again has integer offsets - we might need a global time-offset parameter to accomodate bin positions Changes to be committed: modified: syncopy/spikes/compRoutines.py modified: syncopy/tests/synth_data.py modified: syncopy/tests/test_spike_psth.py
- added latency tests Changes to be committed: modified: syncopy/spikes/compRoutines.py modified: syncopy/spikes/spike_psth.py modified: syncopy/tests/test_spike_psth.py
- got now almost everything, however the channel/unit mapping still has problems Changes to be committed: modified: syncopy/spikes/psth.py modified: syncopy/spikes/spike_psth.py modified: syncopy/tests/test_spike_psth.py
- chan/unit mapping is fine.. however we still need to fully respect channel/unit selections Changes to be committed: modified: syncopy/spikes/compRoutines.py modified: syncopy/tests/test_spike_psth.py
- preparation for plugging an Indexer into Selector.trials - might be a good idea to also have a `trial_ids` property in base_data actually - addresses #175
- let's see of that really were the last ones.. Changes to be committed: modified: syncopy/datatype/base_data.py
Changes to be committed: modified: syncopy/tests/test_computationalroutine.py
Changes to be committed: modified: syncopy/tests/test_computationalroutine.py modified: syncopy/tests/test_continuousdata.py modified: syncopy/tests/test_discretedata.py modified: syncopy/tests/test_specest.py
Changes to be committed: modified: syncopy/shared/computational_routine.py
Changes to be committed: modified: syncopy/tests/test_specest.py
Codecov Report
@@ Coverage Diff @@
## dev #347 +/- ##
==========================================
+ Coverage 68.87% 69.80% +0.93%
==========================================
Files 77 77
Lines 8870 8946 +76
Branches 1823 1844 +21
==========================================
+ Hits 6109 6245 +136
+ Misses 2335 2282 -53
+ Partials 426 419 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
- with a closure and _preview_trial it seems to work as intended! Changes to be committed: modified: syncopy/datatype/base_data.py modified: syncopy/tests/test_spike_psth.py
- Indexer indices are relative to the selected trials - not sure if the Indexer itself works as really expected - addresses #175 Changes to be committed: modified: syncopy/datatype/base_data.py
Changes to be committed: modified: syncopy/tests/test_spike_psth.py
- finally finished Changes to be committed: modified: syncopy/spikes/spike_psth.py modified: syncopy/tests/test_spike_psth.py
- selection slices have to be ordered apparently, min < max Changes to be committed: modified: syncopy/datatype/base_data.py modified: syncopy/tests/test_selectdata.py
dfsp-spirit
reviewed
Sep 8, 2022
dfsp-spirit
reviewed
Sep 8, 2022
@@ -155,6 +158,21 @@ def spike_psth(data, | |||
# explicit time window in seconds | |||
else: | |||
array_parser(latency, lims=[-np.inf, np.inf], dims=(2,)) | |||
# check that at least some events are covered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more sanity checks are always nice
dfsp-spirit
reviewed
Sep 8, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PSTH tests and
Selector.trials
additionobj.selection.trials
to access the (pruned by the selection) trials directlyobj.trialintervals
andobj.selection.trialintervals
to see relevant time interval of trials in secondsaddresses #175
Author Guidelines
Reviewer Checklist