function [s1,s2] = Projection_(Sp_Time,STC_Matrix,Input_)
% Sp_Time are the spiking time represented by samples (not m-sec) 
%% Compute the eigenvectors and eigenvalues
[u,s,v] = svd(STC_Matrix);
s_d = diag(sqrt(s/sum(diag(s))));
v1 = s_d(1)*u(:,1);
v2 = s_d(2)*u(:,2);
L_v = (length(v1)-1)/2;
%% Resample to the originanl size
L_V = 10*L_v;
LL_V = 2*L_V+1;%2
uy = iddata([],v1,1);
ur = resample(uy,LL_V,length(v1));
V1 = ur.u;
uy = iddata([],v2,1);
ur = resample(uy,LL_V,length(v2));
V2 = ur.u;
%%
L_I = length(Input_);
L_F = L_V;
Inp_ = [zeros(L_F,1);Input_;zeros(L_F,1)];
%Sig = zeros(LL_V,length(Sp_Time));
for i = 1:length(Sp_Time)
    te = Sp_Time(i) + L_F;
    Sig(:,i) = Inp_(te-L_F:te+L_F);
end

s1 = Sig'*V1;
s2 = Sig'*V2;
% s1 = Sig(1:L_V+1,:)'*V1(1:L_V+1);
% s2 = Sig(1:L_V+1,:)'*V2(1:L_V+1);