Loading scsearch.m +30 −4 Original line number Diff line number Diff line Loading @@ -18,9 +18,14 @@ t = t{1}; % for i = 1:(length(t)-1) % if (t(i+1)-t(i)>= res*1.001) Tseg=256; %segments' length in seconds % Prendi da file il tspan tspan = t(end)-t(1); param = [f_min,f_max,porb_min,porb_max,a_min,a_max,tasc_min,tasc_max]; %NOTE: t0 used to define the orbital phase γ is equal to the mid point %of the observation span for dataset; M2015, Sec.7 t0 = (t(end)+t(1))/2; % Aux par Loading @@ -30,11 +35,11 @@ gamma_min = Omega_min*(t0-tasc_max); gamma_max = Omega_max*(t0-tasc_min); % Time matrix with bin midpoints for each segment dt = 256/N; dt = Tseg/N; tm = zeros(M,N); tmid = zeros(M,1); for m = 1:M tm(m,1) = t(1)+(m-1)*256 + dt/2; tm(m,1) = t(1)+(m-1)*Tseg + dt/2; for j = 2:N tm(m,j)= tm(m,1)+(j-1)*dt; end Loading Loading @@ -72,10 +77,24 @@ for s = 1:4 nismax(m,s) = f_max*a_max*(Omega_max^s)*singah(s); end end %SE T0 È IL MIDPOINT DI TUTTA L'OSSERVAZIONE, ALLORA NIMIN E NIMAX NON %DIPENDONO DA M E SONO UGUALI PER TUTTI I SEGMENTI. CONTROLLARE!! % Try s* and check \nu_s range g_jj=((pi*T)^2)/3.*[1; (T^2)/60; (T^3)/1344; (T^4)/172800]; %eq. 22 M2015 + calcoli da eq. 21 M2015 mu_s=0.999; %massimo mismatch da scegliere s_s=int16(4); while(1) for m=1:M if((nismax(m,s_s)-nismin(m,s_s))<delta_ni(mu_s,s_s,g_jj(s_s))) s_s=s_s-1; else break; end end end % Try s* and check \nu_s range %COMPLETARE DOPO AVER STUDIATO I RANDOM TEMP. BANKS %E VEDERE CODICE https://pyfstat.readthedocs.io/en/latest/pyfstat.html#pyfstat.core.SemiCoherentSearch Loading @@ -83,4 +102,11 @@ end % %-------------------------------------------------------------------------- %FUNCTIONS %-------------------------------------------------------------------------- function res = delta_ni(mu_s,s_s,g_jj) %Compute eq. 23 M2015 res= 2.*sqrt(mu_s./(s_s.*g_jj)); end No newline at end of file Loading
scsearch.m +30 −4 Original line number Diff line number Diff line Loading @@ -18,9 +18,14 @@ t = t{1}; % for i = 1:(length(t)-1) % if (t(i+1)-t(i)>= res*1.001) Tseg=256; %segments' length in seconds % Prendi da file il tspan tspan = t(end)-t(1); param = [f_min,f_max,porb_min,porb_max,a_min,a_max,tasc_min,tasc_max]; %NOTE: t0 used to define the orbital phase γ is equal to the mid point %of the observation span for dataset; M2015, Sec.7 t0 = (t(end)+t(1))/2; % Aux par Loading @@ -30,11 +35,11 @@ gamma_min = Omega_min*(t0-tasc_max); gamma_max = Omega_max*(t0-tasc_min); % Time matrix with bin midpoints for each segment dt = 256/N; dt = Tseg/N; tm = zeros(M,N); tmid = zeros(M,1); for m = 1:M tm(m,1) = t(1)+(m-1)*256 + dt/2; tm(m,1) = t(1)+(m-1)*Tseg + dt/2; for j = 2:N tm(m,j)= tm(m,1)+(j-1)*dt; end Loading Loading @@ -72,10 +77,24 @@ for s = 1:4 nismax(m,s) = f_max*a_max*(Omega_max^s)*singah(s); end end %SE T0 È IL MIDPOINT DI TUTTA L'OSSERVAZIONE, ALLORA NIMIN E NIMAX NON %DIPENDONO DA M E SONO UGUALI PER TUTTI I SEGMENTI. CONTROLLARE!! % Try s* and check \nu_s range g_jj=((pi*T)^2)/3.*[1; (T^2)/60; (T^3)/1344; (T^4)/172800]; %eq. 22 M2015 + calcoli da eq. 21 M2015 mu_s=0.999; %massimo mismatch da scegliere s_s=int16(4); while(1) for m=1:M if((nismax(m,s_s)-nismin(m,s_s))<delta_ni(mu_s,s_s,g_jj(s_s))) s_s=s_s-1; else break; end end end % Try s* and check \nu_s range %COMPLETARE DOPO AVER STUDIATO I RANDOM TEMP. BANKS %E VEDERE CODICE https://pyfstat.readthedocs.io/en/latest/pyfstat.html#pyfstat.core.SemiCoherentSearch Loading @@ -83,4 +102,11 @@ end % %-------------------------------------------------------------------------- %FUNCTIONS %-------------------------------------------------------------------------- function res = delta_ni(mu_s,s_s,g_jj) %Compute eq. 23 M2015 res= 2.*sqrt(mu_s./(s_s.*g_jj)); end No newline at end of file