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

Align stimulus function (first) #121

Merged
merged 7 commits into from
Mar 31, 2023
Merged

Align stimulus function (first) #121

merged 7 commits into from
Mar 31, 2023

Conversation

vinaysraghavan
Copy link
Collaborator

First working version of the align_stimulus_to_recording function in the naplib.naplab module

Reference Issues/PRs

Fixes #116 Function to perform alignment for iEEG pipeline

What does this implement/fix? Explain your changes.

Adds a function to perform alignment between the audio recorded during an experiment with the stimulus files played during the experiment

Any other comments?

First working version of the align_stimulus_to_recording function in the naplib.naplab module
Simplified alignment by removing arguments initially added to improve efficiency (not needed with cross-correlation method), and improved doc string
Added test data, test function, and file to generate docs
t_start_look : float, default=0
What time of the recorded audio to begin the searching process
By default, uses 0 seconds, i.e. beginning of recorded audio

Copy link
Collaborator

Choose a reason for hiding this comment

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

no docstring for verbose


# Determine which stimulus channel was best, set useCh, save inds
if useCh == None:
print(f'Using channel {np.argmax(max_corrs)}')
Copy link
Collaborator

Choose a reason for hiding this comment

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

only print if verbose

Adding docstring for verbose and only doing any prints if verbose=True
@vinaysraghavan vinaysraghavan merged commit 8e51023 into hackathon Mar 31, 2023
@vinaysraghavan vinaysraghavan deleted the alignment branch March 31, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants