diff --git a/Project.toml b/Project.toml index 3db8f61..48bc457 100644 --- a/Project.toml +++ b/Project.toml @@ -34,6 +34,7 @@ BenchmarkTools = "1" ComponentArrays = "0.15" Distributions = "0.25" Infiltrator = "1.2" +Lux = "<0.5.49" Optimization = "3.12" OptimizationOptimJL = "0.1.5" OptimizationOptimisers = "0.1.2" @@ -50,4 +51,4 @@ julia = "1.7" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test"] +test = ["Test"] \ No newline at end of file diff --git a/README.md b/README.md index 9ee6936..481ae68 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,11 @@ To make plots using Matplotlib, Cartopy, and PMagPy, we install both [PyCall.jl] - Create a Python conda environment, based on [this conda environment file](https://raw.githubusercontent.com/facusapienza21/SphereUDE.jl/main/environment.yml), with all the required packages using `conda env create -f environment.yml`. - Inside the Julia REPL, install both `PyCall.jl` and `PyPlot.jl` with `] add PyCall, Pyplot`. -- Specify the Python path of the new environment with `ENV["PYTHON"] = ...`, where you should complete the path of the Python installation that shows when you do `conda activate SphereUDE`, `which python`. -- Inside the Julia REPL, execute `Pkg.build("PyCall")` to re-build PyCall with the new Python path. +- Specify the Python path of the new environment with `ENV["PYTHON"] = ...`, where you should complete the path of the Python installation that shows when you do `conda activate SphereUDE`, `which python`. Inside the Julia REPL, execute `Pkg.build("PyCall")` to re-build PyCall with the new Python path: +``` +julia> ENV["PYTHON"] = read(`which python`, String)[1:end-1] # trim backspace +julia> import Pkg; Pkg.build("PyCall") +julia> exit() +``` You are ready to use Python from your Julia session! diff --git a/examples/double_rotation/double_rotation.jl b/examples/double_rotation/double_rotation.jl index 5587565..597d53a 100644 --- a/examples/double_rotation/double_rotation.jl +++ b/examples/double_rotation/double_rotation.jl @@ -88,28 +88,25 @@ end # run # Run different experiments λ₀ = 0.1 -λ₁ = 0.1 -# λ₀ = 0.1 -# λ₁ = 0.01 +λ₁ = 0.001 + run(; kappa = 50., - regs = [Regularization(order=1, power=1.0, λ=λ₁, diff_mode="CS"), + regs = [Regularization(order=1, power=1.0, λ=λ₁, diff_mode="FD"), Regularization(order=0, power=2.0, λ=λ₀, diff_mode=nothing)], - title = "plot_50_lambda$(λ₁)") + title = "plots/plot_50_lambda$(λ₁)") λ₀ = 0.1 λ₁ = 0.1 -# λ₀ = 0.1 -# λ₁ = 0.01 + run(; kappa = 200., regs = [Regularization(order=1, power=1.0, λ=λ₁, diff_mode="CS"), Regularization(order=0, power=2.0, λ=λ₀)], - title = "plot_200_lambda$(λ₁)") + title = "plots/plot_200_lambda$(λ₁)") λ₀ = 0.1 λ₁ = 0.1 -# λ₀ = 0.1 -# λ₁ = 0.01 + run(; kappa = 1000., regs = [Regularization(order=1, power=1.0, λ=λ₁, diff_mode="CS"), Regularization(order=0, power=2.0, λ=λ₀)], - title = "plot_1000_lambda$(λ₁)") \ No newline at end of file + title = "plots/plot_1000_lambda$(λ₁)") \ No newline at end of file