Skip to content

Forjulia 1.12 #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HiQGA"
uuid = "01574e87-63b6-4466-925a-334cf7e21b6b"
version = "0.4.14"
authors = ["richardt94 <29562583+richardt94@users.noreply.github.com>"]
version = "0.4.13"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand All @@ -14,15 +14,12 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
DistributedArrays = "aaf54ef3-cdf8-58ed-94cc-d582ad619b94"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
ImageDistances = "51556ac3-7006-55f5-8cb3-34580c88182d"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
KernelDensity = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b"
KernelDensitySJ = "49dc5b4e-6806-4504-b2cc-a81764e7a38b"
LazyGrids = "7031d0ef-c40d-4431-b2f8-61a8d2f650db"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand Down Expand Up @@ -53,16 +50,13 @@ Distances = "0.10.7"
Distributed = "1.7"
DistributedArrays = "0.6.7"
Distributions = "0.25.58"
FastGaussQuadrature = "0.4.9"
FileIO = "1.10"
FastGaussQuadrature = "1.0.2"
Glob = "1.3.1"
ImageDistances = "0.2.15"
ImageIO = "0.5.9"
Images = "0.25.2"
Interpolations = "0.14.7"
KernelDensity = "0.6.5"
ImageIO = "0.6.9"
Images = "0.26.2"
Interpolations = "0.15.1"
KernelDensity = "0.6.9"
KernelDensitySJ = "0.2.1"
LazyGrids = "0.5.0"
LinearAlgebra = "1.7"
LinearMaps = "3.5.1"
NearestNeighbors = "0.4.10"
Expand All @@ -78,7 +72,7 @@ Roots = "2.0.0"
SparseArrays = "1.7"
SpecialFunctions = "1.6, 2"
Statistics = "1.7"
StatsBase = "0.33.16"
StatsBase = "0.34.5"
Test = "1.7"
WriteVTK = "1.18.0"
julia = "1.7 - 1.10.8"
julia = "~1.7, ~1.8, ~1.9, ~1.10, ~1.12"
2 changes: 1 addition & 1 deletion src/AEMnoNuisanceGradientInversionTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export plotconvandlast, loopacrossAEMsoundings
# for deterministic inversions, read in
function compress(soundings, zall; prefix="", rmfile=true, isfirstparalleliteration=false)
fname = soundings[1].sounding_string*"_gradientinv.dat"
!isfile(fname) && throw(AssertionError("file does not exist perhaps soundings already zipped?"))
!isfile(fname) && throw(AssertionError("file $fname does not exist perhaps soundings already zipped?"))
fout = prefix == "" ? "zipped.dat" : prefix*"_zipped.dat"
isfirstparalleliteration && isfile(fout) && throw(AssertionError("Zipped file "*fout*" exists, will not overwrite!"))
for (i, s) in enumerate(soundings)
Expand Down
8 changes: 4 additions & 4 deletions src/CommonToAll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ function calchighalt(fname_dat, windownum_start, windownum_end;
end
nwindows = windownum_end - windownum_start + 1
if !isnothing(times)
@assert length(times) = nwindows
@assert length(times) == nwindows
xlab = "time "*time_units
dologx = true
else
Expand All @@ -1919,13 +1919,13 @@ function calchighalt(fname_dat, windownum_start, windownum_end;
ax.semilogy(times, bias, label="bias calculated")
ax.semilogy(times, sdev, label="sdev calculated")
if !isnothing(agreednoise)
ax.semilogy(times, agreedbias, label="bias agreed")
ax.semilogy(times, agreedsdev, label="sdev agreed")
ax.semilogy(agreedbias[:,1], agreedbias[:,2], label="bias agreed")
ax.semilogy(agreednoise[:,1], agreednoise[:,2], label="sdev agreed")
end
ax.set_title(suffix*" noise")
ax.set_xlabel(xlab)
ax.set_ylabel(amp_units)
dologx && ax.set_xcale("log")
dologx && ax.set_xscale("log")
nicenup(f, fsize=fontsize)
!isempty(suffix) && (suffix = "_"*suffix)
savefig(fname_dat[1:end-4]*suffix*".png")
Expand Down
6 changes: 3 additions & 3 deletions src/GradientInversion.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using LinearMaps, SparseArrays, PositiveFactorizations, LazyGrids
using LinearMaps, SparseArrays, PositiveFactorizations
using Roots:find_zero
using .AbstractOperator, .GP, Optim
import .AbstractOperator.setnuforinvtype
Expand Down Expand Up @@ -342,7 +342,7 @@ function gradientinv( m::AbstractVector,
show_trace = debuglevel > 0 ? true : false
if usebox
res = optimize(f, nubounds[:,1], nubounds[:,2], nu, Fminbox(BFGS(linesearch=Optim.LineSearches.BackTracking(order=3))),
Optim.Options(;show_trace, outer_f_tol=f_abstol, f_tol=f_abstol, outer_iterations = boxiters, iterations=ntriesnu))
Optim.Options(;show_trace, outer_f_abstol=f_abstol, f_abstol=f_abstol, outer_iterations = boxiters, iterations=ntriesnu))
else
@warn "will not be stable if nuisance outside bounds! set usebox=true"
res = optimize(f, nu, BFGS(),
Expand Down Expand Up @@ -460,4 +460,4 @@ function makeinverseR1(n; η=1)
Dinv = Int1Dop(η)
Dtinv = Int1Dtop(Dinv)
LinearMap(Dinv, Dtinv, n)
end
end
2 changes: 1 addition & 1 deletion src/ImageRegression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ImageRegression
import ..AbstractOperator.get_misfit
using ..AbstractOperator
using PyPlot, LinearAlgebra, Statistics
using Random, Images, ImageIO, FileIO, ..CommonToAll
using Random, Images, ImageIO, ..CommonToAll

import ..Model, ..Options, ..OptionsStat, ..OptionsNonstat

Expand Down
2 changes: 1 addition & 1 deletion test/verify_loop_td.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PyPlot, HiQGA.transD_GP, Random, SpecialFunctions
using PyPlot, HiQGA.transD_GP, Random, HiQGA.transD_GP.AEM_VMD_HMD.SpecialFunctions
## model
zfixed = [-1e5, 0, ]
rho = [1e20, 1, ]
Expand Down
Loading