#include "sif.h"
Go to the source code of this file.
Functions | |
void | sifWeight (SIF *data, double halflife) |
void | sifModerate (SIF *sif, double limit) |
void sifModerate | ( | SIF * | sif, |
double | limit | ||
) |
Moderate the trues in SIF. True values in SIF are used to calculate weight factors for time frames. If trues are very low in certain frames, the weight factors in other frames may become very low. This function finds the maximum trues, and adds max/limit to each trues value, if min trues < max trues / limit. Negative trues are always eliminated.
sif | Pointer to SIF in which the trues are moderated |
limit | Max trues / limit is added to all trues values; 100.0 might be good |
Definition at line 102 of file weight.c.
References SIF::frameNr, and SIF::trues.
void sifWeight | ( | SIF * | data, |
double | halflife | ||
) |
Calculate weights for frames in SIF data, normalized between 0-1. Weights are calculated from formula weight=(frame duration)^2 / (trues in a frame). Before calling this routine, trues must be calculated as total counts - randoms. Counts in SIF are not corrected for physical decay. Therefore, isotope halflife must be known, if weights are to be calculated for decay corrected TACs. Isotope halflife must be set to 0, if weights are used for TACs that are not corrected for decay.
data | sif data |
halflife | halflife (sec) of isotope label; If halflife is 0, the weights are calculated for non-decay corrected data. If halflife (sec) is >0, the weights are calculated using decay corrected trues, but trues data is not changed. |
Definition at line 61 of file weight.c.
References SIF::frameNr, SIF_TEST, SIF::trues, SIF::weights, SIF::x1, and SIF::x2.