GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSE / V1-3-4
Constituent: lsew     Tag: mv2304
#include "EDS/ECR_cal.h"
#include "EDS/EDS_endianness.h"
#include "EDS/FFS.h"
Include dependency graph for CDF_cal_prd_model.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _CDF_cal_prd_log_end_bf |
The prediction constants, bit field representation. More... | |
union | _CDF_cal_prd_log_end |
The prediction constants, union of 32-bit representation and the bit field representation. More... | |
Defines | |
#define | CDF_CAL_PRD_ENCODE_TABLE_ENTRY(_range, _base, _target) |
#define | CDF_CAL_PRD_ENCODE_TABLE_RANGE(_rng,_base0, _d0, _target0,_base1, _d1, _target1,_base2, _d2, _target2) |
#define | CDF_CAL_PRD_ENCODE_TABLE |
#define | CDF_CAL_PRD_ENCODE_TABLE_EXTRACT_INDEX(_tbs) ((_tbs >> 0) & 0x7) |
#define | CDF_CAL_PRD_ENCODE_TABLE_EXTRACT_BASE(_tbs) ((_tbs >> 3) & 0x3) |
#define | CDF_CAL_PRD_ENCODE_TABLE_ADVANCE(_tbs) (_tbs >> 5) |
Typedefs | |
typedef _CDF_cal_prd | CDF_cal_prd |
typedef _ECR_cal | ECR_cal |
typedef _CDF_cal_prd_log_end_bf | CDF_cal_prd_log_end_bf |
Typedef for struct _CDF_cal_prd_log_end_bf. | |
typedef _CDF_cal_prd_log_end | CDF_cal_prd_log_end |
Typedef for union _CDF_cal_prd_log_end_range. | |
Enumerations | |
enum | CDF_CAL_PRD_TARGETS { CDF_CAL_PRD_TARGET_01 = 0, CDF_CAL_PRD_TARGET_02 = 1, CDF_CAL_PRD_TARGET_23 = 2, CDF_CAL_PRD_TARGET_12 = 3, CDF_CAL_PRD_TARGET_10 = 4, CDF_CAL_PRD_TARGET_21 = 5, CDF_CAL_PRD_TARGET_32 = 6 } |
enum | CDF_CAL_PRD_RNG { CDF_CAL_PRD_RNG_0 = 0, CDF_CAL_PRD_RNG_1 = 1, CDF_CAL_PRD_RNG_2 = 2, CDF_CAL_PRD_RNG_3 = 3 } |
Functions | |
static void | cdf_cal_prd_report (unsigned int base_pedestal, unsigned int pred_pedestal, int pedestal, unsigned int base_gain, unsigned int pred_gain, unsigned int gain, unsigned int base_shift, unsigned int pred_shift, int shift) |
Debugging function when generating the constants. | |
static __inline int | CDF__cal_prd_predict (unsigned short int base, unsigned char shift, unsigned short int gain, signed short int pedestal) |
Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple. | |
static __inline CDF_cal_prd_log_end | CDF__cal_prd_compose (ECR_calLogEnd pred, ECR_calLogEnd base) |
CVS $Id: CDF_cal_prd_model.h,v 1.3 2007/07/16 22:29:53 russell Exp $
|
Value: CDF_CAL_PRD_ENCODE_TABLE_RANGE (RNG_0, 0, -->, 1, 0, -->, 2, 2, -->, 3), \ CDF_CAL_PRD_ENCODE_TABLE_RANGE (RNG_1, 1, -->, 2, 2, -->, 3, 1, -->, 0), \ CDF_CAL_PRD_ENCODE_TABLE_RANGE (RNG_2, 2, -->, 3, 1, -->, 0, 2, -->, 1), \ CDF_CAL_PRD_ENCODE_TABLE_RANGE (RNG_3, 1, -->, 0, 2, -->, 1, 3, -->, 2) |
|
Value: ( ((((_base) - (CDF_CAL_PRD_ ## _range)) & 0x3) << 3) | \ CDF_CAL_PRD_TARGET_ ## _base ## _target) |
|
Value: ((CDF_CAL_PRD_ENCODE_TABLE_ENTRY(_rng, _base0, _target0)<<0) | \ (CDF_CAL_PRD_ENCODE_TABLE_ENTRY(_rng, _base1, _target1)<<5) | \ (CDF_CAL_PRD_ENCODE_TABLE_ENTRY(_rng, _base2, _target2)<<10)) |
|
Typedef for union _CDF_cal_prd_log_end_range. CDF__cal_prd_compose (ECR_calLogEnd pred, ECR_calLogEnd base)
|
|
Typedef for struct _CDF_cal_prd_log_end_bf. These constants are used when in 4-range readout mode to predict one range from another. The math is
residual = (v - pp) - (vb - pb) * gb / gp = v - [ vb * gb/gp - (pb * gb/gp - pp)] = v - vp where vp = predicted value = vb * g + p and g = gb/gp, the relative gain p = pb * g - pp, the effective pedestal One must be careful with the scaling factors in order not to overflow the arithmetic and the available number of bits used to store the relative gain and effective pedestal. The effective pedestal is the hardest. pb and pp can be up to a 12-bit number. So even if the relative gain is <=1, i.e. gb <= gp, p will can be a 13-bit signed number. If gb > gp, then this result can be larger than 13-bits. In this case one can rewrite the equation vp = (vb - (pb - pp / g)) * g |
|
Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple.
|
|
Debugging function when generating the constants.
|