[Ifeffit] non-monotonic data

Matt Newville newville at cars.uchicago.edu
Tue May 14 15:03:37 CDT 2002


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





More information about the Ifeffit mailing list