Skip to content
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

[Feature] Trial handling in Elephant #579

Merged
merged 94 commits into from
Oct 31, 2023

Conversation

Moritz-Alexander-Kern
Copy link
Member

This PR is the initial contribution to introduce a trial handling functionality into Elephant.

The PR includes the following changes:

  1. Meta class: Trials: This meta class is responsible for defining the behavior and structure of the trial objects in Elephant. It includes methods and attributes related to handling and manipulating trials.

  2. Implementations: TrialsFromBlock and TrialsFromLists: These two implementations are specific ways to create Trials objects from different data structures. TrialsFromBlock may create trial objects from a neo.block of data, while TrialsFromLists creates trial objects from lists of data.

  3. Modification to elephant.statistics.instantaneous_rate: The instantaneous_rate function in the Elephant library is modified to accept a Trials object as input. This modification enables the calculation of firing rates based on the values of cross_spiketrain and cross_trial. The firing rate calculation can now be averaged over trials or spiketrains within a trial, or both.

Overall, this PR adds trial handling functionality to the Elephant library, allowing users to work with trials and for now calculate averaged firing rates .

@pep8speaks
Copy link

pep8speaks commented Oct 30, 2023

Hello @Moritz-Alexander-Kern! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 7:80: E501 line too long (81 > 79 characters)
Line 12:80: E501 line too long (83 > 79 characters)
Line 13:80: E501 line too long (86 > 79 characters)
Line 15:80: E501 line too long (83 > 79 characters)
Line 19:80: E501 line too long (80 > 79 characters)
Line 103:80: E501 line too long (80 > 79 characters)
Line 301:80: E501 line too long (80 > 79 characters)

Comment last updated at 2023-10-31 09:19:48 UTC

Moritz-Alexander-Kern and others added 27 commits October 30, 2023 14:20
…_spike_trains = False returns one analog signal
…e/trial_class

# Conflicts:
#	elephant/trials.py
Copy link
Member Author

@Moritz-Alexander-Kern Moritz-Alexander-Kern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build wheels

@Moritz-Alexander-Kern Moritz-Alexander-Kern merged commit d3a35a2 into NeuralEnsemble:master Oct 31, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new functionality New modules, functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants