Hi all, Theanne Schiros and I are running into a fitting issue that I don't quite know how to solve, other than to suggest a new Ifeffit feature. :) The system we are working with is a CuInSe2 photovoltaic. Our model allows for the possibility of vacancies as well as site disorder (e.g. a copper sitting in a nominally selenium site). Combined with the known stoichiometry of the samples (generally somewhat Se rich compared to the nominal formula), that gives us a whole network of constraints. In other words, there are 12 parameters describing the disorder: the amounts of copper, indium, selenium, and vacancies in each of the three kinds of site. But many of those can be "def'd" in terms of the others, since we know there are twice as many selenium sites as copper or indium, and we know the stoichiometry. The resulting fits work pretty well. They generate results which are statistically superior to fits with no disorder, and yield values for the various kinds of disorder which are comparable to those predicted theoretically. So here's the problem: a couple of the "def'd" values come out somewhat negative. I'm not surprised this happens; my sense is that the negative values are comparable to the uncertainties (Theanne has the exact data; I'm mainly kibbitzing), so it's not a crisis for the overall fit. But of course I'd like to force the fit not to allow those negative occupancy numbers. I can't think how to do that, though. We can't just put an abs() around the def'd values, because that means our constraints based on stoichiometry and the relative number of sites are being applied incorrectly. A restraint doesn't really seem appropriate either. Does anyone have an idea of how to deal with this? If no one does, perhaps there should be an ifeffit option for a "hard restraint." This would be something like the max and min functions, except that it would operate by putting a huge penalty to the chi-square when outside the range. Just to be clear, it would work something like this: y has been def'd to x + z. Then y is also given a hard restraint that it cannot be less than 0. The fit would then generate a positive value of y that was not less than 0 by varying x and z in such a way that it is still true that y = x + z. Is this a feature that would be useful to other people? Am I missing a way to implement this using the current software? Would this create big problems for, e.g., Ifeffit's ability to calculate uncertainties and correlations? Thanks for any thoughts you all have on these issues! --Scott Calvin Sarah Lawrence College