% properties in resected electrode in good outcome
% properties in unresected electrode in good outcome
% properties in resected electrode in poor outcome

output_property=[];
output_property.e1_resected_RonO.freq_av=[];
output_property.e1_resected_RonO.freq_pk=[];
output_property.e1_resected_RonO.power_av=[];
output_property.e1_resected_RonO.power_pk=[];
output_property.e1_resected_RonO.duration=[];
output_property.e1_resected_TRonS.freq_av=[];
output_property.e1_resected_TRonS.freq_pk=[];
output_property.e1_resected_TRonS.power_av=[];
output_property.e1_resected_TRonS.power_pk=[];
output_property.e1_resected_TRonS.duration=[];
output_property.e1_resected_ftRonO.freq_av=[];
output_property.e1_resected_ftRonO.freq_pk=[];
output_property.e1_resected_ftRonO.power_av=[];
output_property.e1_resected_ftRonO.power_pk=[];
output_property.e1_resected_ftRonO.duration=[];
output_property.e1_resected_ftTRonS.freq_av=[];
output_property.e1_resected_ftTRonS.freq_pk=[];
output_property.e1_resected_ftTRonS.power_av=[];
output_property.e1_resected_ftTRonS.power_pk=[];
output_property.e1_resected_ftTRonS.duration=[];

output_property.e1_unresected_RonO.freq_av=[];
output_property.e1_unresected_RonO.freq_pk=[];
output_property.e1_unresected_RonO.power_av=[];
output_property.e1_unresected_RonO.power_pk=[];
output_property.e1_unresected_RonO.duration=[];
output_property.e1_unresected_TRonS.freq_av=[];
output_property.e1_unresected_TRonS.freq_pk=[];
output_property.e1_unresected_TRonS.power_av=[];
output_property.e1_unresected_TRonS.power_pk=[];
output_property.e1_unresected_TRonS.duration=[];
output_property.e1_unresected_ftRonO.freq_av=[];
output_property.e1_unresected_ftRonO.freq_pk=[];
output_property.e1_unresected_ftRonO.power_av=[];
output_property.e1_unresected_ftRonO.power_pk=[];
output_property.e1_unresected_ftRonO.duration=[];
output_property.e1_unresected_ftTRonS.freq_av=[];
output_property.e1_unresected_ftTRonS.freq_pk=[];
output_property.e1_unresected_ftTRonS.power_av=[];
output_property.e1_unresected_ftTRonS.power_pk=[];
output_property.e1_unresected_ftTRonS.duration=[];

output_property.e2_resected_RonO.freq_av=[];
output_property.e2_resected_RonO.freq_pk=[];
output_property.e2_resected_RonO.power_av=[];
output_property.e2_resected_RonO.power_pk=[];
output_property.e2_resected_RonO.duration=[];
output_property.e2_resected_TRonS.freq_av=[];
output_property.e2_resected_TRonS.freq_pk=[];
output_property.e2_resected_TRonS.power_av=[];
output_property.e2_resected_TRonS.power_pk=[];
output_property.e2_resected_TRonS.duration=[];
output_property.e2_resected_ftRonO.freq_av=[];
output_property.e2_resected_ftRonO.freq_pk=[];
output_property.e2_resected_ftRonO.power_av=[];
output_property.e2_resected_ftRonO.power_pk=[];
output_property.e2_resected_ftRonO.duration=[];
output_property.e2_resected_ftTRonS.freq_av=[];
output_property.e2_resected_ftTRonS.freq_pk=[];
output_property.e2_resected_ftTRonS.power_av=[];
output_property.e2_resected_ftTRonS.power_pk=[];
output_property.e2_resected_ftTRonS.duration=[];

output_property.e2_unresected_RonO.freq_av=[];
output_property.e2_unresected_RonO.freq_pk=[];
output_property.e2_unresected_RonO.power_av=[];
output_property.e2_unresected_RonO.power_pk=[];
output_property.e2_unresected_RonO.duration=[];
output_property.e2_unresected_TRonS.freq_av=[];
output_property.e2_unresected_TRonS.freq_pk=[];
output_property.e2_unresected_TRonS.power_av=[];
output_property.e2_unresected_TRonS.power_pk=[];
output_property.e2_unresected_TRonS.duration=[];
output_property.e2_unresected_ftRonO.freq_av=[];
output_property.e2_unresected_ftRonO.freq_pk=[];
output_property.e2_unresected_ftRonO.power_av=[];
output_property.e2_unresected_ftRonO.power_pk=[];
output_property.e2_unresected_ftRonO.duration=[];
output_property.e2_unresected_ftTRonS.freq_av=[];
output_property.e2_unresected_ftTRonS.freq_pk=[];
output_property.e2_unresected_ftTRonS.power_av=[];
output_property.e2_unresected_ftTRonS.power_pk=[];
output_property.e2_unresected_ftTRonS.duration=[];

filein='meta_dsp_MSEL_00551_OR_bp_1.mat';
patientnum=1;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00633_OR_bp_2.mat';
patientnum=2;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00634_OR_bp_2.mat';
patientnum=3;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00658_OR_bp_2.mat';
patientnum=4;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00717_OR_bp_1.mat';
patientnum=5;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00732_OR_bp_1.mat';
patientnum=6;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00792_OR_bp_1.mat';
patientnum=7;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00792_OR_bp_2.mat';
patientnum=72;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00813_OR_bp_1.mat';
patientnum=8;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00821_OR_bp_1.mat';
patientnum=9;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00821_OR_bp_2.mat';
patientnum=92;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00823_OR_bp_1.mat';
patientnum=10;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_00962_OR_bp_1.mat';
patientnum=11;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01065_OR_bp_1.mat';
patientnum=12;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01066_OR_bp_1.mat';
patientnum=13;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01066_OR_bp_2.mat';
patientnum=132;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01090_OR_bp_1.mat';
patientnum=14;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01132_OR_bp_1.mat';
patientnum=15;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01132_OR_bp_2.mat';
patientnum=152;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01132_OR_bp_3.mat';
patientnum=153;
outcome=0;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01182_OR_bp_1.mat';
patientnum=16;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);
filein='meta_dsp_MSEL_01182_OR_bp_2.mat';
patientnum=162;
outcome=1;
[output_property]=calc_property_stats(output_property,filein,outcome);








