Skip to content

Commit

Permalink
plot changes
Browse files Browse the repository at this point in the history
-zboundarytocenter_inexact removed
getnextxyinr asserts
  • Loading branch information
a2ray committed Feb 3, 2025
1 parent 6512026 commit 929d61d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HiQGA"
uuid = "01574e87-63b6-4466-925a-334cf7e21b6b"
authors = ["richardt94 <[email protected]>"]
version = "0.4.10"
version = "0.4.11"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
15 changes: 5 additions & 10 deletions src/CommonToAll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1279,17 +1279,11 @@ function zcentertoboundary(zall)
zb
end

function zboundarytocenter_inexact(zb; fudgelast=false)
# no more fudging, this is superseded
thickness = diff(zb)
zall = zb[1:end-1] + thickness/2
if fudgelast
zall = [zall; zb[end]+thickness[end]/2]
end
zall
end

function zboundarytocenter(zb)
# only for exact depth of last layer halfspace for geometric thickness increase
# default used in transD_GP. If you have other generic thickness
# use thicktodepth()

# first get extendfrac r
numerator = diff(zb[2:end])
denom = diff(zb[1:end-1])
Expand Down Expand Up @@ -1453,6 +1447,7 @@ end
function getnextxyinr(XY1, XY2, Δr)
Δx, Δy = XY2 - XY1
= normalize([Δx, Δy])
@assert sqrt(Δx^2 + Δy^2) >= Δr "Δr throws it beyond next point"
XY1 + Δr*
end

