srData for single trial mic data preprocessing and ridge regression models #3
Open
kailinzhuang wants to merge 50 commits into
Open
srData for single trial mic data preprocessing and ridge regression models #3kailinzhuang wants to merge 50 commits into
kailinzhuang wants to merge 50 commits into
Conversation
…nd cross-correlation calculations
…tent with st; but still saving thresholded spec as the 'spec' to use
…p (and for later to add 'single-trial' processing) with _generate_srdata
…ingle_trial processing
…ct time mean (of stimulus not LOO)
…e (same for all trials) in generate_srData_nwb_single_trials
… calculating deriative threshold in mic trial data
…opy audio data vs single-trial mic data and compare single trial r2
This file contains hidden or 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
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.
this contains data preprocessing and model fitting functions for single-trial mic data as well as some data type / syntax fixes to be compatible with np version (2.4.4).
preprocess_sound_nwb: this is used for both trial-averaged (for efferent copy audio) and single trial (for mic audio)compute_amp_dev_thresholdto compute the envelope, derivative, and find the derivative threshold for event detection with four options. threshold: 1) default (for efferent copy audio only) to use a fixed derivative threshold (default 0.5), 2) std of concatenated derivative for all trials of the same stimulus, 3) std of concatenated derivative of all trials of all stimuli, and 4) std of derivative, one per-trial .R2STcalculation infit_segto calculate single-trial R2 and single-trial error (to later compare with single-trial mic R2)fit_seg_stto solve ridge regression with LOO for single trial mic data.minor:
np.complex128andnp.float64.item()