Dear Larch developers (Matt),

I believe I found an error in the mback function where I get a NameError saying the name ‘f1_chantler’ is not defined. I found that simply adding f1_chantler to the larch_plugins.xray import section in mback.py fixes the problem. I have included the modified mback.py code, my input data (SigScan226827.txt), project code (mback_test.py), and the error I received (mback_error.txt).

I am running python 2.7 with anaconda as my manager, macOS Sierra v10.12, on a mid-2015 15” MacBook pro. I hope this report is correct and helpful.

Regards,

Sean

Sean Fackler, PhD
Joint Center for Artificial Photosynthesis
Lawrence Berkeley National Lab
1 Cyclotron Rd Mail Stop 30R0205
Berkeley CA, 94720
Mobile: 609-613-8734

import pandas as pd
import matplotlib.pylab as plt
from larch import *
from larch_plugins.xafs import pre_edge
from larch_plugins.xafs import mback

scandata_f = []

#Working for SigScans

def rdin(filename):
    scandata_f = pd.read_csv(filename, sep='\t', skiprows=15)
    if not ("Counter 0" in scandata_f.columns):
        scandata_f = pd.read_csv(filename, sep='\t', skiprows=14)
    print scandata_f.columns

    if not ("Counter 0" in scandata_f.columns):
        print ("Problem with header. skipping 12 or 10 lines did not make it. Check input file.")
        return None
    return scandata_f


scandata_f = rdin("/Users/SeanFackler/data/ALS092016/160923/SigScan26827.txt")
# print scandata_f.Energy


def prepare_scan(scandata_f, datacounter="TEY_up", reference_counter='Izero'):
    # Preparing Scan (normalization)
    if 'Counter 4' in scandata_f.columns:
        clockname = 'Counter 4'
    elif 'Counter 6' in scandata_f.columns:
        clockname = 'Counter 6'
    else:
        print("No counter for clock found (looked for 'Counter 4' and 'Counter 6'). Defaulting to 'Counter 0'.")
        clockname = 'Counter 0'

    scandata_f["I_Norm0"] = scandata_f[datacounter].astype(float) / scandata_f[reference_counter].astype(float)
    scandata_f["I_Normt"] = scandata_f[datacounter].astype(float) / scandata_f[clockname].astype(float)
    scandata_f["Energy"] = scandata_f["Energy"].round(1)
    # scandata_f["Z"] = scandata_f["Z"].round(2)
    return (scandata_f)


prepare_scan(scandata_f)

mylarch = Interpreter()

scandata_f.e = scandata_f.Energy#
scandata_f.mu = scandata_f.I_Norm0#


mback(scandata_f.e, scandata_f.mu, group=scandata_f, z=8, edge='K', order=1, whiteline=6, fit_erfc=True,
      _larch=mylarch)
print scandata_f.mback_params.e0

plt.plot(scandata_f.e, scandata_f.f2)
plt.plot(scandata_f.e, scandata_f.fpp)
plt.plot(scandata_f.e, 5*scandata_f.mu)
plt.show()
from larch import Group, Parameter, isgroup, Minimizer, parse_group_args

from larch_plugins.math import index_of
from larch_plugins.xray import xray_edge, xray_line, f1_chantler, f2_chantler, f1f2
from larch_plugins.xafs import set_xafsGroup, find_e0

import numpy as np
from scipy.special import erfc

MAXORDER = 6

def match_f2(p):
    """
    Objective function for matching mu(E) data to tabulated f''(E) using the MBACK
    algorithm and, optionally, the Lee & Xiang extension.
    """
    s      = p.s.value
    a      = p.a.value
    em     = p.em.value
    xi     = p.xi.value
    c0     = p.c0.value
    eoff   = p.en - p.e0.value

    norm = a*erfc((p.en-em)/xi) + c0 # erfc function + constant term of polynomial
    for i in range(MAXORDER):        # successive orders of polynomial
        j = i+1
        attr = 'c%d' % j
        if hasattr(p, attr):
            norm = norm + getattr(getattr(p, attr), 'value') * eoff**j
    func = (p.f2 + norm - s*p.mu) * p.theta / p.weight
    if p.leexiang:
        func = func / s*p.mu
    return func


