38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
// Copyright (2019-2024) Paul Scherrer Institute
|
|
|
|
#ifndef JUNGFRAUJOCH_MXANALYZER_H
|
|
#define JUNGFRAUJOCH_MXANALYZER_H
|
|
|
|
#include "../common/DiffractionExperiment.h"
|
|
#include "IndexerWrapper.h"
|
|
#include "StrongPixelSet.h"
|
|
|
|
class MXAnalyzer {
|
|
const DiffractionExperiment &experiment;
|
|
IndexerWrapper indexer;
|
|
bool do_indexing = false;
|
|
bool find_spots = false;
|
|
std::vector<DiffractionSpot> spots;
|
|
constexpr static const float spot_distance_threshold = 2.0f * 2.0f;
|
|
public:
|
|
explicit MXAnalyzer(const DiffractionExperiment& experiment);
|
|
|
|
void ReadFromFPGA(const DeviceOutput* output,
|
|
const SpotFindingSettings& settings,
|
|
size_t module_number);
|
|
|
|
void ReadFromCPU(const int16_t *image,
|
|
const SpotFindingSettings& settings,
|
|
size_t module_number);
|
|
|
|
bool Process(DataMessage &message,
|
|
const SpotFindingSettings& settings);
|
|
|
|
void CalculateBeamCenterAndDistance(const std::vector<DiffractionSpot> &spots,
|
|
const IndexingResult& result,
|
|
DataMessage &message);
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_MXANALYZER_H
|