box_constraints

20 views
Skip to first unread message

Edward Chandler

unread,
Apr 2, 2024, 2:36:07 PMApr 2
to fityk-users
Hello - Sorry for posting multiple questions today. I have 100+ diffractograms I'm trying to fit by using the powder diffraction module. I've found in the documentation the box_constraints command, but I don't see any sort of discussion on how to use it even though it mentions some sort of global effect. I think doing the [0: ] thing to the end of each parameter would work to make my fits non-negative, but...... with 100+ diffractograms and multiple overlapping phases, this gets tedious fast.

Anyone know the syntax for this command?

Thanks!

Edward Chandler 

Alexander Selyutin

unread,
Apr 2, 2024, 3:44:50 PMApr 2
to fityk...@googlegroups.com
Hello,
1) Set the method LM from MPIFIT by the enter "set fitting_method=mpfit" to the console.(You might find it useful in the future if you add this command to your fiyk init script.).
If you want to set constraints on the peak center you should find a center variable. Hold and unhold the center variable by clicking on the lock. This shows the variable name.  .
At the bottom of the GUI you can see the name of the variable of center(e.g. $_12). After that set the variable and limits ex $_12 = ~40.5 [40.2:41.1]. 

2) I'm not sure if my way is good, but it works. When I'm working with more than 100 diffraction patterns, I use Python or lua scripts that modify the scripts.fit file and run it on each file. You can generate the "first" script file by manually analyzing a single diffraction pattern and save the history (Session->Save History). Another way is to create a large script for all files using geany or notepad++ and run it.
some fityk console commands that may help you
@*:info title, peaks >>peaks.dat - export peak data from all patterns to a file
@*:Y=Y/darea(Y) normilize data


--
Regards,
Alexander Selyutin
Reply all
Reply to author
Forward
0 new messages