View source: R/kinfitr_weights.R
weights_create_bids | R Documentation |
This uses the BIDS PET JSON sidecar information and a TAC to create a weights vector.
weights_create_bids(
petinfo,
tac,
method = 2,
minweight = 0.7,
minweight_risetopeak = FALSE,
weight_checkn = 5
)
petinfo |
The parsed information from the PET JSON sidecar. This can be extracted simply using jsonlite::fromJSON() on the JSON file, or else at a study level using bids_parse_study() |
tac |
The time activity curve: preferably for a region with high signal-to-noise ratio. |
method |
Which method should be used? 1 represents duration^2 / (tac_uncorrected). 2 represents sqrt(durations*tac_uncorrected). 3 represents duration / tac. 4 represents sqrt(durations). 5 represents durations * exp((-ln(2)) / halflife ). 6 represents durations / tac. 7 represents durations. |
minweight |
The minimum weight. Weights will be calculated as a fraction between this value and 1. A zero frame with duration=0 will be set to 0 though. |
minweight_risetopeak |
Should there be a linear rise of the minimum weight to the peak weight value? This means that values before the maximum weight can be below the minweight specified. This is helpful for downweighting noisy values towards the start of the TAC. Defaults to FALSE. |
weight_checkn |
The number of values of the weights to check to make sure that things haven't gone terribly wrong. It will check that this number of weights are all above half of the maximum weight. |
A vector of weights.
Granville J Matheson, mathesong@gmail.com
## Not run:
bids_weights_create(studydata$petinfo[[1]],tacdata$Neo.cx)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.