Skip to content

Commit

Permalink
Dev (#14)
Browse files Browse the repository at this point in the history
* fix partials
  • Loading branch information
PharmCat authored Jul 19, 2023
1 parent e14950c commit 11c136a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name = "MetidaNCA"
uuid = "097c2839-c7bc-4c4b-a5f2-b4167c1b4e7c"
authors = ["PharmCat <[email protected]>"]
version = "0.5.6"
version = "0.5.7"


[deps]

Expand Down
2 changes: 1 addition & 1 deletion src/nca.jl
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ function nca!(data::PKSubject{T, O}; adm = :ev, calcm = :lint, intpm = nothing,
lastpartc = interpolate(time_cp[lastp], time_cp[lastp + 1], etime, obs_cp[lastp], obs_cp[lastp + 1], intpm, time_cp[lastp] > result[:Tmax])
lastpart += aucpart(time_cp[lastp], etime, obs_cp[lastp], lastpartc, calcm, time_cp[lastp] > result[:Tmax])
#println("lastpartc = $lastpartc , lastpart = $lastpart")
elseif etime > time_cp[lastp] && prtext == :last
elseif etime >= time_cp[lastp] && prtext == :last
lastpartc = zero(O)
elseif etime > time_cp[lastp] && prtext == :extr && !isnan(result[:Kel])
lastpartc = exp(result[:LZint] + result[:LZ] * etime)
Expand Down
2 changes: 2 additions & 0 deletions test/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,8 @@ end
dsnca = MetidaNCA.nca!(ds, adm = :ev, calcm = :luld, partials = [(0, 100)], prtext = :extr)
@test dsnca[:, :AUCtau] dsnca[:, :AUC_0_100] atol=1E-6

dsnca = MetidaNCA.nca!(ds, adm = :ev, calcm = :luld, partials = [(0, 72)], prtext = :last)
@test dsnca[:, :AUCall] dsnca[:, :AUC_0_72] atol=1E-6
end

@testset " set-get*! tests " begin
Expand Down

2 comments on commit 11c136a

@PharmCat
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/87844

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.5.7 -m "<description of version>" 11c136ae025973aba606e47156bf799d02d4b31e
git push origin v0.5.7

Please sign in to comment.