From 955c8fc49edcec25ef80fb0e5765cca28ad8c693 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Tue, 2 Jan 2018 03:19:57 +0100 Subject: [PATCH] remove init_orbit_data --- src/Orbit-wise.jl | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Orbit-wise.jl b/src/Orbit-wise.jl index 0bd0942..3217272 100644 --- a/src/Orbit-wise.jl +++ b/src/Orbit-wise.jl @@ -104,19 +104,6 @@ end sparsify{T}(U::AbstractArray{T}, tol=eps(T); check=true, verbose=false) = sparsify!(deepcopy(U), tol, check=check, verbose=verbose) -function init_orbit_data(logger, sett::Settings; radius=2) - - ex(fname) = isfile(joinpath(prepath(sett), fname)) - - files_exists = ex.(["delta.jld", "pm.jld", "U_pis.jld", "orbits.jld", "preps.jld"]) - - if !all(files_exists) - compute_orbit_data(logger, prepath(sett), sett.G, sett.S, sett.autS, radius=radius) - end - - return 0 -end - function transform(U::AbstractArray, V::AbstractArray; sparse=true) if sparse return sparsify!(U'*V*U) @@ -230,7 +217,13 @@ end function check_property_T(sett::Settings) - init_orbit_data(LOGGER, sett, radius=sett.radius) + ex(s) = exists(filename(prepath(sett), s)) + + files_exists = ex.([:pm, :Δ, :Uπs, :orb, :preps]) + + if !all(files_exists) + compute_orbit_data(sett.logger, prepath(sett), sett.G, sett.S, sett.autS, radius=sett.radius) + end cond1 = exists(filename(fullpath(sett), :λ)) cond2 = exists(filename(fullpath(sett), :P))