function genCleanSpkNoWaveform(fid_prefix)

fpath = ['C:\Users\USER\Documents\mingfaifong\' fid_prefix '\SSfiles\'];
spath = ['C:\Users\USER\Documents\mingfaifong\' fid_prefix '\'];

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

spktimes = [];
channels = [];
cleanspk = [];


for i = 1:length(fidlist)
    fid = fidlist{i};
    load([fpath fid],'-mat');
    
    if SS.unit
        SS.RemoveUnit();
    end
    
    spktimes = [spktimes; SS.time];
    channels = [channels; SS.channel];
    cleanspk = [cleanspk; SS.clean];
    
    clearvars -except spktimes channels cleanspk i fidlist fpath fid_prefix spath
    
end

time = spktimes;
channel = channels;
clean = cleanspk;

save([spath fid_prefix '_nowaveform'],'time','channel','clean');
