%% This is the Owen model as described in Owen% Lindblom, 1998 tic clear all %t=200:0.00025:500; fo= 1000; alpha=10^(0); k=1.8*alpha^2*10^-21 ; %fOwen= 1./(1/fo^6 + 6*k*t).^(1/6); %plot(t,fOwen) %xlabel('Time (sec)') %ylabel('Freq (Hz)') %title('plotOwen with alpha=1 r-mode spindown of a ns') % Phi=[]; % for n=200:0.00025:500 % t=0:0.00025:n; % fOwen= 1./(1/fo^6 + 6*k*t).^(1/6); %% Phi(n)=2*pi*trapz(t,fOwen); % Phi=[Phi 2*pi*trapz(t,fOwen)]; % end fOwen = @(t) 1./(1/fo^6 + 6*k*t).^(1/6); K=[]; FOwen=[]; for t=0:0.00025:1000; % anything longer than dt = 0.00025 was not resulting in burstegard detecting the % waveform / note: however that I did not change any parameters in the burstegard code K = [K quad(fOwen,t,t+0.00025) ]; % also note that for 100 sec code the code needs several hours to finish % for t=500 the code needs several days. % Quadrature is a numerical method used to find the area under % the graph of a function, that is, to compute a definite integral. FOwen =[FOwen 1./(1/fo^6 + 6*k*t).^(1/6)]; % I realized that this code is not efficient because of the way the K and end % FOwen are populated. that needs to change Phi=K(1); for i=1:size(K(1,:),2)-1; Phi=[Phi K(i+1)+Phi(i) % these are given by formulae 9.9, 9.10 and 9.11 as shown in my qualifyin exam paper end t=[0:0.00025:1000]; % Phi=[0 Phi]; d=1; %In units of Mpc ho=1000*1.52*10^-23*(1/d)*(FOwen/1000).^3*alpha; % this is the r-mode amplitude amplified by a factor of 1000 w=0; % i is the inclination angle that is assumed to be zero hp=ho.*(1+cos(w).^2).*cos(Phi); % this is the plus polarization hc=2*ho.*cos(w).*sin(Phi); % this is the cross polarization % SNR=ho.^2*(1-cos(w).^2); but if w=0 this will always be zero(?) toc