def mback(energy, mu, group=None, order=3, z=None, edge='K', e0=None, emin=None, emax=None,
          whiteline=None, leexiang=False, tables='chantler', fit_erfc=False, return_f1=False,
          _larch=None):
    """
    Match mu(E) data for tabulated f''(E) using the MBACK algorithm and,
    optionally, the Lee & Xiang extension

    Arguments:
      energy, mu:    arrays of energy and mu(E)
      order:         order of polynomial [3]
      group:         output group (and input group for e0)
      z:             Z number of absorber
      edge:          absorption edge (K, L3)
      e0:            edge energy
      emin:          beginning energy for fit
      emax:          ending energy for fit
      whiteline:     exclusion zone around white lines
      leexiang:      flag to use the Lee & Xiang extension
      tables:        'chantler' (default) or 'cl'
      fit_erfc:      True to float parameters of error function
      return_f1:     True to put the f1 array in the group

    Returns:
      group.f2:      tabulated f2(E)
      group.f1:      tabulated f1(E) (if return_f1 is True)
      group.fpp:     matched data
      group.mback_params:  Group of parameters for the minimization

    References:
      * MBACK (Weng, Waldo, Penner-Hahn): http://dx.doi.org/10.1086/303711
      * Lee and Xiang: http://dx.doi.org/10.1088/0004-637X/702/2/970
      * Cromer-Liberman: http://dx.doi.org/10.1063/1.1674266
      * Chantler: http://dx.doi.org/10.1063/1.555974
    """
    order=int(order)
    if order < 1: order = 1 # set order of polynomial
    if order > MAXORDER: order = MAXORDER

    ### implement the First Argument Group convention
    energy, mu, group = parse_group_args(energy, members=('energy', 'mu'),
                                         defaults=(mu,), group=group,
                                         fcn_name='mback')
    if len(energy.shape) > 1:
        energy = energy.squeeze()
    if len(mu.shape) > 1:
        mu = mu.squeeze()

    group = set_xafsGroup(group, _larch=_larch)

    if e0 is None:              # need to run find_e0:
        e0 = xray_edge(z, edge, _larch=_larch)[0]
    if e0 is None:
        e0 = group.e0
    if e0 is None:
        find_e0(energy, mu, group=group)


    ### theta is an array used to exclude the regions <emin, >emax, and
    ### around white lines, theta=0.0 in excluded regions, theta=1.0 elsewhere
    (i1, i2) = (0, len(energy)-1)
    if emin is not None: i1 = index_of(energy, emin)
    if emax is not None: i2 = index_of(energy, emax)
    theta = np.ones(len(energy)) # default: 1 throughout
    theta[0:i1]  = 0
    theta[i2:-1] = 0
    if whiteline:
        pre     = 1.0*(energy<e0)
        post    = 1.0*(energy>e0+float(whiteline))
        theta   = theta * (pre + post)
    if edge.lower().startswith('l'):
        l2      = xray_edge(z, 'L2', _larch=_larch)[0]
        l2_pre  = 1.0*(energy<l2)
        l2_post = 1.0*(energy>l2+float(whiteline))
        theta   = theta * (l2_pre + l2_post)


    ## this is used to weight the pre- and post-edge differently as
    ## defined in the MBACK paper
    weight1 = 1*(energy<e0)
    weight2 = 1*(energy>e0)
    weight  = np.sqrt(sum(weight1))*weight1 + np.sqrt(sum(weight2))*weight2


    ## get the f'' function from CL or Chantler
    if tables.lower() == 'chantler':
        f1 = f1_chantler(z, energy, _larch=_larch)
        f2 = f2_chantler(z, energy, _larch=_larch)
    else:
        (f1, f2) = f1f2(z, energy, edge=edge, _larch=_larch)
    group.f2=f2
    if return_f1: group.f1=f1

    n = edge
    if edge.lower().startswith('l'): n = 'L'
    params = Group(s      = Parameter(1, vary=True, _larch=_larch),     # scale of data
                   xi     = Parameter(50, vary=fit_erfc, min=0, _larch=_larch), # width of erfc
                   em     = Parameter(xray_line(z, n, _larch=_larch)[0], vary=False, _larch=_larch), # erfc centroid
                   e0     = Parameter(e0, vary=False, _larch=_larch),   # abs. edge energy
                   ## various arrays need by the objective function
                   en     = energy,
                   mu     = mu,
                   f2     = group.f2,
                   weight = weight,
                   theta  = theta,
                   leexiang = leexiang,
                   _larch = _larch)
    if fit_erfc:
        params.a = Parameter(1, vary=True,  _larch=_larch) # amplitude of erfc
    else:
        params.a = Parameter(0, vary=False, _larch=_larch) # amplitude of erfc

    for i in range(order): # polynomial coefficients
        setattr(params, 'c%d' % i, Parameter(0, vary=True, _larch=_larch))

    fit = Minimizer(match_f2, params, _larch=_larch, toler=1.e-5)
    fit.leastsq()

    eoff = energy - params.e0.value
    normalization_function = params.a.value*erfc((energy-params.em.value)/params.xi.value) + params.c0.value
    for i in range(MAXORDER):
        j = i+1
        attr = 'c%d' % j
        if hasattr(params, attr):
            normalization_function  = normalization_function + getattr(getattr(params, attr), 'value') * eoff**j

    group.fpp = params.s*mu - normalization_function
    group.mback_params = params


