kinfitr v0.7.0
I thought we needed a new release to take account of all the gradual improvements made over the last 18 months.
Firstly, thank you so much to everyone using the package! It always makes my day to hear that it's being used. I really appreciate your leaving a star on the repo, because it shows me who's actually using the package, because I can't see that otherwise. And please feel free to leave comments and suggestions in the issues: they're really helpful for fixing things, or for identifying new bugs.
BIDS Support
The PET BIDS standard is now incorporated into BIDS, and the paper is published! There were a few changes to the specification, and I've incorporated these into kinfitr. It should now be possible to import blood data automatically, with some heuristics for when things are missing. Please let me know if there are any other issues that you might come across based on any other changes which might have escaped my notice.
Pharmacokinetic models
Models
-
I have added the full reference tissue model (FRTM) as we were attempting to use it in another project. I would, however, advise caution with actually applying it, because our experience was that it was highly unstable even when its looser assumptions should have made it more stable. In fact, if you find applications where it works well and/or works better than other models, please get in touch.
-
Thanks to the contribution of @nakulrrraval , MRTM1 and MRTM2 now also provide additional output parameters when the relevant assumptions are met.
Weights
- I have added two more weighting functions, taking the number of different weighting functions to 9.
- I have also modified the default minimum weight for the weighting to 0.5 instead of 0.7. The latter just seems too high, and using 0 with almost all of the methods results in several TAC points being effectively ignored.
- I have also added the possibility of having a minimum weight which rises to the peak weight. This allows for very low weights in the very first few frames when they are very short, and then having a higher minimum weight value for the remainder of the PET measurement.
Blood modelling
Parent Fraction
-
I have corrected the integrated inverse gamma function. I had implemented a 2-parameter version of this model, which almost never produced optimal fits. From reading a little bit further, I see that the version of this model which is actually in use is a 3- or 4-parameter model, and this model performs substantially better.
-
I have added an integrated gamma function too. This is very similar to the previous model, except that it is based on the gamma, and not the inverse gamma, distribution.
-
I have also renamed the
hill_guomodmodel to thesigmoidmodel, as it is more frequently referred to in this manner.
AIF
- Thanks to @pontusps for spotting this, but there was previously a bug that if whole blood and raw plasma measurements were found, and there was a model fit to the blood-to-plasma ratio, then when fitting the AIF, the raw AIF values provided would be derived from the whole blood and the BPR model, rather than from the plasma values directly when available. This has now been fixed.
Tri-exponential model
-
I have improved the stability of the tri-exponential model. This model could easily fail in the absence of continuous autosampler data at the start. It should now fail less often.
-
I have also added the fact that this model is fitted both using multiple starting points, as well as our guessed starting points from our starting point estimation, since the latter could sometimes outperform the multiple starting points when there were not enough iterations. This selects whichever fit is best of the multstarts and the conventional fit.