Home > . > makechirplet.m

makechirplet

PURPOSE ^

SYNOPSIS ^

function htt = makechirplet(simId, ampl, startSamp, sampFreq)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function htt = makechirplet(simId, ampl, startSamp, sampFreq)
0002 
0003 [id, f0, tau, durationSec, alpha] = simparse(simId);
0004 if isempty(alpha)
0005     alpha = 0;
0006 end
0007 
0008 % Deterimine length of time vector in samples (floor trucated)
0009 durationSamp = floor(durationSec*sampFreq);
0010 % Check that durationSamp is not < 1
0011 if (durationSamp < 1)
0012     msgId = 'makeh:durationSamp';
0013     error(msgId,'%s: %d',msgId,durationSamp);
0014 end
0015 % Time vector = times at which IFO samples waveform
0016 ti = ((1:durationSamp)./sampFreq)+((1-mod(startSamp,1))/sampFreq);
0017 % N.B. This accounts for intersample start times
0018 
0019 % Generate the Gaussian waveform that is also the base for SG and CG
0020 % Offset times for Gaussians
0021 tg = ti-(ti(end)/2);
0022 % Generate Gaussian
0023 gauss = exp(-(tg/tau).^2);
0024 
0025 htt(1,:) = (ampl*(2*pi*tau^2)^(-1/4)).*exp(-(tg).^2/(4*tau^2)).*cos(2*pi*f0.*(tg)+(alpha.*(tg).^2)/(4*tau.*tg.^2));
0026 htt(2,:) = (ampl*(2*pi*tau^2)^(-1/4)).*exp(-(tg).^2/(4*tau^2)).*sin(2*pi*f0.*(tg)+(alpha.*(tg).^2)/(4*tau.*tg.^2));
0027 
0028 return

Generated on Thu 12-May-2005 11:48:48 by m2html © 2003