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 13 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

Changes

  • fanofactor now handles trial object
  • added tests to test Trial object input

@coveralls
Copy link
Collaborator

coveralls commented Nov 14, 2024

Coverage Status

coverage: 88.258% (-0.1%) from 88.401%
when pulling 303f363 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
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

@Moritz-Alexander-Kern Moritz-Alexander-Kern added this to the v1.2.0 milestone Dec 10, 2024

Notes
-----
The check for the equal duration of the input spike trains is performed
only if the input is of type`neo.SpikeTrain`: if you pass a numpy array,
only if the input is of type`neo.SpikeTrain`: if you pass e.g. a numpy array,
please make sure that they all have the same duration manually.
Copy link
Member Author

Choose a reason for hiding this comment

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

move notes to spiketrains parameter docstring

(see Notes).
Default: 0.1 ms
pool_trials : 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 parameter -> default behavior for trial object as input

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