Closed teddychao closed 1 year ago
Hi @dominikbach @uzaygokay many thanks for approving this. I will send this updated package to Carlos for him to test. I will merge it when he feels comfortable with the updated code. Thank you
I realise now there is a more fundamental problem.
pspm_sf takes one or multiple data files as data inputs, and an epoch definition file as event input. It will then pass the data to pspm_sf_dcm for each identified epoch.
This means that the missing epoch definition needs to be retrieved in pspm_sf (if method is "dcm"), and a missing index needs to be passed on to pspm_sf_dcm.
I realise now there is a more fundamental problem.
pspm_sf takes one or multiple data files as data inputs, and an epoch definition file as event input. It will then pass the data to pspm_sf_dcm for each identified epoch.
This means that the missing epoch definition needs to be retrieved in pspm_sf (if method is "dcm"), and a missing index needs to be passed on to pspm_sf_dcm.
This is indeed different from the design in pspm_dcm
and pspm_dcm_inv
... Can we open another pull request for this problem after agreeing the changes in this pull request that introduces SF's usage of missing epochs?
I realise now there is a more fundamental problem.
pspm_sf takes one or multiple data files as data inputs, and an epoch definition file as event input. It will then pass the data to pspm_sf_dcm for each identified epoch.
This means that the missing epoch definition needs to be retrieved in pspm_sf (if method is "dcm"), and a missing index needs to be passed on to pspm_sf_dcm.
I think this issue has been resolved through the recent pull request #502 . I have merged #502 into this pull request.
Fixes #484.
Introduction
Missing epochs often appear in the imported data. It is expected to let users know the imported data contain missing epochs since they impact the results of processing. Specifically for this issue, the source data contains missing epochs at the beginning. Since some processing requires the initial values for determine its parameters, such missing epochs finally lead to errors. At the same time, the missing epochs cannot be ignored in VBA processing, and therefore there are further issues inside VBA functions. This pull request aims at resolving such initial missing epochs that disallow following analysis.
Methods
options.missingthreshold
to skip trials that contain missing epochs more than the threshold time.Results
Overall
src/pspm_dcm_inv.m
.missing_data
as a field ofmodel
has been described in the help text..missing
is not used thus removed from help text..missing_data
does not require a default value because there may be no missing values.src/pspm_options.m
options
forpspm_sf
to allow users adjust the threshold.sf_dcm
whensf
callssf_dcm
.src/pspm_sf.m
model.missing
is used for specifying the missing epochs.model.missing
is used to load missing epochs.pspm_time2index
to load missing data, from time ('seconds') into timepoints.src/pspm_sf_dcm.m
X0
andnresp
.pspm_interpolate
to fill the NaNs before using VBA functions.