Commit 3d9b4a5a authored by Lukas Weber's avatar Lukas Weber

make loadl less picky when it can’t merge an observable

parent e2f4431b
......@@ -74,4 +74,9 @@ class MCArchive:
selection.mean = orig.mean[mask,:]
selection.error = orig.error[mask,:]
# if it is not a vector observable we can make it simpler for the user
if selection.mean.shape[-1] == 1:
selection.mean = selection.mean.flatten()
selection.error = selection.error.flatten()
return selection
......@@ -2,6 +2,7 @@
#include "measurements.h"
#include <fmt/format.h>
#include <map>
#include <iostream>
namespace loadl {
......@@ -27,9 +28,8 @@ void evalable::jackknife(const results &res, observable_result &obs_res) const {
size_t bin_count = -1; // maximal value
for(const auto &obs_name : used_observables_) {
if(res.observables.count(obs_name) <= 0) {
throw std::runtime_error(
fmt::format("evalable '{}': used observable '{}' not found in Monte Carlo results.",
name_, obs_name));
std::cerr << fmt::format("Warning: evalable '{}': used observable '{}' not found in Monte Carlo results. Skipping...", name_, obs_name);
return;
}
const auto &obs = res.observables.at(obs_name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment