Skip to content

Commit f41be03

Browse files
committed
Upgrade to Isoplot v0.4 (replaces val and err)
1 parent 823098e commit f41be03

5 files changed

Lines changed: 16 additions & 17 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Chron"
22
uuid = "68885b1f-77b5-52a7-b2e7-6a8014c56b98"
33
authors = ["C. Brenhin Keller <[email protected]>"]
4-
version = "0.6.4"
4+
version = "0.6.5"
55

66
[deps]
77
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
@@ -20,7 +20,7 @@ StatGeochemBase = "61e559cd-58b4-4257-8528-26bb26ff2b9a"
2020
[compat]
2121
DelimitedFiles = "1"
2222
Distributions = "0.15 - 0.25"
23-
Isoplot = "0.3"
23+
Isoplot = "0.4"
2424
KernelDensity = "0.4 - 0.6"
2525
LsqFit = "0.7 - 0.15"
2626
NaNStatistics = "0.6.40"

src/Chron.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ module Chron
2424
@reexport using NaNStatistics
2525
@reexport using StatGeochemBase
2626
@reexport using Isoplot
27-
using Isoplot: val, err
2827

2928
# Basic statistics and UI resources
3029
using ProgressMeter: @showprogress, Progress, update!

src/DistMetropolis.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
data[:,4]./=smpl.inputSigmaLevel
4242
analyses = UPbAnalysis.(eachcol(data)...,)
4343
uis = upperintercept.(tpbloss, analyses)
44-
μ, σ = val.(uis), err.(uis)
44+
μ, σ = value.(uis), stdev.(uis)
4545
else
4646
@info "Interpreting first two columns of $(Name[i]).csv as \n | Age | Age $σstr |"
4747
data[:,2]./=smpl.inputSigmaLevel

src/Fitplot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
# @info "$i: $(Name[i])\nInterpreting the five columns of $(Name[i]).csv as:\n | ²⁰⁷Pb/²³⁵U | $σstr | ²⁰⁶Pb/²³⁸U | $σstr | correlation coefficient |"
6666
analyses = UPbAnalysis.(eachcol(data)...,)
6767
dates = age68.(analyses)
68-
val.(dates), err.(dates) ./ smpl.inputSigmaLevel
68+
value.(dates), stdev.(dates) ./ smpl.inputSigmaLevel
6969
else
7070
# @info "$i: $(Name[i])\nInterpreting first two columns of $(Name[i]).csv as \n | Age | Age $σstr |"
7171
data[:,1], data[:,2] ./ smpl.inputSigmaLevel

src/Systematic.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
## --- Add systematic uncertainty when given an already-generated age or age-depth distribution
1919

2020
function add_systematic_uncert_UPb(agedistmyr::Vector{<:AbstractFloat})
21-
λ238 = val(λ238U) # Jaffey decay constant, 1/Myr
22-
λ238_ = val(λ238U) .+ err(λ238U).*randn(size(agedistmyr))# Jaffey decay with uncertainty 1/Myr
21+
λ238 = value(λ238U) # Jaffey decay constant, 1/Myr
22+
λ238_ = value(λ238U) .+ stdev(λ238U).*randn(size(agedistmyr))# Jaffey decay with uncertainty 1/Myr
2323
σtracer = 1 .+ (0.03/2/100) .* randn(size(agedistmyr)) # Earthtime tracer uncertainty
2424
r = exp.(agedistmyr .* λ238) .- 1
2525
return log.(r .* σtracer .+ 1) ./ λ238_
2626
end
2727
function add_systematic_uncert_UPb(agedistmyr::Matrix{<:AbstractFloat})
28-
λ238 = val(λ238U) # Jaffey decay constant, 1/Myr
29-
λ238_ = val(λ238U) .+ err(λ238U).*randn(1, size(agedistmyr,2)) # Jaffey decay with uncertainty 1/Myr
28+
λ238 = value(λ238U) # Jaffey decay constant, 1/Myr
29+
λ238_ = value(λ238U) .+ stdev(λ238U).*randn(1, size(agedistmyr,2)) # Jaffey decay with uncertainty 1/Myr
3030
σtracer = 1 .+ (0.03/2/100) .* randn(1, size(agedistmyr,2)) # Earthtime tracer uncertainty
3131
r = exp.(agedistmyr .* λ238) .- 1
3232
return log.(r .* σtracer .+ 1) ./ λ238_
@@ -138,11 +138,11 @@
138138
# Th230ₐ/U238ₐ = 1-exp(-Age*λ230Th)
139139
# Th230/U238 = (1-exp(-Age*λ230Th)) * λ238U/λ230Th
140140

141-
λ238 = val(λ238U)
142-
λ238_ = val(λ238U) .+ err(λ238U).*randn(size(agedistmyr))
141+
λ238 = value(λ238U)
142+
λ238_ = value(λ238U) .+ stdev(λ238U).*randn(size(agedistmyr))
143143

144-
λ230 = val(λ230Th)
145-
λ230_ = val(λ230Th) .+ err(λ230Th).*randn(size(agedistmyr))
144+
λ230 = value(λ230Th)
145+
λ230_ = value(λ230Th) .+ stdev(λ230Th).*randn(size(agedistmyr))
146146

147147
# Convert age distribution to ratio distribution
148148
# (i.e., distribution of slope of two-point isochron)
@@ -157,11 +157,11 @@
157157
# Th230ₐ/U238ₐ = 1-exp(-Age*λ230Th)
158158
# Th230/U238 = (1-exp(-Age*λ230Th)) * λ238U/λ230Th
159159

160-
λ238 = val(λ238U)
161-
λ238_ = val(λ238U) .+ err(λ238U).*randn(1, size(agedistmyr,2))
160+
λ238 = value(λ238U)
161+
λ238_ = value(λ238U) .+ stdev(λ238U).*randn(1, size(agedistmyr,2))
162162

163-
λ230 = val(λ230Th)
164-
λ230_ = val(λ230Th) .+ err(λ230Th).*randn(1, size(agedistmyr,2))
163+
λ230 = value(λ230Th)
164+
λ230_ = value(λ230Th) .+ stdev(λ230Th).*randn(1, size(agedistmyr,2))
165165

166166
# Convert age distribution to ratio distribution
167167
# (i.e., distribution of slope of two-point isochron)

0 commit comments

Comments
 (0)