function template=monoexprisedecay_template_generator(seed_values,time_vector)
%description: makes a simple facsimile of a synaptic current waveform to use as a template for fitting actual recorded waveforms with lsqcurvefit
%called by: iterative_curve_fit_singledecay,patchfile_analysis,extract_waveforms_of_minis_in_ttx,extract_events_for_simulatedpscinnoise_template,temporary_asynch_analyzer(deprecated)
%calls: [no custom functions]
%notes: all temporal values in the inputs should be in terms of samples
%code confirmed date: 8 nov 2012

amplitude_scaler=seed_values(1);
tau_rise=seed_values(2);
tau_decay=seed_values(3);
y_offset=seed_values(4);
latency=seed_values(5);

template=y_offset-[zeros(1,ceil(latency)) amplitude_scaler*(1-exp(-time_vector/tau_rise)).*exp(-time_vector/tau_decay)];
template=template(1:length(time_vector));   %lsqcurvefit can only compare two vectors of the same length
