Dec 242017
 
A general purpose Non Linear Weighted Least Squares Fitting program for Windows.
File WINFIT96.ZIP from The Programmer’s Corner in
Category Science and Education
A general purpose Non Linear Weighted Least Squares Fitting program for Windows.
File Name File Size Zip Size Zip Type
FIT.DAT 48 40 deflated
WINFIT.DLL 51864 26076 deflated
WINFIT.EXE 73200 29732 deflated
WINFIT96.WRI 6144 2594 deflated

Download File WINFIT96.ZIP Here

Contents of the WINFIT96.WRI file


1.)--.//0WINFIT V0.96
Written by Y. Danon

A general purpose Non Linear Weighted Least Squares Fitting program for windows 3.x
I wrote that program because I do a lot of fittings for my Ph.D. research. This program is written in my application in mind.

FEATURES
* Reads a simple ASCII file, space or tab delimited of X Y with an optional Yerror data.
* The data can be plotted with log axis options.
* The program uses Levenberg-Marquardt fitting method.
* There are some built in functions and the a user-defined function.
* The program can generate weights that we improve fitting performance for some problems.
* This version can read up to 500 data points and fit up to 10 parameters.
* The program provides a REPORT file and the plot can be copied to the clipboard.
* The program will calculate and display the COVARIANCE and CURVATURE matrixes

INSTALLATION
Copy the WINFIT.EXE, WINFIT.DLL and FIT.DAT (the last is an example data file) to one directory and then use the program manager to run the program and move the program to a group by dragging it.
The program is written in Visual Basic so you need the VBRUN100.DLL in the WINDOWS directory.

USING WINFIT

In order to use a non linear fitting algorithm the user must start the fitting session with an initial guess for the parameters to be fitted. If this guess is good enough the program will converge to a "good" fit.

1. Prepare your data file (with NOTEPAD for example) and save it with .DAT extension
Open the file with the FILE OPEN menu command. A sample data file FIT.DAT is provided with the program
2. If your file is not simple (column 1 is X and Column 2 is Y) specify the columns in the FILE OPEN window also specify the Yerror column. The Yerror should represent 1 standard deviation in the value of Y.
3. As an indication that the file was read correctly you should check the No. of Points filed in the WINFIT window, it will show the number of data points in your file.
4 You are ready to view your data so you can click the PLOT button.
5. Next select an equation from the WINFIT window, if you are in the PLOT window click the FIT window to go back. As you Select an equations the Parameters windows will appear ( a simple linear function is provided as a test to be used with the file FIT.DAT).
6. Change the initial Parameters and click the PLOT button. Repeat that process until you see you data with the fitted curve. This should provide a good initial guess for the program to start fitting.
7. From the WINFIT window click the FIT button.

INTERPRETING THE RESULTS
The results of the fits will appear in the parameter window and the standard deviation in each parameter. During the fitting process the message window will give information about the fitting process and iteration starting with a + (pulse) sign is a successful iteration (the chi-square was minimized).
The program will iterate until the number of iterations is equal to the number in the Max iteration box (you can change this number) or the %Error is equal or less then value in the Chisq % Error box (you can change this value).
The COVARIANCE and CURVATURE Matrixes can be viewed By choosing this option in the PARAMETERS menu.

SOME MATHEMATICAL NOTES
1. The chi-square is calculated as
chisq=sum((Y(xi)-Yi)/sigYi)**2) for i=1 to N
whereN is the number of data points
Y(xi) is the fitted curve value at xi
Yi is the Y value for data point i
sigYi is the standard deviation in Yi
2. The reduced chisq is defined by
rchisq=chisq/(N-Nfit) where Nfit is the number of fitted parameters. (parameters that are kept variable during the fit).
3. The Percent Error in chi-square is Defined:
%Error=100(1-chisq/ochisq) where ochisq is the value of chi-square in the previous iteration.
4. In Some problems a better fit is obtained if the data is weighted. A simple way for generate the weights (if they are not available in the data file) is to use the DATA menu and choose SET WEIGHTS this will set the value of sigYi (see note 1).


FUTURE ADDITIONS TO THIS PACKAGE:
1) Add more built in functions.
2) Improve the equation parser. and its speed. (Difficult)
3) Add an option to save and load equations and initial parameters.
4) Add Printer Support.
5) Add Linear Fitting Algorithm (maybe).

LEGAL STUFF

This program is free for the moment I might consider going sharware when I will thing version 1.0 is ready. You may copy it and distribute as long as this file is accompanied and no charge is being taken.
The author is not responsible to any damage that will be caused by the program or by the use of the program results. The responsibility is of the user alone.


Any suggestions for improvements/bugs are welcomed and could be sent to:

[email protected]
ata file) to one directory and then use the program manager to run the program andvsnyid
_\w

W
f`
*
vCdqMZl.d
_\w

W
f`xxxy{I6
N2w|F
w
y



*
N
N
~



=F?ACf!KMZZ\*.0?ACf!KMZf=/2!;(n the WINFIT window, it wata points in your file.
4 You are ready to view your data so you can click the PLOT button.
5. Next sTimes New Romanthe WINFIT window, if you are in the PLOT window click the FIT window to go back. As you Select an equati


 December 24, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)