function sampRate = getdetrate(detId)
% GETDETRATE - return sampling rate of GW detector
%
%       sampRate = getdetrate(detId)
%
%           detId - GW detector ID
%                       H1,H2,L1,G1,V1,T1
%
%       sampRate - sampling rate in Hz of GW channels
%
% $Id: getdetrate.m,v 1.2 2005/04/13 00:50:39 thorne Exp $

% SET constants for IFO sampling frequencies
LIGO_SAMP_RATE = 16384;
GEO_SAMP_RATE = 16384;
TAMA_SAMP_RATE = 20000;
VIRGO_SAMP_RATE = 20000;

% CHOOSE rate based on detector
detId = upper(detId);
switch detId
    case 'H1'
        sampRate = LIGO_SAMP_RATE;
    case 'H2'
        sampRate = LIGO_SAMP_RATE;
    case 'L1'
        sampRate = LIGO_SAMP_RATE;
    case 'G1'
        sampRate = GEO_SAMP_RATE;
    case 'T1'
        sampRate = TAMA_SAMP_RATE;
    case 'V2'
        sampRate = VIRGO_SAMP_RATE;
    case 'GEO'
        sampRate = GEO_SAMP_RATE;
    case 'TAMA'
        sampRate = TAMA_SAMP_RATE;
    case 'VIRGO'
        sampRate = VIRGO_SAMP_RATE;
    otherwise
        sampRate = LIGO_SAMP_RATE
end
return

