Difference between revisions of "Trigger Rate In Housekeeping Packets"
(Created page with "* Trigger rate in Housekeeping packets In ASW, trigger rate is calculated in the function below: <pre> sid2->avgTrigAcc = 0; sid2->maxTrigAcc = 0; QLAccuDblBuffs_get...") |
|||
| Line 1: | Line 1: | ||
| + | [[Category:ASW]] | ||
| + | |||
* Trigger rate in Housekeeping packets | * Trigger rate in Housekeeping packets | ||
In ASW, trigger rate is calculated in the function below: | In ASW, trigger rate is calculated in the function below: | ||
Latest revision as of 10:43, 25 June 2021
- Trigger rate in Housekeeping packets
In ASW, trigger rate is calculated in the function below:
sid2->avgTrigAcc = 0;
sid2->maxTrigAcc = 0;
QLAccuDblBuffs_getAndResetTrigHK(&(sid2->avgTrigAcc), &(sid2->maxTrigAcc));
void QLAccuDblBuffs_getAndResetTrigHK(uint32_t* medTrig, uint32_t* maxTrig)
{
ASSERT(medTrig);
ASSERT(maxTrig);
*medTrig = 0;
*maxTrig = 0;
if (QLAccuDblBuffs_co.hk.trigCounter != 0)
{
*medTrig = utils_median(NUMBER_OF_GROUPS, NUMBER_OF_GROUPS, (uint32_t*)QLAccuDblBuffs_co.hk.trigSum) / QLAccuDblBuffs_co.hk.trigCounter;
//find maximum
for (uint32_t i = 0; i < NUMBER_OF_GROUPS; i++)
if (QLAccuDblBuffs_co.hk.trigSum[i] > * maxTrig)
*maxTrig = QLAccuDblBuffs_co.hk.trigSum[i];
*maxTrig /= QLAccuDblBuffs_co.hk.trigCounter;
}
//reset
Volatile_memset(QLAccuDblBuffs_co.hk.trigSum, 0, sizeof(QLAccuDblBuffs_co.hk.trigSum));
QLAccuDblBuffs_co.hk.trigCounter = 0;
}
MAX trigger rate of 16 detector pairs of the QL trigger accumulator ( 2 detector per group)
QL integration time = 4 s
Hence
trigger rate of each detector = HK2 max trigger rate / (4 * 2) = 350 /8=35
- Trigger rate in LC
4500 / (4 s *32) = 32 counts / detector