0001 function expinfo_practiceFilt = ensemble_filt_practicedata(expinfo,params)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 [practice_id,] = mysql_get_stim_by_attribute(...
0016 'attrib_name', params.practice_attrib, ...
0017 'mysql', params.mysql);
0018
0019 expinfoCols = set_var_col_const(expinfo.vars);
0020 expinfo_practiceFilt = expinfo;
0021
0022
0023 stim_meta_st = expinfo.data{expinfoCols.stimulus_metadata};
0024 stim_meta_cols = set_var_col_const(stim_meta_st.vars);
0025 stim_ids = stim_meta_st.data{stim_meta_cols.stimulus_id};
0026 stim_id_practice_mask = ismember(stim_ids, practice_id{1});
0027 stim_meta_practiceFilt = stim_meta_st;
0028 for icell = 1:length(stim_meta_st.data)
0029 stim_meta_practiceFilt.data{icell}(stim_id_practice_mask) = [];
0030 end
0031 expinfo_practiceFilt.data{expinfoCols.stimulus_metadata} = stim_meta_practiceFilt;
0032
0033
0034 resp_st = expinfo.data{expinfoCols.response_data};
0035 resp_st_cols = set_var_col_const(resp_st.vars);
0036 resp_practice_mask = ismember(resp_st.data{resp_st_cols.stimulus_id},practice_id{1});
0037 resp_data_practiceFilt = resp_st;
0038 for iRespCell = 1:length(resp_st.data)
0039 resp_data_practiceFilt.data{iRespCell}(resp_practice_mask) = [];
0040 end
0041 expinfo_practiceFilt.data{expinfoCols.response_data} = resp_data_practiceFilt;
0042
0043
0044 stimXatt_st = expinfo.data{expinfoCols.stimulus_x_attribute_metadata};
0045 stimXatt_cols = set_var_col_const(stimXatt_st.vars);
0046 stimXatt_practice_mask = ismember(stimXatt_st.data{stimXatt_cols.stimulus_id},practice_id{1});
0047 stimXatt_practiceFilt = stimXatt_st;
0048 for iStimAttCell = 1:length(stimXatt_st.data)
0049 stimXatt_practiceFilt.data{iStimAttCell}(stimXatt_practice_mask) = [];
0050 end
0051 expinfo_practiceFilt.data{expinfoCols.stimulus_x_attribute_metadata} = stimXatt_practiceFilt;
0052
0053 return