When DCM splits a session into two sessions due to large block of NaNs, last inter trial interval (ITI) of the first splitted session is calculated much shorter than expected ITI value.
pspm_dcm with an input signal containing a long block of NaN values so that session is split into two.Last ITI value should be similar to the other ITI values calculated for the splitted session.
Last ITI value ends up being much smaller than the other values.
The reason for this is that last ITI value is calculated using the length of the data for that session. When the splitting procedure gets rid of NaNs, it decreases the length of data for the session. The specific code is on lines 527-528:
sbs_iti{sbs_id} = [sbs_trlstart{sbs_id}(2:end); ...
numel(sbs_data{sbs_id, 1})/model.sr] - sbs_trlstop{sbs_id};
Diff:
Diff: