Matt, Can you explain what ifeffit does when it reads a mu(E) data file which has non-monotonically increasing energy values. Specifically what happens to data like this: # energy xmu # ---------------- 1 0.1 2 0.15 2 0.15 3 0.18 4 0.2 end so on. Ifeffit throws up one of these two sets of error messages: spline: energy data appears out of order pre_edge: energy data appears out of order or spline: energy and xmu are different length? I understand that non-monotonic data will give problems in the intepolations and elsewhere, but what does ifeffit actually do in this case? FWIW, I plan to have athena check data as it is read in to verify that the energy array is monotonic up (or down, in which case the data will be reversed) before trying to do anything with it. But I remain curious about what ifeffit chooses to do. B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu U.S. Naval Research Laboratory, Code 6134 phone: (1) 202 767 5947 Washington DC 20375, USA fax: (1) 202 767 1697 NRL Synchrotron Radiation Consortium (NRL-SRC) Beamlines X11a, X11b, X23b, X24c, U4b National Synchrotron Light Source Brookhaven National Laboratory, Upton, NY 11973 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
Hi Bruce, What ifeffit does right now on 'poorly sorted data' is: 1. read_data() does nothing about out-of-order data, or repeated x-values. It can't necessarily tell what column is supposed to be in monotonically increasing. Like, you could potentially give it mono angle or encoder pulses and then compute energy from that. 2. pre_edge(), spline(), and bkg_cl() are supposed to not choke on out-of-order or repeated energy values. The messages spline: energy data appears out of order pre_edge: energy data appears out of order are meant as warnings (guess that should be clearer, huh?) and the data are sorted internally before the actual processing happens on the sorted arrays. That is, if x.energy and x.xmu are in a strange order or have multiple repeated energy values, then spline(x.energy, x.xmu) will give the above warnings, and the resulting x.bkg will correspond to the same (possibly screwy) energy data, but x.k and x.chi should be fine -- just the same as if the data were sorted. I believe this is all working OK. There is a currently-broken 'sort' keyword for read_data() that will be fixed for the next version. With this, you can force the data to be sorted so that a column is in strictly non-decreasing order: read_data(my.dat, sort=2) will ensure that the data in the second column is monotonically increasing. Again, this is currently broken, but will work in the next version. --Matt
participants (2)
-
Bruce Ravel
-
Matt Newville