diff --git a/Project.toml b/Project.toml index 5d23183..b612bf0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "Curvefit" +name = "VegCurveFit" uuid = "dec11fe7-d51b-4c55-8237-c7557eff4313" authors = ["Dongdong Kong"] version = "0.1.0" diff --git a/src/CurveFit/CurveFit.jl b/src/CurveFit/CurveFit.jl index a83fe8a..e1e85f7 100644 --- a/src/CurveFit/CurveFit.jl +++ b/src/CurveFit/CurveFit.jl @@ -28,7 +28,7 @@ FUNCS_doubleLog = Dict( ) -function curvefits(y::AbstractArray{T,1}, t, w::::AbstractArray{T,1}, +function curvefits(y::AbstractArray{T,1}, t, w::AbstractArray{T,1}, ylu::Vector{Float64}, nptperyear::Integer, dt; methods=["AG", "Zhang", "Beck", "Elmore"]) where {T<:Real} diff --git a/test/runtests.jl b/test/runtests.jl index 58c2b8c..ada4b1d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,7 @@ -using nlminb using Test +using VegCurveFit -@testset "nlminb.jl" begin +@testset "nlminb" begin # Write your own tests here. start = [0.0] # [1, 2, 3, 4] lower = [-4.0] @@ -12,5 +12,6 @@ using Test end f(x) = x[1] - cos(x[1]) - r = optim_nlminb(start, f, verbose=false) + r = nlminb(start, f, verbose=false) + @test r["par"][1] == -1.5701006351106073 end