-
Notifications
You must be signed in to change notification settings - Fork 709
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
Inconsistent behavior of tutorial and code #669
Comments
Thanks for reporting. We recently made changes to the code that relate to the timelock.avg field (which is chantime) and the timelock.trial field (which is rptchan*time). Previously both could be present, but now we support either avg or trial. For existing data structures that have both the avg will be discarded early in the ft function. This may inadvertently affect the plotting. You can ignore the warnings, there are still some pieces of code that are more strict in checking the data structures than necessary, but those do not affect the functionality. The error is of course a problem. Could you specifically point to the tutorial that has the problem (the link you provide is to the home page) and where in the tutorial it happens (e.g. "around 75% down in the tutorial")? |
I meet this issue when I'm trying out code snippets here: http://www.fieldtriptoolbox.org/tutorial/human_ecog#erp_and_hgp_analysis There are also somewhere else in tutorials or examples where I can not run those code provided locally, some with warning, some with errors. I'll post here if I find more. |
BTW, if I want to plot the average and do statistics all after baseline correction, how should I do? |
I realize that this has been open for quite some time now. Sorry for not having followed this up more thoroughly. I am wondering whether it is still relevant to keep this issue open. I suspect that in the meantime the code and the tutorials have moved forward, so the specific problems reported in this issue have gone away. For now, I suggest to close this issue. Feel free @suxpert to reopen this. |
It seems that the tutorials and examples here are not consistent with the newest code. For example, I've tried to plot some ERPs with:
Then ft_singleplotER will complain that:
Then I found that, although
ft_timelockanalysis
returns theavg
et al., if I need to perform baseline correction usingft_timelockbaseline
, these fields will be removed. What's more,ft_singleplotER
will remove them too. So why didft_timelockanalysis
calculate such useless fields?I'm so confused about this, it seems that the order should be (according to tutorial):
ft_preprocessing
, segmentation,ft_timelockanalysis
, calculate average et al.ft_timelockbaseline
, remove average et al., without calculate average,ft_singleplotER
, remove average et al. if exist, re-calculate and plot.But results from
ft_timelockanalysis
were removed and never be used again;ft_timelockbaseline
's result differs from result offt_timelockanalysis
, none of a final result were used inft_singleplotER
...If I need the average and variance, I'll have to calculate them myself (because
ft_timelockbaseline
do not have them)...I though it should be:
But perhaps I made some mistake or misunderstand fieldtrip, I don't know how to do this correctly. Can anybody show me the correct way to do this?
The text was updated successfully, but these errors were encountered: