function individual_induction_traces=analyze_realtime(induction_file_name, scale_factor, stdpwindowend, plotting_color, plotting_linestyle, current_expt,meanpreindwave,... meanpostindwave,general_figure_position) %checked aug 5/2007 induction_file_name=strrep(induction_file_name,'[',''); induction_file_name=strrep(induction_file_name,']',''); [raw_induction_trace,induction_peaks,pulse_duration_presyn,sampling_rate]=create_basic_text_file_justforrealtime(induction_file_name); if length(induction_peaks)~=60,error('error in count of induction peaks'),end samples_per_ms=sampling_rate/1000; raw_induction_trace=raw_induction_trace*scale_factor; induction_filename_plain=strrep(induction_file_name,'_',''); %[presyn_I_Na_present_thistrial]=presyn_I_Na_checker(induction_peaks,raw_induction_trace(:,1),pulse_duration_presyn*(sampling_rate/1000),1); %if ~all(presyn_I_Na_present_thistrial), disp(induction_file_name),error('Problem with presynaptic sodium current'), end individual_induction_traces=simple_induction_plotter(raw_induction_trace,induction_peaks,current_expt,induction_filename_plain,general_figure_position,pulse_duration_presyn,samples_per_ms,sampling_rate); slopes_this_induction=simple_stdp_slope_calculator(raw_induction_trace,induction_peaks,stdpwindowend,pulse_duration_presyn,plotting_color,current_expt,induction_filename_plain,... general_figure_position,meanpreindwave,samples_per_ms); figure(current_expt+200) clf, hold on plot(slopes_this_induction/mean(slopes_this_induction),'o','markersize',10,'markerfacecolor',plotting_color,'markeredgecolor',plotting_color) hold on, plot([0 60],[1 1],'k:') %axis([0 60 0 2]) %axis off title(induction_file_name) % clf, hold on %added oct 7, 2007 for plotting the high slope events in red and the low slope events in black % for trace=1:size(raw_trace_holder,1) % if slopes_this_induction(trace)>1.25 % plot(raw_trace_holder(trace,:),'r','linewidth',.1) % else % plot(raw_trace_holder(trace,:),'k','linewidth',.1) % end % end % axis([0 100 -1 3])