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

[ENH] Integrate trials object with Fano factor #645

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Moritz-Alexander-Kern
Copy link
Member

@Moritz-Alexander-Kern Moritz-Alexander-Kern commented Oct 22, 2024

This pull request introduces an enhancement to Fano factor using the the elephant.trials module to represent trials. This change is part of a greater effort to provide a more structured and unified approach for handling trial data in Elephant.

Trial representations

This pull request adds two new parameters, pool_trials and pool_spike_trains, to the function. These parameters allow to control how spike trains are aggregated across trials and within individual trials.

Changes

  • fanofactor now handles trial object
  • added tests to test Trial object input
  • Added pool_trials parameter
  • Added pool_spike_trains parameter

@coveralls
Copy link
Collaborator

coveralls commented Nov 14, 2024

Coverage Status

coverage: 88.268% (-0.1%) from 88.401%
when pulling 6bb2fc3 on INM-6:enh/trials_fano_factor
into 123ca04 on NeuralEnsemble:master.

@Moritz-Alexander-Kern Moritz-Alexander-Kern added the enhancement Editing an existing module, improving something label Nov 14, 2024
Default: False
pool_spike_trains : bool, optional
If True, pool spike trains within each trial before computing the Fano factor.
Default: False
Copy link
Member Author

Choose a reason for hiding this comment

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

add to docs: if spiketrains is a list, parameters are ignored

f"different duration (minimum: {np.min(durations)}s, maximum "
f"{np.max(durations)}s).")
else:
warnings.warn(f"Spiketrains was of type {type(spiketrains)}, which does not support automatic duration"
Copy link
Member Author

Choose a reason for hiding this comment

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

remove warning

pool_trials : bool, optional
If True, pool spike trains across trials before computing the Fano factor.
Default: False
pool_spike_trains : bool, optional
Copy link
Member Author

Choose a reason for hiding this comment

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

remove pool_spiketrains_parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Editing an existing module, improving something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants