-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix trialization #130
fix trialization #130
Conversation
- need a lower mark threshold (first mark is smaller) - force manual mark detection
(now always zero)
It looks like there is a baseline period that starts right after the stimulus. I think we want to space out the baseline farther away from the stimulus offset to ensure it's a true baseline. I have not yet inspect whether the marks are at the correct times.
Is this just a one off change or are we moving away from the metadata repo completely and integrating everthing to the nwb repo? |
@jthermiz Thanks for reviewing! Re 1, 2) splitted baseline trials, that's just because I worked in terms of between-marks intervals. So when the stimulus is located in the middle of the between-marks interval, the current code creates two baseline trials before/after the stimulus, such that the post-prev-stim baseline and the pre-next-stim baseline are actually connected. But if this is inconvenient, it is simple to fix the code to create only (1 stim trial + 1 baseline trial) per mark, plus 2 optional extra baseline trials in the beginning/end of recording. I will implement this. Re 2) the baseline trial being too close to the stimulus:
This is a really good point, I just don't have a good sense about this issue to make decisions on how far away from the stimulus the baseline should start. Let's discuss more in the Slack channel! Re 3) Location of stimulus metadata: For now, I think I will keep the stimulus metadata file
But the metadata repo still has the probe metadata (electrode coordinates etc.), which can stay away from the codebase. |
Sounds good @jihyunbak. Closing the loop on 2). For the discrete stimuli like white noise and tone, there appears to be consensus for this: The baseline trial centered about this point: baseline center = stim offset + (next stim onset - stim offset)/2 @JesseLivezey also said:
|
Thanks @jthermiz! Follow-up: Baseline fixes:
Additional changes:
|
Description and related issues
This grew into a large PR, but major changes are the following:
metadata/resources/list_of_stimuli.yaml
file in this package. The<stim_name>.yaml
files in the metadata repo are no longer used.StimValueExtractor
is deleted; instead stimulus parameters are loaded directly in ToneTokenizer and TIMITTokenizer.RecManager
, which keeps the TDT reader. Previously we were constructing TDTReader twice, once for NeuralDataOriginator and once for StimulusOriginator/MarkManager ; this was time consuming. Now RecManager is initialized only once and is passed to the neural/stimulus originators.This PR closes these issues:
Checklist:
Did not run the tests in the test folder, but this branch successfully generates nwb for wn2 (
RVG06_B03
), tone (RVG06_B05
), timit (RVG06_B08
) and dmr (RVG06_B09
) blocks.pytest --basetemp=tmp -sv -n 8 tests
on catscan from the root directorydocs/source
has been updated for any added, moved, or removed filesmake clean & make html
from thedocs
folderflake8 nsds_lab_to_nwb tests
from the root directory