Skip to content

Commit

Permalink
undo 50a9a7d, fix copying of Norm params (GH484)
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Dec 15, 2023
1 parent 44fa710 commit ba14ac3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions larch/wxxas/xasnorm_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import numpy as np

from functools import partial

from xraydb import guess_edge, atomic_number

from larch.utils import gformat
Expand Down Expand Up @@ -300,21 +299,23 @@ def get_config(self, dgroup=None):
return self.get_defaultconfig()
self.read_form()


defconf = self.get_defaultconfig()
conf = getattr(dgroup.config, self.configname, defconf)

for k, v in defconf.items():
if k not in conf:
conf[k] = v
if conf.get('edge_step', None) is None:
conf['edge_step'] = getattr(dgroup, 'edge_step', 1)

# update config from callargs - last call arguments
callargs = getattr(dgroup, 'callargs', None)
if callargs is not None:
pre_callargs = getattr(callargs, 'pre_edge', None)
if pre_callargs is not None:
for attr in ('e0', 'norm', 'nvict', 'pre1', 'pre2', 'norm1', 'norm2'):
update_confval(conf, pre_callargs, attr)
# callargs = getattr(dgroup, 'callargs', None)
# if callargs is not None:
# pre_callargs = getattr(callargs, 'pre_edge', None)
# if pre_callargs is not None:
# for attr in ('e0', 'nnorm', 'nvict', 'pre1', 'pre2', 'norm1', 'norm2'):
# update_confval(conf, pre_callargs, attr)

atsym = '?'
if hasattr(dgroup, 'element'):
Expand Down Expand Up @@ -809,7 +810,6 @@ def process(self, dgroup=None, force_mback=False, force=False, use_form=True, **
return

self.skip_process = True

conf = self.get_config(dgroup)
form = self.read_form()
if not use_form:
Expand Down

0 comments on commit ba14ac3

Please sign in to comment.