Commit 66453650 authored by Riccardo La Placa's avatar Riccardo La Placa
Browse files

Added powdist_function; moved Lambda in main scsearch to RAM to avoid GPU...

Added powdist_function; moved Lambda in main scsearch to RAM to avoid GPU limit (doesn't slow it too much in the first cycle, we currently add ~25% in computational time in the second one)
parent 1c52a5a9
Loading
Loading
Loading
Loading

powdist_f.m

0 → 100644
+17 −0
Original line number Diff line number Diff line
function [outputArg1,outputArg2] = powdist_f(NyqFreq,BinLC)
%POWDIST_F Summary of this function goes here
%   Detailed explanation goes here
%   NyqFreq is the Nyquist frequency 
%   BinLC is the binned lightcurve (with dt assumed = 1/2*NyqFreq)
import matlab.io.*

dt = 1/(2*NyqFreq);
N = length(BinLC);
Tseg = dt*N;
ted = (0:dt:Tseg);
tm = (0.5*dt:dt:(Tseg-0.5*dt));

outputArg1 = inputArg1;
outputArg2 = inputArg2;
end
+4 −4
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@ else
end
pathfi = [folname,'/'];

reset(gpuDevice(2));
gpuDevice(2);
reset(gpuDevice(1));
gpuDevice(1);

diary([pathfi,'loggerino',char(datetime('now','Format','dd_MM')),'.log'])
diary([pathfi,'loggerino_metrica_',char(datetime('now','Format','dd_MM')),'.log'])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
daterella = ['Date and time now ',char(datetime('now')),' (UTC), maybe'];
disp(daterella); clear daterella
@@ -530,7 +530,7 @@ for s = 1:s_s
end
sqdist = @(x,Z)sqrt(((x-Z).^2)*sqg);
% nisearcher = ExhaustiveSearcher(gather(nibank),'Distance',gdistance);
nisearcher = ExhaustiveSearcher(nibank,'Distance',sqdist);
nisearcher = ExhaustiveSearcher(gather(nibank),'Distance',sqdist);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%