Files
Jungfraujoch/jungfrau/JFConversionFloatingPoint.h
T

35 lines
1.1 KiB
C++

// Copyright (2019-2023) Paul Scherrer Institute
#ifndef JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H
#define JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H
#include "JFCalibration.h"
class JFConversionFloatingPoint {
std::vector<uint16_t> pedestal_g0;
std::vector<uint16_t> pedestal_g1;
std::vector<uint16_t> pedestal_g2;
std::vector<double> gain_g0;
std::vector<double> gain_g1;
std::vector<double> gain_g2;
double err_pixel = INT16_MIN;
double overload_pixel = INT16_MAX;
int64_t summation = 1;
bool pixel_signed = true;
public:
JFConversionFloatingPoint();
JFConversionFloatingPoint(const DiffractionExperiment& experiment);
void Setup(const JFModuleGainCalibration &gain_calibration,
const JFModulePedestal &pedestal_g0,
const JFModulePedestal &pedestal_g1,
const JFModulePedestal &pedestal_g2,
double energy);
void ConvertModule(int16_t *dest, const uint16_t *source);
void ConvertFP(double *dest, const uint16_t *source);
};
#endif //JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H