Reference Manual of the nadc-tools API and Libraries - SRON
Reference Manual of the nadc-tools API and Libraries - SRON
Reference Manual of the nadc-tools API and Libraries - SRON
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2.24 NADC FILESIZE<br />
Identifier NADC FILESIZE<br />
Author R.M. van Hees<br />
Language ANSI C<br />
Purpose obtain files size from operating system<br />
Usage flsize = NADC FILESIZE( flname );<br />
Input char *flname : name <strong>of</strong> <strong>the</strong> file<br />
Returns size <strong>of</strong> file in bytes<br />
Comment None<br />
2.25 NADC FIT<br />
Identifier NADC FIT<br />
Author R.M. van Hees<br />
Language ANSI C<br />
Purpose fitting data to a straight line y = a + b * x<br />
Usage NADC FIT( dim arr, x arr, y arr, err arr,<br />
&fit a, &fit b, &sig a, &sig b, &chi2 fit, &q fit );<br />
Input size t dim arr : number <strong>of</strong> data points<br />
float *x arr : independent variable values (X-axis)<br />
float *y arr : dependent variable values (Y-axis)<br />
float *err arr : measurement errors <strong>of</strong> <strong>the</strong> data points Y<br />
Output float *fit a : parameter a<br />
float *fit b : parameter b,<br />
if NULL <strong>the</strong>n a horizontal line is fitted<br />
float *sig a : uncertainty in parameter a<br />
float *sig b : uncertainty in parameter b,<br />
not calculated in case fit b == NULL<br />
float *chi2 fit : chi-square <strong>of</strong> fit<br />
float *q fit : goodness-<strong>of</strong>-fit probability<br />
(NULL will skip <strong>the</strong> calculation)<br />
Returns nothing<br />
Comment adopted from Numerical Recipes in C<br />
43