Install Package
Installation
wget https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/linux/x64/1.8/julia-1.8-latest-linux-x86_64.tar.gz --no-check-certificate
Mat
## Environment variables
export JULIA_PKG_SERVER=https://mirrors.tuna.tsinghua.edu.cn/julia
export JULIA_DEPOT_PATH=${soft_root}/julia/mypkg
## install
using Pkg
Pkg.add("MAT")
Pkg.add("CSV")
Pkg.add("DataFrames")
Pkg.add("printf")
## call
inmat = "$inmat"
using MAT, CSV, DataFrames
file = matopen(inmat)
data=read(file,"data")
scawav = data["scatteringWavefunctions"]
realwav = scawav["realspaceWavefunction"]
fignum = size(realwav,2)
for figid in 1:fignum
rwarr = realwav[1,figid][1]
rwreal = real(conj(rwarr) .* rwarr)
rwaver = sum(rwreal,dims=2)/size(rwreal,2)
rw2d = dropdims(rwaver,dims=2)
csvnamearr=["scatter_",figid,".csv"]
csvname=join(csvnamearr)
CSV.write(csvname, DataFrame(rw2d,:auto), header = false)
end