v1.0.0-rc.81
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include "XrayFluorescenceSpectrum.h"
|
||||
|
||||
#include "JFJochException.h"
|
||||
|
||||
XrayFluorescenceSpectrum::XrayFluorescenceSpectrum(const std::vector<float> &energy_eV, const std::vector<float> &data) {
|
||||
if (energy_eV.size() != data.size()) {
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Mismatch between # of energies and data points for fluorescence spectrum");
|
||||
}
|
||||
this->energy_eV = energy_eV;
|
||||
this->data = data;
|
||||
}
|
||||
|
||||
const std::vector<float> & XrayFluorescenceSpectrum::GetEnergy_eV() const {
|
||||
return energy_eV;
|
||||
}
|
||||
|
||||
const std::vector<float> & XrayFluorescenceSpectrum::GetData() const {
|
||||
return data;
|
||||
}
|
||||
|
||||
bool XrayFluorescenceSpectrum::empty() const {
|
||||
return data.empty();
|
||||
}
|
||||
Reference in New Issue
Block a user