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

MakeTrialEvents.m should be general #1

Open
tsgouvea opened this issue May 1, 2018 · 2 comments
Open

MakeTrialEvents.m should be general #1

tsgouvea opened this issue May 1, 2018 · 2 comments

Comments

@tsgouvea
Copy link

tsgouvea commented May 1, 2018

Sure events are task/user specific, but specificity should be accomplished at the level of arguments to the function.
Possible solution: input variable could be a struct, fields are names of events of interest, content are vectors (1-by-nTrials) of event time (in seconds) relative to trial start.

@torbenott
Copy link

a version of that could look this (this is a specific suggestion so I don't expect people to agree):

Analogous to defineEventEpochs + prealignSpikes there could be a defineTrialEvents + MakeTrialEvents.

Analagous to when you pass the defineEventEpochs to prealignSpikes as a funhandle argument, you would pass the the defineTrialEvents to MakeTrialEvents as a funhandle argument. The default or template defineTrialEvents would be empty (similar to the defineEventEpochs which would be empty or only contain the TrialStart event). In this 'default' version, MakeTrialEvents would only make a TrialEvents.mat with one field, the aligned TrialStart times. in the user-specific defineTrialEvents one could put in all the trial-length fields as you want and from where you want.

The MakeTrialEvents would not be changed so one make sure that in there the alignment and potentially adjusting trials is done correctly.

@torbenott
Copy link

the only thing that a defineTrialEvents would need to satisfy is to output a struct TE/TrialEvents with fields (could be zero fields for the default/template) containing vectors with number of trials. could also be a list of variables.

the advantage of passing a funhandle in comparison to giving these variables as a function argument to MakeTrialEvents is the same as for defineEventEpochs/prealignSpikes: to integrate user-specific definitions into the pipeline. Of course a similar result can be achieved by just passing it as function arguments - and prealignSpikes also allows for that instead of using a defineEventEpochs. So maybe we could make that just analogous and allow for both?

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

No branches or pull requests

2 participants