NCA error in report

Hello,

When I generate the report for NCA, the NCA calculations are shifted (red line to calculate kel) and is not on the observed points (black dots). How do I fix this?

Adding pictures below for reference.

Thank you in advance!

old version of pumas:

{1A29664A-DEEC-4380-AFA0-27948F00DD86}

{1A29664A-DEEC-4380-AFA0-27948F00DD86}1071×584 64.2 KB

new version of pumas:

{B3B9A402-BC52-4FEE-9553-98ECCD6FEC36}

{B3B9A402-BC52-4FEE-9553-98ECCD6FEC36}1107×683 49.8 KB

Hello Namrata,

thank you for your bug report, this is indeed a regression that was introduced in a refactor of the backend, the reason is inconsistent handling of time. One trace uses time-after-dose and the other absolute time.

In an ongoing rework of the NCA.jl package, we are shifting to using time-after-dose everywhere which removes this whole class of time-based bugs. Until then, you can do the transformation to time-after-dose manually by subtracting the dose time from each profile’s time vector. This should get rid of the undesired offset in the plots.

Best,

Julius