Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lukas Weber
load_leveller
Commits
3d9b4a5a
Commit
3d9b4a5a
authored
Apr 30, 2019
by
Lukas Weber
Browse files
make loadl less picky when it can’t merge an observable
parent
e2f4431b
Changes
2
Hide whitespace changes
Inline
Side-by-side
python/loadleveller/mcextract.py
View file @
3d9b4a5a
...
...
@@ -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
src/evalable.cpp
View file @
3d9b4a5a
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment