Hi all, Is there a way to get Athena (or Ifeffit) to report an R-factor for a linear combination sum, as opposed to a fit? Artemis does that for FEFF fitting, and Athena will do a linear combination sum ("plot data + sum" with weights entered into the LCF standards boxes), but I don't see a way to get it to report the statistics. Here's the reason I'd like to be able to do this: when I run LCF fits, I often do one fit for XANES and another on chi(k) for EXAFS (and perhaps another using the derivative of XANES, just for good measure). The fits unsurprisingly usually give somewhat different weights to each fraction. So suppose XANES tells me my sample is 0.22 A and 0.78 B, and EXAFS tells me its 0.28 A and 0.72 B. I'd like to be able to force the EXAFS to 0.22 A and 0.78 B (i.e. the results of the XANES fit), and have it give me an R-factor for that sum. Then I could apply something like a Hamilton test to decide if they're actually consistent. If it's not currently a feature, it's one I'd like to see. It's not that high a priority--I can just export the spectra and calculate it in Excel. But it would be nice. --Scott Calvin Sarah Lawrence College
On Saturday, January 07, 2012, 01:42:43 pm, Scott Calvin wrote:
Hi all,
Is there a way to get Athena (or Ifeffit) to report an R-factor for a linear combination sum, as opposed to a fit? Artemis does that for FEFF fitting, and Athena will do a linear combination sum ("plot data + sum" with weights entered into the LCF standards boxes), but I don't see a way to get it to report the statistics.
Here's the reason I'd like to be able to do this: when I run LCF fits, I often do one fit for XANES and another on chi(k) for EXAFS (and perhaps another using the derivative of XANES, just for good measure). The fits unsurprisingly usually give somewhat different weights to each fraction. So suppose XANES tells me my sample is 0.22 A and 0.78 B, and EXAFS tells me its 0.28 A and 0.72 B. I'd like to be able to force the EXAFS to 0.22 A and 0.78 B (i.e. the results of the XANES fit), and have it give me an R-factor for that sum. Then I could apply something like a Hamilton test to decide if they're actually consistent.
If it's not currently a feature, it's one I'd like to see. It's not that high a priority--I can just export the spectra and calculate it in Excel. But it would be nice.
That's a reasonable request. I'll put it on the to do list for the new version of Athena. B -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2 Building 535A Upton NY, 11973 My homepage: http://xafs.org/BruceRavel EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/
Hi Scott,
On Sat, Jan 7, 2012 at 12:42 PM, Scott Calvin
Hi all,
Is there a way to get Athena (or Ifeffit) to report an R-factor for a linear combination sum, as opposed to a fit? Artemis does that for FEFF fitting, and Athena will do a linear combination sum ("plot data + sum" with weights entered into the LCF standards boxes), but I don't see a way to get it to report the statistics.
Here's the reason I'd like to be able to do this: when I run LCF fits, I often do one fit for XANES and another on chi(k) for EXAFS (and perhaps another using the derivative of XANES, just for good measure). The fits unsurprisingly usually give somewhat different weights to each fraction. So suppose XANES tells me my sample is 0.22 A and 0.78 B, and EXAFS tells me its 0.28 A and 0.72 B. I'd like to be able to force the EXAFS to 0.22 A and 0.78 B (i.e. the results of the XANES fit), and have it give me an R-factor for that sum. Then I could apply something like a Hamilton test to decide if they're actually consistent.
If it's not currently a feature, it's one I'd like to see. It's not that high a priority--I can just export the spectra and calculate it in Excel. But it would be nice.
It should be possible to calculate an R-factor or chi-square statistics with a fairly simple ifeffit macro, using the functions vsum() (to sum an array) and npts(). Something like (untested, top-of-my-head): macro show_rfact my.data my.model _fit.d = $1 - $2 mean = vsum(_fit.d)/npts(_fit.d) variance = vsum(_fit.d**2)/npts(_fit.d) - mean*mean stderr = sqrt(variance) rfact = vsum(_fit.d**2) / vsum($1**2) print ' statistics for fit:' print ' mean +/- standard_error = ', mean, ' +/-', stderr print ' rfactor = ' rfact end macro Hope that helps.... --Matt
Thanks, Matt, I'll give it a try. --Scott On Jan 8, 2012, at 10:06 PM, Matt Newville wrote: It should be possible to calculate an R-factor or chi-square statistics with a fairly simple ifeffit macro, using the functions vsum() (to sum an array) and npts().
participants (3)
-
Bruce Ravel
-
Matt Newville
-
Scott Calvin