function CDCs_this_event=CDC_creator(num_possible_IQIs,spd_crit,SC,SC_template_length)
%description: made to permit parallelization of the slow step in IQI_estimator
%called by: IQI_estimator
%calls: template_based_mini_detector_onestep
%notes:
%code confirmed date: dec 28, 2012

CDCs_this_event=nan(num_possible_IQIs,1);
for k=1:num_possible_IQIs
    detection_criterion=template_based_mini_detector_onestep(spd_crit,SC(:,k),SC_template_length);
    CDCs_this_event(k)=detection_criterion;
end