function SSprocess_alt(fid_prefix,fidlist)

clearvars -except fid_prefix fidlist; close all;

fpath = ['C:\Users\USER\Documents\mingfaifong\' fid_prefix '\bychannel_alt\'];
spath = ['C:\Users\USER\Documents\mingfaifong\' fid_prefix '\SSfiles_alt\']; mkdir(spath);

if nargin<2
    fpath_info = dir(fpath);      %get info about contents of directory
    isfile = ~[fpath_info.isdir]; %get index for files only
    fidlist = {fpath_info(isfile).name}; %create list of files
end

for i = 1:length(fidlist)
    close all;
    fid = fidlist{i}
    if strfind(fid,'.mat')
        spkdat = load([fpath fid]);
    else
        continue
    end
    if isempty(spkdat.time)
        continue
    end
    %keyboard
    SS = SqueakySpk(fid(1:length(fid)-4),25000,1,spkdat);

    if strfind(fid,'athena363')
       SS.RemoveChannel([1 8 33 57 64 6 7 53]);
    elseif strfind(fid,'buster359')
       SS.RemoveChannel([1 8 33 57 64 11 46]);
    elseif strfind(fid,'buster364')
       SS.RemoveChannel([1 8 33 57 64 6 7]);
    elseif strfind(fid,'cinderella363')
       SS.RemoveChannel([1 8 33 57 64 6 7 53 4 46]);
    elseif strfind(fid,'cinderella19309')
       SS.RemoveChannel([1 8 33 57 64 6 7 29]);
    elseif strfind(fid,'kelso361')
       SS.RemoveChannel([1 8 33 57 64 28 47 48]);
    elseif strfind(fid,'kelso364')
       SS.RemoveChannel([1 8 33 57 64 28 47 48 19]);
    elseif strfind(fid,'milton359')
       SS.RemoveChannel([1 8 33 57 64 18 19 26 27 45 9]);
    elseif strfind(fid,'milton360')
       SS.RemoveChannel([1 8 33 57 64 41]);
    elseif strfind(fid,'nacho361')
       SS.RemoveChannel([1 8 33 57 64 2 10 17 27 41]);
    elseif strfind(fid,'nacho364')
       SS.RemoveChannel([1 8 33 57 64 55]);
    elseif strfind(fid,'orion359')
       SS.RemoveChannel([1 8 33 57 64 18 19 26 27 43 17 41 25 32]); %after aCSF: 9, 10, 34, 35, 49, 50, 2, 3
    elseif strfind(fid,'orion360')
       SS.RemoveChannel([1 8 33 57 64 31 41]);
    elseif strfind(fid,'orion363')
       SS.RemoveChannel([1 8 33 57 64 53]);
    elseif strfind(fid,'quetzalcoatl361')
       SS.RemoveChannel([1 8 33 57 64 27 2 3 17 18]);
    elseif strfind(fid,'quetzalcoatl364')
       SS.RemoveChannel([1 8 33 57 64 19]);
    elseif strfind(fid,'sebastian361')
       SS.RemoveChannel([1 8 33 57 64 7 41 44]);
    elseif strfind(fid,'sebastian364')
       SS.RemoveChannel([1 8 33 57 64 11 15]);
    elseif strfind(fid,'turbo361')
       SS.RemoveChannel([1 8 33 57 64]); %maybe 47?
    elseif strfind(fid,'turbo364')
       SS.RemoveChannel([1 8 33 57 64 19 27 22 23]);
    elseif strfind(fid,'unicorn359')
       SS.RemoveChannel([1 8 33 57 64 32 50 2 3 9 10 17 18 19 25 26 27]);
    elseif strfind(fid,'unicorn364')
       SS.RemoveChannel([1 8 33 57 64 46 49]);
    elseif strfind(fid,'yoda359')
       SS.RemoveChannel([1 8 33 57 64]); %23, 24, 30, 31, 32, 49, 50 are bad due to high humidity at 2011-08-02-16-19-31
    elseif strfind(fid,'yoda363')
       SS.RemoveChannel([1 8 33 57 64 12 7]);
    elseif strfind(fid,'gatsby363')
       SS.RemoveChannel([1 8 33 57 64 53 13]);
    elseif strfind(fid,'hamburger360')
       SS.RemoveChannel([1 8 33 57 64 20 13 7]);
    else
       SS.RemoveChannel([1 8 33 57 64])
    end
       
    SS.HardThreshold(350);
    SS.WaveClus(4,20,'wav',0);
    save([spath fid(1:length(fid)-4) '.SS']);
    %SS.Save([spath fid(1:length(fid)-4) '.SS'])
    %SS.Save
    clearvars -except fidlist fpath spath
end