function event_sizes=temp_event_sizefinder(raw_data,threshold,dcz)


PSC_time_window=[3:50];

samples_per_ms=10;

event_sizes=[];


event_peaks=find_peaks_within_threshold_crossing_regions(threshold,10,dcz)
                     

for pique=1:length(event_peaks)
    
    PSC_minz=event_peaks(pique)+PSC_time_window(1)-1+find(raw_data(event_peaks(pique)+[PSC_time_window])==min(raw_data(event_peaks(pique)+[PSC_time_window])))
    
    PSC_minindex=PSC_minz(1)
    
    event_size=mean(raw_data([PSC_minindex-(round(.3*samples_per_ms)):PSC_minindex+(round(1*samples_per_ms))]))
    
    event_sizes=[event_sizes;event_size]
                             
end

event_sizes=-1*event_sizes;