Expand Down
14 changes: 7 additions & 7 deletions zz_portalcurtains/comparelei.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ donn = false
delbin = 600
## Get LEI
line, X, Y, Z, thick, σ = transD_GP.readcols([5,7,8,9,[53,82],[23,52]],
"/Users/anray/Documents/work/projects/largeaem/GA_LEI/vtk_AusAEM_01_QLD/galeisbs_vector_sum_point_located_QLD.dat";
"/scratch/ns59/ar0754/All_AEM/AusAEM_01/galeisbs_vector_sum_point_located_QLD.dat";
startfrom=1, decfactor=5)
idx = line .== linewanted
Xd, Yd, Zd, thick, σd = map(x->x[idx,:],(X, Y, Z, thick, σ))
zalld = transD_GP.zboundarytocenter_inexact(cumsum(thick[1,:]), fudgelast=true)
zalld = transD_GP.thicktodepth(cumsum(thick[1,:]))
## Get probabilistic
Xp, Yp, Zp, zallp, ρlow, ρmid, ρhigh, = transD_GP.readxyzrhoϕ(linewanted, 52,
pathname="/Users/anray/Documents/work/projects/largeaem/final_01/summaries_all/AusAEM_01/2017_QLD/summary")
## put them togather
pathname="/g/data/ha3/probabilistic_AEM_phase_01/AusAEM_01/2017_QLD/summary")
## put them together
X = [Xd, Matrix(Matrix(Xp')'), Matrix(Matrix(Xp')'), Matrix(Matrix(Xp')')]
Y = [Yd, Matrix(Matrix(Yp')'), Matrix(Matrix(Yp')'), Matrix(Matrix(Yp')')]
Z = [Zd, Matrix(Matrix(Zp')'), Matrix(Matrix(Zp')'), Matrix(Matrix(Zp')') ]
Expand All @@ -25,6 +25,6 @@ zall = [zalld, zallp, zallp, zallp]
## plot
titles = ["Deterministic conductivity", "10th Percentile conductivity", "50th Percentile conductivity", "90th Percentile conductivity"]
xrd, yrd, axd = transD_GP.plotmanygrids(deepcopy(σ), deepcopy(X), deepcopy(Y), deepcopy(Z), deepcopy(zall);
dr, vmin, vmax, donn, xl, yl, δ²=linesmoothδ², figsize=(20,10), titles,
preferEright=true, plotbinning=false, fontsize=10, delbin, hspace=0.22, spacefactor=0.1)
savefig("Line_$linewanted.png", dpi=500)
dr, vmin, vmax, donn, xl, yl, δ²=linesmoothδ², figsize=(20,12), titles,
preferEright=true, plotbinning=false, fontsize=25, delbin, hspace=0.35, spacefactor=0.15)
savefig("Line_$linewanted.png", dpi=500)
18 changes: 10 additions & 8 deletions zz_portalcurtains/comparelei_2.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cd(@__DIR__)
ENV["MPLBACKEND"]="agg"
using HiQGA, PyPlot
linewanted = 2030001
linewanted = 2029001
dr = 100
xl, yl = [], [-250, 190]
vmin, vmax = -2.5, 0.5
Expand All @@ -8,14 +10,14 @@ donn = false
delbin = 600
## Get LEI
line, X, Y, Z, thick, σ = transD_GP.readcols([5,7,8,11,[56,85],[26,55]],
"/Users/anray/Documents/work/projects/largeaem/GA_LEI/vtk_WRC_AusAEM_parallel/South/AusAEM_Western_Resources_Corridor_GA_vsum_inversion_South.dat",
"/scratch/ns59/ar0754/All_AEM/AusAEM_WRC/AusAEM_Western_Resources_Corridor_GA_vsum_inversion_South.dat",
startfrom=1, decfactor=5)
idx = line .== linewanted
Xd, Yd, Zd, thick, σd = map(x->x[idx,:],(X, Y, Z, thick, σ))
zalld = transD_GP.zboundarytocenter_inexact(cumsum(thick[1,:]), fudgelast=true)
zalld = transD_GP.thicktodepth(thick[1,:])
## Get probabilistic
Xp, Yp, Zp, zallp, ρlow, ρmid, ρhigh, = transD_GP.readxyzrhoϕ(linewanted, 52,
pathname="/Users/anray/Documents/work/projects/largeaem/final_01/summaries_all/AusAEM_03_WRC/2022_WRC_South/summary/")
pathname="/g/data/ha3/probabilistic_AEM_phase_01/AusAEM_03_WRC/2022_WRC_South/summary")
## put them together
X = [Xd, Matrix(Matrix(Xp')'), Matrix(Matrix(Xp')'), Matrix(Matrix(Xp')')]
Y = [Yd, Matrix(Matrix(Yp')'), Matrix(Matrix(Yp')'), Matrix(Matrix(Yp')')]
Expand All @@ -25,7 +27,7 @@ zall = [zalld, zallp, zallp, zallp]
## plot
XYprofiles = nothing#[Xp[520];Yp[520]]
titles = ["Deterministic conductivity", "10th Percentile conductivity", "50th Percentile conductivity", "90th Percentile conductivity"]
xrd, yrd, axd, zatXY, satXY = transD_GP.plotmanygrids(deepcopy(σ), deepcopy(X), deepcopy(Y), deepcopy(Z), deepcopy(zall);
dr, vmin, vmax, donn, xl, yl, δ²=linesmoothδ², figsize=(20,10), titles, XYprofiles,
preferEright=true, plotbinning=false, fontsize=10, delbin, hspace=0.22, spacefactor=0.1)
savefig("Line_$linewanted.png", dpi=500)
xrd, yrd, axd = transD_GP.plotmanygrids(deepcopy(σ), deepcopy(X), deepcopy(Y), deepcopy(Z), deepcopy(zall);
dr, vmin, vmax, donn, xl, yl, δ²=linesmoothδ², figsize=(20,12), titles,
preferEright=true, plotbinning=false, fontsize=25, delbin, hspace=0.35, spacefactor=0.15)
savefig("Line_$linewanted.png", dpi=500)
32 changes: 0 additions & 32 deletions zz_portalcurtains/readlei.jl

This file was deleted.

0 comments on commit 929d61d

Please sign in to comment.