Gleb, I trust you will not mind if I CC my answer to your question to the Ifeffit mailinglist. It is, I think, of sufficiently general interest.
How can I constrain a guess parameter to some limited range of values during a fit? For example during a fit I want my DW factor be varied but in the limited range, e.g. from 0.002 to 0.01? In the ifeffit doc I hav'nt found a math expression for confining a guess parameter.
There are two possible answers. 1. To constrain a value as you wish, this will work: guess x 0.005 set y max(0.002, min(x, 0.01)) That idiom will require the value never to be smaller than 0.002 and never larger than 0.01. A caveat: If, without this constraint, the fit wants that parameter to become too large or too small, than the likely result of this constraint is that the value will be pinned at one end or the other. The min/max idiom often does not behave as you'd like. 2. The other option is to use a restraint as described in the Ifeffit reference manual: http://cars9.uchicago.edu/ifeffit/refman/node55.html Artemis does not yet have an interface to setting and using restraints, but you could use Artemis to write and save an ifeffit script, add the restraint by hand, and then run the ifeffit script from the command line. The ability to add restraints to a fit will soon be handled well by Artemis, though. HTH, 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/
participants (1)
-
Bruce Ravel