def registerLarchPlugin(): # must have a function with this name!
    return ('_xafs', { 'mback': mback })
Date: 9/23/2016

Start, Stop, Increment
Energy
Start: 510.00000000
Stop: 600.00000000
Increment: 1.00000000
Delay After Move (s): 0.00000000
Count Time (s): 0.50000000
Scan Number: 1
Bi-directional: No
Stay at End: 1
Description Length: 0

Time of Day     Time (s)        Energy  Channeltron     Counter 0       Counter 
2       Counter 3       Counter 4       Counter 5       Counter 6       Izero   
TEY_up  TEY_dn  Analog 2        Analog 3        Energy  Beam Current    Main 
Chamber Pressure   Flow Cell Pressure      Temp A  Temp B  Temp C  Temp D  Gate
15:12:23        1352.71500000   509.99969665    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
12982.00000000  37195.21092979  -1368.93399063  -0.01070992     0.01628112      
509.99969435    500.10353699    0.00000000      0.00000364      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:27        4.51600000      511.00063267    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13061.00000000  37358.78805411  -1296.60815766  -0.01134910     0.01569551      
511.00061182    500.01541748    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:31        8.58800000      511.99987508    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13141.00000000  37629.52296506  -1352.63795483  -0.01083457     0.01611979      
511.99985803    500.73486938    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:36        12.82100000     513.00020697    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13208.00000000  37803.06599063  -1321.99361600  -0.01100467     0.01606590      
513.00021156    500.66525116    0.00000000      0.00000364      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:40        17.03000000     513.99902776    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13297.00000000  37975.27806513  -1294.04364201  -0.01140039     0.01564162      
513.99902240    500.59219971    0.00000000      0.00000364      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:44        21.58500000     514.99988807    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13323.00000000  38189.00931830  -1376.14060440  -0.01054144     0.01645967      
514.99990176    500.50522461    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:49        25.83500000     516.00179443    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13402.00000000  38354.85879764  -1243.20780062  -0.01196945     0.01512320      
516.00179977    500.42740479    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:53        29.91900000     517.00049312    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13447.00000000  38531.87528043  -1308.81395361  -0.01130268     0.01563058      
517.00050714    500.36198273    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:12:57        33.97400000     517.99868033    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13516.00000000  38661.95139381  -1351.30700374  -0.01090112     0.01605227      
517.99872949    500.28092041    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:01        38.53900000     518.99959756    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13580.00000000  38811.05036776  -1266.61306355  -0.01157017     0.01547963      
518.99900518    500.19776001    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:06        42.98500000     520.00022408    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13627.00000000  38985.24263728  -1363.54526196  -0.01072712     0.01625515      
520.00021541    500.12222900    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:10        47.05100000     521.00015389    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13638.00000000  39122.13581661  -1292.64776730  -0.01140850     0.01560688      
521.00014407    500.05680695    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:15        51.98900000     522.00050165    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13721.00000000  39348.59225928  -1365.20083596  -0.01076900     0.01612044      
522.00193922    500.67383423    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:19        56.21000000     523.00035602    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13785.00000000  39496.68490421  -1351.43685264  -0.01082938     0.01613537      
523.00033367    500.60803070    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:24        60.83100000     524.00404804    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13814.00000000  39641.49886493  -1338.38703939  -0.01095371     0.01603896      
524.00404328    500.50408020    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:28        65.07800000     524.99705764    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13864.00000000  39760.60274787  -1332.47891457  -0.01093488     0.01610226      
524.99703188    500.42683258    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:32        68.91100000     526.00029693    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13847.00000000  39858.21664155  -1422.46419697  -0.01013728     0.01681837      
526.00068708    500.36484375    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:36        73.12300000     526.99933804    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13799.00000000  39911.94161462  -1248.07713432  -0.01175910     0.01531148      
527.00023264    500.29904022    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:41        77.81000000     528.00231153    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13802.00000000  40002.28397113  -1268.43094809  -0.01156789     0.01544327      
528.00346480    500.20081177    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:45        82.31700000     529.00061701    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13740.00000000  40090.54874558  -1376.17306683  -0.01061707     0.01638630      
529.00074767    500.12261047    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:49        86.25400000     530.00021276    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13629.00000000  41385.46667421  -1358.54608006  -0.01072225     0.01626879      
530.00041799    500.05871429    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:53        90.14900000     530.99806408    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13847.00000000  51245.99553730  -1541.27593353  -0.00906830     0.01787047      
530.99810737    499.99386444    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:13:57        94.14100000     531.99941557    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14064.00000000  55704.32417516  -1569.19344532  -0.00870862     0.01827041      
531.99995733    500.70625916    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:01        98.27600000     532.99990838    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14053.00000000  58705.39134204  -1635.51376724  -0.00802432     0.01893231      
532.99989473    500.62615051    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:05        102.26400000    533.99977773    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14081.00000000  58653.97118819  -1612.01111760  -0.00823565     0.01878169      
533.99975787    500.55367126    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:10        106.59200000    535.00073270    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14277.00000000  61344.40737694  -1656.61421257  -0.00802497     0.01886966      
535.00071345    500.48500671    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:13        110.27200000    536.00061812    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14785.00000000  62200.76069319  -1698.26324477  -0.00737312     0.01957864      
536.00007881    500.42206421    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:17        114.46200000    536.99940091    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15053.00000000  59769.50285828  -1638.11074520  -0.00787856     0.01915241      
536.99967776    500.34100189    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:21        117.91100000    538.00029120    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15157.00000000  56271.47159386  -1556.66302721  -0.00885243     0.01816945      
538.00039060    500.28378143    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:25        122.28000000    538.99895107    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15108.00000000  54621.51441494  -1700.89268537  -0.00759549     0.01938841      
538.99893773    500.19127502    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:30        126.67200000    539.99941926    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15055.00000000  54369.60759914  -1635.80592754  -0.00799348     0.01901185      
539.99943074    500.11974945    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:33        130.39700000    541.00005540    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15014.00000000  54138.89861196  -1609.54398883  -0.00826616     0.01871352      
541.00007396    500.05871429    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:38        134.67500000    542.00029204    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15104.00000000  54003.30392507  -1615.67934883  -0.00836257     0.01855543      
542.00028874    499.98489990    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:41        138.38800000    543.00079246    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14986.00000000  54258.94389614  -1556.43579165  -0.00896637     0.01798052      
543.00007973    500.54337158    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:45        142.21800000    544.00057184    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14916.00000000  54386.45549056  -1686.28468442  -0.00747408     0.01959000      
544.00041864    500.46211853    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:50        146.85300000    545.00043388    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14899.00000000  54405.54327506  -1575.78327652  -0.00853689     0.01847167      
545.00041404    500.37476196    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:54        150.62700000    545.99882804    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14936.00000000  54144.80673574  -1572.37474393  -0.00873524     0.01821912      
546.00092712    500.30380859    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:14:58        154.65700000    547.00074715    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14958.00000000  53860.04815458  -1517.35127499  -0.00939130     0.01758448      
547.00061496    500.23800507    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:01        158.32300000    548.00018067    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14954.00000000  53860.47016342  -1505.82718587  -0.00935494     0.01765200      
548.00155684    500.17506256    0.00000000      0.00000365      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:05        162.28000000    549.00045853    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14958.00000000  54083.35575602  -1635.93577630  -0.00800906     0.01899529      
549.00016896    500.10449066    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:09        166.24600000    550.00044002    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15009.00000000  54313.48042329  -1638.88983883  -0.00800549     0.01900860      
550.00046964    500.03449097    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:13        170.36500000    550.99811740    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15061.00000000  54527.69860340  -1592.85840607  -0.00857001     0.01836325      
550.99719781    500.11154785    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:18        174.39100000    551.99785592    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15149.00000000  54890.30158427  -1590.26142813  -0.00839666     0.01862912      
551.99793588    500.67536011    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:21        178.33700000    552.99908716    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15194.00000000  55233.00522500  -1577.37392580  -0.00873232     0.01818860      
552.99840485    500.60822144    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:25        181.67700000    554.00051791    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15250.00000000  55626.34992639  -1548.02807612  -0.00899981     0.01795553      
554.00050184    500.54699554    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:29        185.89900000    555.00098002    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15283.00000000  56026.51169342  -1649.18036364  -0.00768638     0.01938029      
555.00094281    500.47470703    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:33        189.88700000    556.00087631    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15330.00000000  56384.53750069  -1586.17118819  -0.00860604     0.01840318      
556.00087087    500.39250031    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:37        194.07900000    557.00351280    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15363.00000000  56694.45430007  -1555.62423611  -0.00899396     0.01793962      
557.00345575    500.31372681    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:41        198.30300000    558.00090379    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15366.00000000  56913.15226557  -1573.60830775  -0.00860442     0.01838727      
558.00085921    500.24201050    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:45        202.11400000    558.99851745    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15407.00000000  57088.35085833  -1669.76141277  -0.00769612     0.01933355      
558.99833329    500.17696991    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:50        206.52100000    559.99941180    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15388.00000000  57276.72911173  -1664.82715504  -0.00766236     0.01933777      
559.99943134    500.09705200    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:54        210.54000000    561.00154568    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15403.00000000  57441.83195449  -1610.61524199  -0.00839244     0.01854926      
561.00068030    500.02075806    0.00000000      0.00000366      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:15:58        214.53400000    562.00078398    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15361.00000000  58019.72436605  -1635.12422052  -0.00807691     0.01889141      
562.00076143    500.64713135    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:02        218.53200000    563.00136834    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15285.00000000  58940.22302943  -1615.25734001  -0.00830154     0.01865022      
563.00164081    500.56511536    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:06        222.95600000    564.00047219    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15276.00000000  59753.59637132  -1660.24998141  -0.00782760     0.01908716      
564.00030359    500.48996582    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:10        226.82600000    564.99880599    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15230.00000000  59611.63909073  -1684.10971559  -0.00754452     0.01945625      
564.99882254    500.42587891    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:15        231.94300000    566.00262484    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15217.00000000  58848.25756491  -1567.24571196  -0.00878328     0.01825872      
566.00261795    500.62119141    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:20        236.54900000    566.99440601    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15166.00000000  58186.51524399  -1763.73954886  -0.00690242     0.02005194      
566.99454983    500.48691406    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:24        240.35100000    568.00021319    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15013.00000000  57740.06235478  -1651.97211444  -0.00808502     0.01876059      
568.00022200    500.42206421    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:27        244.16200000    569.00022278    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14945.00000000  57276.56680063  -1608.95966866  -0.00834732     0.01867911      
569.00021961    500.35244598    0.00000000      0.00000367      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:32        248.47300000    569.99905715    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14871.00000000  56858.51835197  -1576.33513446  -0.00864499     0.01835254      
569.99935477    500.26661530    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:36        253.03700000    571.00033883    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14721.00000000  56373.82496861  -1737.05560137  -0.00712836     0.01978055      
571.00033883    500.18555298    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:40        257.05600000    571.99964496    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14519.00000000  55685.10654183  -1527.21979085  -0.00916893     0.01773121      
571.99947945    500.11879578    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:45        261.85600000    572.99954233    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14186.00000000  54638.13507082  -1564.03195204  -0.00879529     0.01824217      
572.99953848    500.03220215    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:49        265.85700000    574.00032642    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13745.00000000  53291.76455618  -1558.64322290  -0.00891670     0.01806784      
573.99957918    500.72819366    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:54        270.26600000    574.99967265    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13396.00000000  53096.17968914  -1520.85719501  -0.00914686     0.01785359      
574.99967593    500.64140930    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:16:57        274.15200000    576.00064581    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
13701.00000000  53852.64676874  -1627.82022036  -0.00821227     0.01872975      
576.00094007    500.55748596    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:01        278.16200000    577.00060213    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14634.00000000  56620.89491311  -1663.95067491  -0.00776786     0.01920110      
576.99923160    500.48786774    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:06        282.57300000    577.99779699    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15476.00000000  58754.27944125  -1636.58502086  -0.00798796     0.01902126      
577.99762169    500.42053833    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:10        286.66200000    579.00110552    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16447.00000000  59711.03840313  -1762.50598454  -0.00688879     0.02000973      
579.00029464    500.35149231    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:14        290.34400000    580.00067812    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16059.00000000  59861.82540709  -1702.48333373  -0.00744129     0.01947703      
580.00068428    500.27233734    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:18        294.88200000    580.99882209    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15766.00000000  59316.68737524  -1767.18054475  -0.00689236     0.01999091      
580.99879529    500.18841400    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:22        299.05600000    582.00024931    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15463.00000000  58474.19542302  -1747.31366396  -0.00698033     0.02001233      
582.00024539    500.11688843    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:27        303.50100000    583.00037378    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15072.00000000  57409.75928271  -1702.97026693  -0.00742896     0.01958675      
583.00037714    500.03487244    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:31        307.40600000    583.99980118    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
14958.00000000  57177.16748789  -1661.12646145  -0.00770586     0.01930336      
583.99965197    500.78064575    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:35        311.39200000    585.00106320    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15497.00000000  58771.35456969  -1689.17382223  -0.00746759     0.01951274      
585.00106320    500.70339813    0.00000000      0.00000368      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:39        315.30900000    585.99967173    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
15962.00000000  60276.46532112  -1732.64073908  -0.00697903     0.02001006      
585.99999525    500.61566010    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:42        318.82300000    586.99992570    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16516.00000000  61686.20207253  -1719.98047207  -0.00717348     0.01979386      
586.99990547    500.55939331    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:46        322.91000000    588.00101733    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16596.00000000  62151.35319711  -1691.73833774  -0.00743740     0.01956013      
588.00194777    500.48691406    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:50        326.79600000    589.00131791    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16543.00000000  62178.91362035  -1805.35611910  -0.00640023     0.02059860      
589.00128509    500.42206421    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:54        330.92900000    590.00063936    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16496.00000000  62148.30174860  -1665.93087040  -0.00787174     0.01911313      
590.00016691    500.35416260    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:17:58        335.05200000    591.00058517    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16544.00000000  62093.60291095  -1771.14093560  -0.00674660     0.02020418      
591.00057289    500.26375427    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:02        338.90600000    592.00065352    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16430.00000000  62202.96812403  -1724.91473057  -0.00714654     0.01981269      
592.00061891    500.19032135    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:07        343.46900000    593.00132097    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16377.00000000  62303.89316037  -1669.85879943  -0.00767697     0.01932965      
593.00410553    500.12070312    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:11        347.87700000    593.99582210    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16393.00000000  62382.12710619  -1696.73752041  -0.00742279     0.01955007      
593.99479448    500.04288330    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:15        351.81600000    595.00110273    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16416.00000000  62607.99922026  -1763.41492691  -0.00697481     0.01992014      
595.00109673    500.73773041    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:19        355.83500000    596.00431859    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16436.00000000  62738.56226174  -1666.64503923  -0.00791816     0.01901866      
596.00427186    500.67001953    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:23        359.74000000    596.99894156    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16466.00000000  62851.59570539  -1688.29734209  -0.00770651     0.01921149      
596.99896602    500.60135498    0.00000000      0.00000369      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:26        362.75800000    597.99722370    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16479.00000000  63010.98519654  -1750.68973545  -0.00711765     0.01980750      
597.99730925    500.54794922    0.00000000      0.00000370      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:30        366.64800000    599.00102785    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16515.00000000  63160.96064441  -1695.21179590  -0.00742506     0.01949813      
599.00098857    500.47165527    0.00000000      0.00000370      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
15:18:34        370.33300000    599.99963521    0.00000000      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000      0.00000000      
16548.00000000  63371.02365804  -1708.16422267  -0.00721276     0.01971628      
599.99965187    500.40527954    0.00000000      0.00000370      0.00000000      
0.00000000      0.00000000      0.00000000      0.00000000
/Users/SeanFackler/anaconda/bin/python 
/Users/SeanFackler/PycharmProjects/msp_sean/mback_test.py

Traceback (most recent call last):
  File "/Users/SeanFackler/PycharmProjects/msp_sean/mback_test.py", line 53, in 
<module>
    _larch=mylarch)
  File "/Users/SeanFackler/anaconda/share/larch/plugins/xafs/mback.py", line 
122, in mback
    f1 = f1_chantler(z, energy, _larch=_larch)
NameError: global name 'f1_chantler' is not defined

Process finished with exit code 1
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit

Reply via email to