-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output metadata #162
Output metadata #162
Changes from 1 commit
1e227c4
7172b48
cf7d4c2
fc43644
960b681
5925d95
c43ff92
99ee17f
a85fd19
230b79d
27d2f05
61c0abe
d6a922b
dcb40cb
9a43a41
76b66c9
d1449e9
fa7eacf
b47561e
050addd
c354d56
d8386b6
b65dc37
fbf9290
f6dbc2f
174b3f7
34ddcde
bfc6c32
f01fc19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,8 @@ def xgrid_reshape( | |
) | ||
target_rot = b.get_interpolation(targetgrid.raw) | ||
eko.rotations._targetgrid = targetgrid | ||
# update metadata | ||
eko.update_metadata({"rotations": {"targetgrid": targetgrid}}) | ||
if inputgrid is not None: | ||
b = interpolation.InterpolatorDispatcher( | ||
inputgrid, | ||
|
@@ -69,6 +71,8 @@ def xgrid_reshape( | |
) | ||
input_rot = b.get_interpolation(eko.rotations.inputgrid.raw) | ||
eko.rotations._inputgrid = inputgrid | ||
# update metadata | ||
eko.update_metadata({"rotations": {"inputgrid": inputgrid}}) | ||
|
||
# build new grid | ||
for q2, elem in eko.items(): | ||
|
@@ -134,12 +138,19 @@ def flavor_reshape( | |
ops = elem.operator | ||
errs = elem.error | ||
if targetpids is not None and inputpids is None: | ||
# update metadata | ||
eko.update_metadata({"rotations": {"targetpids": targetpids}}) | ||
ops = np.einsum("ca,ajbk->cjbk", targetpids, ops) | ||
errs = np.einsum("ca,ajbk->cjbk", targetpids, errs) | ||
elif inputpids is not None and targetpids is None: | ||
# update metadata | ||
eko.update_metadata({"rotations": {"inputpids": inputpids}}) | ||
ops = np.einsum("ajbk,bd->ajdk", ops, inv_inputpids) | ||
errs = np.einsum("ajbk,bd->ajdk", errs, inv_inputpids) | ||
else: | ||
# update metadata | ||
eko.update_metadata({"rotations": {"inputpids": inputpids}}) | ||
eko.update_metadata({"rotations": {"targetpids": targetpids}}) | ||
ops = np.einsum("ca,ajbk,bd->cjdk", targetpids, ops, inv_inputpids) | ||
errs = np.einsum("ca,ajbk,bd->cjdk", targetpids, errs, inv_inputpids) | ||
elem.operator = ops | ||
|
@@ -175,5 +186,9 @@ def to_evol(eko: EKO, source: bool = True, target: bool = False): | |
# assign pids | ||
if source: | ||
eko.rotations._inputpids = br.evol_basis_pids | ||
# update metadata | ||
eko.update_metadata({"rotations": {"inputpids": inputpids}}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is in contradiction with the line above ... actually the problem is more complicated: because for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this point I believe that in any case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we discussed yesterday, we want the matrix: it is uniform, also for non-standard bases, and always reliable. |
||
if target: | ||
eko.rotations._targetpids = br.evol_basis_pids | ||
# update metadata | ||
eko.update_metadata({"rotations": {"targetpids": targetpids}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the call should move down to were the write is happening (else we get out of sync) .. note that we're casting to list (see comment below )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This made sense: we want operations to be as atomic as possible (in the ACID sense)