140140
141141# Reads in recurrence relationship and constructs OPs
142142function InvariantEnsemble (str:: AbstractString ,V:: Function ,d,n:: Integer )
143- file = Pkg . dir ( " RandomMatrices /data/CoefficientDatabase/" * str * " /" * string (n))
143+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabase/" * str * " /" * string (n))
144144 μ0= readdlm (file * " norm.csv" )[1 ]
145145 A= readdlm (file * " rc.csv" ,' ,' )
146146 a= reshape ((A[1 ,1 : end - 1 ]),size (A)[2 ]- 1 )
152152
153153# For constructing InvariantEnsembles that do not scale with n
154154function InvariantEnsembleUnscaled (str:: AbstractString ,V:: Function ,d,n:: Integer )
155- file = Pkg . dir ( " RandomMatrices /data/CoefficientDatabaseUnscaled/" * str * " /" )
155+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabaseUnscaled/" * str * " /" )
156156 μ0= readdlm (file * " norm.csv" )[1 ]
157157 A= readdlm (file * " rc.csv" ,' ,' )
158158 a= reshape ((A[1 ,1 : end - 1 ]),size (A)[2 ]- 1 )
@@ -289,7 +289,7 @@ samplespectra(p::InvariantEnsemble)=samplespectra(p.basis,p.domain)
289289
290290
291291function spectradatabase (str,n:: Integer ,m:: Colon )
292- file = Pkg . dir ( " RandomMatrices /data/SpectraDatabase/" * str * " /" * string (n) * " .csv" );
292+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase/" * str * " /" * string (n) * " .csv" );
293293
294294 if (filesize (file) == 0 )
295295 []
@@ -299,21 +299,21 @@ function spectradatabase(str,n::Integer,m::Colon)
299299end
300300
301301function spectradatabase (str,n:: Integer ,m:: Integer )
302- if filesize (Pkg . dir ( " RandomMatrices /data/CoefficientDatabase" )) == 0 ||
303- filesize (Pkg . dir ( " RandomMatrices /data/CoefficientDatabaseUnscaled" )) == 0
302+ if filesize (joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabase" )) == 0 ||
303+ filesize (joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabaseUnscaled" )) == 0
304304 error (" No coefficient database found. InvariantEnsembles package corrupted." )
305305 end
306306
307307
308- dir = Pkg . dir ( " RandomMatrices /data/SpectraDatabase" )
308+ dir = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase" )
309309 if filesize (dir) == 0
310310 warn (" Creating SpectraDatabase folder " * dir)
311311
312312 mkdir (dir)
313313 end
314314
315315
316- dir = Pkg . dir ( " RandomMatrices /data/SpectraDatabase/" * str)
316+ dir = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase/" * str)
317317
318318 if filesize (dir) == 0
319319 warn (" Creating folder " * dir)
0 commit comments