Estimate edge position from xanes_data instead of xanes_data_original
This commit is contained in:
parent
f31849b08b
commit
8ca73e4687
1 changed files with 2 additions and 4 deletions
|
|
@ -462,8 +462,6 @@ def smoothing(data: dict, options={}):
|
||||||
# Make plots ...
|
# Make plots ...
|
||||||
if options['save_plots'] or options['show_plots']:
|
if options['save_plots'] or options['show_plots']:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
edge_pos = estimate_edge_position(data=data, options=options)
|
edge_pos = estimate_edge_position(data=data, options=options)
|
||||||
step_length = data['xanes_data']['ZapEnergy'].iloc[1] - data['xanes_data']['ZapEnergy'].iloc[0]
|
step_length = data['xanes_data']['ZapEnergy'].iloc[1] - data['xanes_data']['ZapEnergy'].iloc[0]
|
||||||
|
|
||||||
|
|
@ -563,8 +561,8 @@ def estimate_edge_position(data: dict, options={}, index=0):
|
||||||
options = aux.update_options(options=options, required_options=required_options, default_options=default_options)
|
options = aux.update_options(options=options, required_options=required_options, default_options=default_options)
|
||||||
|
|
||||||
#making new dataframe to keep the differentiated data
|
#making new dataframe to keep the differentiated data
|
||||||
df_diff = pd.DataFrame(data['xanes_data_original']["ZapEnergy"])
|
df_diff = pd.DataFrame(data['xanes_data']["ZapEnergy"])
|
||||||
df_diff[data['path'][index]]=data['xanes_data_original'][data['path'][index]].diff(periods=options['periods'])
|
df_diff[data['path'][index]]=data['xanes_data'][data['path'][index]].diff(periods=options['periods'])
|
||||||
|
|
||||||
#shifting column values up so that average differential fits right between the points used in the calculation
|
#shifting column values up so that average differential fits right between the points used in the calculation
|
||||||
df_diff[data['path'][index]]=df_diff[data['path'][index]].shift(-int(options['periods']/2))
|
df_diff[data['path'][index]]=df_diff[data['path'][index]].shift(-int(options['periods']/2))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue