Matt: Let me see if I can explain my reasoning adequately The reason we want to rebin continuous scan data is because in our continuous scan, we oversample the data significantly so reducing it to a step size in k of 0.05 really costs nothing. With the rebinning, it is possible to make use of the statistical weight of all the data. A simnple interpolation would throw this away. I know that you have a spline fit in IFEFFIT and perhaps that is an equivalent method to make use of all the counts in the data but this is slightly different. We have been using this for a while with MR-CAT data and it seems to work well for us. Yes, for this algorithm, we select an E0 and a distance above that at which to begin rebinning. You could just as well just set an energy at which to begin rebinning but the conventional idea of using energies relative to E0 make sense to me. The bin size just starts at this E0+Offset, whatever it is. There is no regard for an even value in k-space since the data needs to be kept in terms of energy anyway. (If you have suggestions about this, please let me know). If E0 changes, interpolation will be required for analysis but this is something that has to be done anyway when summing multiple spectra where there could be a small shift in E0 from one to the next. We just have to live with that, I suppose. This code fragment is also incorporated in a bigger "filter" that Ken has written which fits multiple spectra to each other to determine shifts, then interpolates the spectra to a common grid, sums or averages them and then performs the rebinning on the final product. We plan to use this in a GUI to assess the quality of data as we take it in order to figure out when to stop collecting on a sample. I suppose that it is possible to do what you suggest in "2" below but the boxcar gives a better representation of where the center of mass of the actual data is. As I mentioned before, the goal is not to get data on an even grid but just to remove the oversampling without losing statistics. Interpolation to an even grid is left for later, in the analysis software. Typically, in a step scan you would set the delta-k to some value like 0.05 or more so your original data would be no better than the rebinned data. If it is important to have smaller steps then perhaps the default should be smaller than 0.05k? The way I see it, we have not yet pushed the data collection as far as we will eventually go. Right now we have an EPICS limitation of no more than 4000 data points in a scan but once we break past this limit, I expect that there is plenty of flux at APS to take data even more densely. Your question about weighted averaging is a good one. I would have to think about the convolution a bit more. What do others think? Carlo On Tue, 11 Mar 2003, Matt Newville wrote:
Hi Carlo,
Thanks!! That's wonderful. It seems like this should be an option in spline() and bkg_cl(), and possibly in pre_edge(). I admit to being still a little confused by the goal of the rebinning, especially with respect to loss of resolution. It seems like to use this script, you need to do two things: 1. select an E0. The data will be put at energies that will give an even k-grid with this e0. I think it's inevitable that if e0 changes, you might want to re-bin.
2. assume that the k-grid is small enough that the measurements at independent energies are within the acceptable energy resolution that they can be simply summed.
Is that right?
Would it be OK with you (and everyone else) to have a weighted average replace the boxcar average? For example, at k=12, [E(k+0.05) - E(k)] = 5eV, which is larger than normal energy resolutions, so the boxcar average might wash out the high-k EXAFS, no? It might be better to convolve the spectra with a lorenztian reflecting the incident energy resolution (probably defaulting to 1eV). Does that seem OK or is there something eles going on?
Anyway, thanks!!
--Matt
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
-- 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