Skip to content

Commit

Permalink
Switch from VectorizedStatistics to NaNStatistics
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller committed Nov 8, 2024
1 parent f2a3294 commit a60f6d8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name = "Thermochron"
uuid = "b9a8379e-ee1a-4388-b7ca-7852af1cef08"
authors = ["C. Brenhin Keller and collaborators"]
version = "0.10.2"
version = "0.10.3"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
NaNStatistics = "b946abbf-3ea7-4610-9019-9858bfdeaf2d"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StatGeochemBase = "61e559cd-58b4-4257-8528-26bb26ff2b9a"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
VectorizedStatistics = "3b853605-1c98-4422-8364-4bd93ee0529e"

[compat]
LinearAlgebra = "1.11"
LoopVectorization = "0.12"
NaNStatistics = "0.6"
ProgressMeter = "1"
Reexport = "1"
StatGeochemBase = "0.4.3, 0.5, 0.6"
VectorizedStatistics = "0.4.6, 0.5"
julia = "1.11"
2 changes: 1 addition & 1 deletion src/Thermochron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module Thermochron

using Reexport
@reexport using StatGeochemBase
@reexport using NaNStatistics

using LinearAlgebra
using VectorizedStatistics
using LoopVectorization
using ProgressMeter: Progress, update!

Expand Down
16 changes: 8 additions & 8 deletions src/helium.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ function HeAgeSpherical(zircon::Zircon{T}, Tsteps::StridedVector{T}, ρᵣ::Stri
# Convert from u (coordinate-transform'd conc.) to v (real He conc.)
vFinal = @views u[2:end-1,end]
vFinal ./= rsteps
μHe = vmean(vFinal) # Atoms/gram
μHe = nanmean(vFinal) # Atoms/gram

# Raw Age (i.e., as measured)
μ238U = vmean(zircon.r238U::DenseVector{T}) # Atoms/gram
μ235U = vmean(zircon.r235U::DenseVector{T})
μ232Th = vmean(zircon.r232Th::DenseVector{T})
μ238U = nanmean(zircon.r238U::DenseVector{T}) # Atoms/gram
μ235U = nanmean(zircon.r235U::DenseVector{T})
μ232Th = nanmean(zircon.r232Th::DenseVector{T})

# Numerically solve for helium age of the grain
HeAge = one(T)
Expand Down Expand Up @@ -426,12 +426,12 @@ function HeAgeSpherical(apatite::Apatite{T}, Tsteps::StridedVector{T}, ρᵣ::Ab
# Convert from u (coordinate-transform'd conc.) to v (real He conc.)
vFinal = @views u[2:end-1,end]
vFinal ./= rsteps
μHe = vmean(vFinal) # Atoms/gram
μHe = nanmean(vFinal) # Atoms/gram

# Raw Age (i.e., as measured)
μ238U = vmean(apatite.r238U::DenseVector{T}) # Atoms/gram
μ235U = vmean(apatite.r235U::DenseVector{T})
μ232Th = vmean(apatite.r232Th::DenseVector{T})
μ238U = nanmean(apatite.r238U::DenseVector{T}) # Atoms/gram
μ235U = nanmean(apatite.r235U::DenseVector{T})
μ232Th = nanmean(apatite.r232Th::DenseVector{T})

# Numerically solve for helium age of the grain
HeAge = one(T)
Expand Down
3 changes: 0 additions & 3 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
StatGeochem = "df4de05a-b714-11e8-3c2a-c30fb13e804c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Thermochron
using LinearAlgebra, Statistics
using StatGeochem
using Test

@testset "Apatite helium" begin include("testapatitehelium.jl") end
Expand Down

4 comments on commit a60f6d8

@brenhinkeller
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register
Release notes:

  • Allow separate boundary types for temperature and time
  • Move boundary types inside Boundary struct
  • Switch from VectorizedStatistics to NaNStatistics

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/119002

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.3 -m "<description of version>" a60f6d81ec46e7816fb4012c70fee9ce4c6b269e
git push origin v0.10.3

Also, note the warning: Version 0.10.3 skips over 0.10.2
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

@brenhinkeller
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register
Release notes:

  • Switch from VectorizedStatistics to NaNStatistics

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/119002

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.3 -m "<description of version>" a60f6d81ec46e7816fb4012c70fee9ce4c6b269e
git push origin v0.10.3

Please sign in to comment.