hello All: This is to bring back up a subject that was discussed a few months ago on the list. We have been diligently working on a python algorithm for rebinning XAFS data from high point density slew scans. I have been testing it and I hope that there will be a complete version available shortly. It is in the form of a unix filter which takes a few parameters (edge energy, energy above the edge where rebinning is to begin, step size in k for rebinning) and spits out a modified file for each input file. There are just a couple of small glitches in how it handles data points with the same energy (this causes athena to pop up an annoying dialog) but that should be solved this week. I am more than happy to send it to anyone who would like it. Matt, I remember that you had suggested that we send code. Carlo -- Carlo U. Segre -- Professor of Physics Associate Dean for Research, Armour College Illinois Institute of Technology Voice: 312.567.3498 Fax: 312.567.3494 Carlo.Segre@iit.edu http://www.iit.edu/~segre
Hi Carlo, On Mon, 4 Nov 2002, Carlo U. Segre wrote:
hello All:
This is to bring back up a subject that was discussed a few months ago on the list. We have been diligently working on a python algorithm for rebinning XAFS data from high point density slew scans. I have been testing it and I hope that there will be a complete version available shortly. It is in the form of a unix filter which takes a few parameters (edge energy, energy above the edge where rebinning is to begin, step size in k for rebinning) and spits out a modified file for each input file. There are just a couple of small glitches in how it handles data points with the same energy (this causes athena to pop up an annoying dialog) but that should be solved this week.
I am more than happy to send it to anyone who would like it. Matt, I remember that you had suggested that we send code.
Carlo
Yes -- that would be great!! I've been sort of lax on this topic, and have not done anything to implement an automated binning mechanism. If you're happy with this approach, I'd be willing to try to put this in the core, either as a separate command, or as part of the spline() command. Thanks, --Matt
Matt said in response to Carlo's post about a rebinning algorithm: MN> Yes -- that would be great!! I've been sort of lax on this MN> topic, and have not done anything to implement an automated MN> binning mechanism. If you're happy with this approach, I'd be MN> willing to try to put this in the core, either as a separate MN> command, or as part of the spline() command. I think it is much more appropriate to have a rebinning command or to let the GUI do it than to put it in the spline() command. The reason I say this is that one may want to examine the binned and unbinned data side-by-side. For example, it would be interesting to have binned and unbinned data as separate data groups in Athena so that they may be overplotted in k or R. If rebinning is part of the spline() command than ifeffit has to worry about binned and unbinned output channels. It seems to me to be more conceptually transparent to do something like this: read_data(foo.dat, type=xmu, group=a) spline(a.energy, a.xmu) bin(a.energy, a.xmu, group=b, <<other binning parameters>>) spline(b.energy, b.xmu) newplot(a.k, a.chi, key=unbinned) plot(b.k, b.chi, key=binned) The other advantage of a bin() command separate from spline() is that you can then rebin any kind of data, not just mu(E) data. Just my 2 cents worth, B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu Code 6134, Building 3, Room 222 Naval Research Laboratory 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/
A little while ago, Bruce said:
read_data(foo.dat, type=xmu, group=a) spline(a.energy, a.xmu)
bin(a.energy, a.xmu, group=b, <<other binning parameters>>) spline(b.energy, b.xmu)
newplot(a.k, a.chi, key=unbinned) plot(b.k, b.chi, key=binned)
OK -- I agree with this. There should be a binning command that puts the data to a pre-defined x-array with some optional parameters for the interpolation scheme (say, whether to use boxcar averages or Lorenztian convolution) and how to deal with repeated data, etc. --Matt PS: I hope to catch up with other ifeffit emails on multiple k-weights and So2 v. Ei soon!!
participants (3)
-
Bruce Ravel
-
Carlo U. Segre
-
Matt Newville