Home
User's Guide of Spline Calculus
Contents
1. The calculation of smoothing splines requires an iterative mathematical procedure This value gives the maximum number of iterations If the calculation fails increasing this value up to 100000 sometimes helps This situation occurs more frequently if the calculated curve is getting to be very similar to a straight line In such case the unique solution of the equation system detailed in the appendix is becoming more and more ill conditioned 2 3 Using Command Line Parameters The more important options can be given through the command line parameters If they are givin in this way these values have precedence against the values given in the configuration file The command line parameters are interpreted as follows Parameter 1 is the name of the input data file so this value corresponds to the value of keyword InputFileName see page 9 Parameter 2 is the column number of the independent values in the data file so this value corresponds to the value of keyword ColumnX see page 9 Parameter 3 is the column number of the dependent values in the data file so this value corresponds to the value of keyword ColumnY see page 9 Parameter 4 or its absolute value is the number of the redundant rows at the beginning of the data file so this value corresponds to the value of keyword OmittedRows see page 9 If this parameter is a negative integer number the extrema and the points of inflection are not be denoted on the screen and they are not
2. at keyword ImageBaseFileName see page 9 11412 3 1 4 5 16 17 8 9 and O shortcut keys multiply the actual base error by 1 01 1 1 2 3 4 5 6 7 8 9 and 0 5 respectively The deviation are recalculated with the new base error see the first paragraph of Subsection 2 2 3 the smoothing spline is calculated again the result file is rewritten and the graphics screen is redrawn restores everything with the previous base error i e this shortcut key is the undo function b Bj xj X y and Y change the displayed ranges of the axes b increases and B decreases the ranges of both axes The center of the displayed portion does not move The extent of resizing can be set by keyword SizingStep see page 14 x X and y and Y keys work similarly as b and B but they influence only the x and y axis respectively q or Q terminates the program 2 5 Result File 17 2 5 Result File The result file is a simple ASCII file consisting three parts e The first part consists of the first two rows The first row gives the version of the used Spline Calculus while the second one gives the conditions of the current task The filename of input data the column and error definitions are given here e The second part includes the data of the calculated
3. case insensi tively In the latter case a small positive integer number can follow the yes word If the number is not indicated it is supposed to be 1 Incase of yes the deviation values are weighted according to the slope of the curve defined by the x and y values The slope is approximated by linear interpolation The integer number determines how many neighboring points are used for the linear interpolation both from and from right For example if the number is 2 then the actual point itself the two closest points from left and the two closest points from right are used so the linear interpolation uses five successive points all together 2 2 4 Keywords for Modifying the Outputs ShowCalculus default value yes If this value is set to yes the points minimum the points of maximum and the points of inflection are indicated on the screen and they are written into the result file Otherwise this keyword should set to no and the result of the mathematical analysis are indicated neither on the screen nor in the result file WriteCurve default value yes If this value is set to yes the points of the displayed calculated curve are also written into the result file These data have fine resolution and they can be used for quick estimation of the function values the first three derivatives and definite integral values Otherwise this keyword should set to no and the result file will not contain the data of the displayed calculated cur
4. data points it just appropriately nears to them around their deviations 5 as it can be seen in Figure 2 It means mathematically that the n 1 2 2 2 2 Y Vi ay xP bir x Cy HL di Un an1 X Daa X4 Cnt Xn dnt i 1 lt 1 n inequality must also be fulfilled together with Equations 2 4 and with the following equa tions ai X bi x cio x dia ap X br x crx di i 2 n 1 This equation system usually has unique solution for ai bi c and di i 1 n 1 at reasonably small values However if the values are large then infinite number of lines the regression line is also among them can be the solution It should be emphasized that the 5 values are constant input data together with the x and y ones They are not minimized during the calculation of the coefficients since the splines are not related to the non linear parameter estimating procedures in any way
5. in the x1 xn interval e The left and right limits of the values of the first derivative should be the same at the inner endpoints of the used interval 3a x 2b Xi c 3a x2 Qin xi Ci t 2 ene 2 As a consequence of this equation there is no break point inside the x1 Xn interval e The left and right limits of the values of the second derivative should be the same at the inner endpoints of the used interval 6a xi 2b 6ai 1 Xi 2biu i E n 1 3 e Finally two restrictions must be set to the second derivative at the endpoints of the overall interval 6aq x 2b 0 and 6an Xn 2bn1 0 4 i e there are points of inflection at both ends of the overall interval 18 Appendix 19 ads natural cubic spline SAN 2 A smoothing spline U2r Vis Yi 1 F l i l i l a3 X1 X2 oe Xi Xi ae Xn 1 Xn Figure 2 Illustration for the splines and the used notations Equations 1 4 forms an exact linear equation system the number of equations is the same as the number of parameters to be determined so the coefficients of the cubic poly nomials can unambiguously be determined With these coefficients the function values the first second and third derivatives and the definite integrals can be calculated Smoothing Spline Smoothing spline is a modified case of the natural cubic spline The smoothing spline does not go through the xi yi i 1
6. the curve at a maximum If both the first and second derivatives are zero the dashed line fills the whole displayed y range e The points of inflection are denoted by vertical dotted lines The line below the calculated curve means that the values of the third derivative is negative while a line is drawn above the calculated curve in case of positive third derivative 16 Using Spline Calculus e If keyword ShowCalculus is set to no the extrema and the points of inflection will not be denoted on the figure e A vertical solid line denotes the focus line which is always drawn at the actual x value Immediately below the graph some results are displayed the function value the first three derivative and the definite integral are written at the actual x value Pressing the left button of the mouse on the area of the figure changes the actual x value and moves the focus line to the clicked x position The lower part consists of two rows The left part of the first one gives two values 1 the actual value of the base error see the first paragraph of Subsection 2 2 3 and the average deviation from the last calculation The latter one is the average of the absolute values of calc input LA the differences between the input and calculated y values i e 3 3 us nominations given in the appendix The right part of the first row displays the actual position of the mouse in parentheses The second row of the lower part gives the shortcut key
7. 4 16 512x384 15 640x350 16 640x350 15 640x400 16 6480x400 15 640x480 16 640x480 15 800x600 16 800x600 15 1024x768 16 1024x768 15 1280x1024 16 1280x1024 24 320x200 24 320x240 24 400x300 24 512x384 24 640x350 24 640x400 24 640x480 24 800x600 24 1024x768 24 1280x1024 Driver memory 1 640x480 4 640x480 8 640x480 24 640x480 Behind the driver name denotes that besides the standard sizes the driver allows to choose arbitrary width and height within the physical limitation of the graphics adapter and the RAM Please choose valid graphic driver and mode i e correct BPP width and height values in the SpCalc cfg configuration file SplineCalculus v2 00a 20060727 has stopped Nevertheless note that the automatic detection is not fool proof Sometimes a triplet is detected to be valid but it does not work 2 2 6 Keywords for the Appearance of the Graphics Screen SizeSymbol default value 4 The input data are plotted by solid circles on the screen This value is the radius of the circles given in pixels WidthLine default value 3 The calculated curve is drawn by a solid line on the screen This value is the width of the line given in pixels WidthCalculus default value 1 Theresults of the mathematical analysis of the calculated curve are nominated on the screen if keyword ShowCalculus is set to yes The places of the minimums and maximums are indicated by vertical dashed lines and vertical dotted lines indicate the
8. Linux it can be used as icon Configuration file with default values spcalc cfg Sample files sine dat smooth dat pH Vtitr dat 1 2 1 DOS Windows 95 98 Millenium 2000 XP and 2003 Operating Systems The freely downloadable spcalcdw zip contains the executable program a part of the docu mentation and the example files The installation itself is very simple The user has to create a directory or folder in windows nomenclature and the contents of spcalcdw zip has to be extracted into that directory In this directory the program spcalcd exe or spcalcw exe is ready to use If the user wants to access the program from other directories then either 1 the installation directory should be inserted into the PATH environment variable or 2 the program name has to be called together with its path e g C SPCALC SPCALCW EXE In the latter case the configuration file see Section 2 2 must be copied into the specific directory if the user wants to use it there It is important to note that the graphics of DOS version is untrustworthy if it is started from the command line of Windows 2000 XP or 2003 operating system due to incompatibility issues Nevertheless spcalcw exe runs flawless under any Windows versions Spline Calculus does not write anything into the registry of Windows so the programs data files or even the whole directory can be moved freely In case the user wants to start the program by clicking on an icon then th
9. UsErR s GUIDE SPLINE CALCULUS VERSION 2 12A 20080419 1 GABOR PEINTLER HOME PAGE HTTP WWW STAFF U SZEGED HU PEINTLER APRIL 19 2008 University of Szeged Department of Physical Chemistry This documentation and the program Spline Calculus described in it may be used and distributed freely complying with the following regulations e The programs and included data files can be distributed only in their original compressed archives without any modification The distribution of the documentation is possible only in PDF form without any change The programs data files and documentations are free only the expense of the media and shipping handling cost can be charged on the user e Anyone can use the program freely even for commercial purposes Charging the use of the program is strongly prohibited in any way e g rental fee service charge fee of distribution together with an instrument etc e If the use of Spline Calculus conduced the user to reach any result this fact should clearly be indicated when the result is published Allnames and abbreviations e g DOS Windows Linux PostScript Acrobat Reader Zip Unzip GRX DISLIN etc together with the definitions of image formats e g png used in this document are either trademarks or copyrighted properties of the appropriate companies organizations or persons The program are provided on an as is basis It may contain inaccuracies and bugs Th
10. a IO OE Mode ea et 17 2 6 User O tput File os itu dedu ty a aec n e a dde qe pho este dir des 17 2 7 Message eos uon Som Auto Ste e Do SO A bte ex etd det s egg os 17 Mathematical Background cle 18 Nat ral Gubic Spline ua oca denaro beds A UT p eme ic do ee 18 Smoothing Spines d aa Ert dod NR eas OC CR EEG ee ens 19 List of Figures 2 1 2 Graphic window of the program een 15 Illustration for splines e veo oro Seed ek Sse ke oue eot MASS 19 CHAPTER 1 INTRODUCTION Spline Calculus fits a smoothing spline on experimental data included in a file The program draws the data and the fitted curve on the screen While the program is running the results can be checked visually and the fitted curve can be changed by modifying the error values Most of the parameters concerning the calculation or the figure can also be controlled interactively 1 1 Theoretical Background To explain the splines is not the purpose of this manual Essentially it is a method for interpolation even in case of erroneous data i e they may have experimental uncertainty The appendix includes a brief mathematical deduction of the natural cubic and smoothing splines Numerous articles books text books electronic documentation can be found about splines and the writer of this program found the following three ones to be the most useful ones 1 de Boor C A Practical Guide to Splines New York Springer 1978 2 Reins
11. bbbb bbbbbbbb bbbbbbbb bbbbbbbb lt ee SEO na red green blue red green blue red green blue black x0000000 00000000 00000000 00000000 xxxxxxxx 00000000 00000000 00000000 red x1111100 00000000 1111100000000000 XXXXXXXX 11111111 00000000 00000000 green x0000011 11100000 0000011111100000 XXXXXXXX 00000000 11111111 00000000 blue x0000000 00011111 0000000000011111 xxxxxxxx 0000000000000000 11111111 white x1111111 11111111 1111111111111111 xxxxxxxx 1111111111111111 11111111 In 15 bit mode all the three components are defined by a 5 bit number 0 31 In 16 bit mode the green component is defined by a 6 bit number 0 63 while the other two components are still defined by a 5 bit number 0 31 In 24 and 32 bit modes all teh three components are defined by a byte 0 255 The following keywords can be used to adjust the colors ColorBackGround default value 4 8 bit mode 15 15 bit mode 32767 16 bit mode 65535 24 32 bit mode 16579836 This value determines the color of the background ColorText default value 4 8 bit mode 15 bit mode 0 16 bit mode 0 24 32 bit mode 0 The color determined by this keyword is used for the regular texts and for the frames on the graphics screen ColorSymbol default value 4 8 bit mode 4 15 bit mode 2 1504 16 bit mode 43008 24 32 bit mode 11010048 This color is used for the solid circles of the input data The RGB method for the color definition is supposed to be k
12. by a b cand d in the appendix APPENDIX MATHEMATICAL BACKGROUND Given a set of xi yi i 1 n data pairs where x xk j 2 1 n k 1 n ie duplicated independent values are not allowed Supposing that x values are sorted in increasing order the aim of any interpolating procedure is to estimate the dependent y values at any x in the x Xn interval Using splines is one possibility for the interpolation It can be proved mathematically that the natural cubic spline is the smoothest interpolating curve which means that this curve has the smallest x dx xl value for a specific data set Natural Cubic Spline This expression means that a cubic polynomial y a x b x c x d is used to connect two successive points Figure 2 illustrates the natural cubic splines Since the x1 Xn interval are divided into n 1 ranges by the x2 xn_1 values 4 n 1 coefficients should be calculated they are the ai bi ci and d i 1 n 1 values This can be done by applying the following restrictions and assumptions e The function values at the inner endpoints of the ranges can be calculated from any of the neighboring cubic polynomials yi ar xe br x ci x di i 1 n 1 and Vi ar X bir x e xi dit Lm oce 1 It also means that the overall interpolating function is continuous The left and right limits of the function values are the same so there is no point of discontinuity
13. ch C H Smoothing by Spline Functions Numerische Mathematik 10 177 183 1967 3 Reinsch C H Smoothing by Spline Functions II Numerische Mathematik 16 451 454 1971 The feature what makes the splines to be extremely useful is that complete mathematical analysis can be carried out numerically in the range of input data This means that the function values the first three derivatives and the definite integral values can easily be calculated 1 2 Installation Minimum requirements e 386DX 40 MHz processor e 0 5 Mbyte DOS Windows or 2 Mbyte Linux free disk space e 4Mbyte memory e VGA compatible graphics card and e MS DOS 5 0 Windows 95 or Linux with kernel 2 2 Acceptable configuration e 486DX 100 MHz processor or better e 1 Mbyte DOS Windows or 3 Mbyte Linux free disk space 1 Mbyte for every variant of the manual in PDF format e 8 Mbyte memory e VESA compatible graphics card with 800x600 resolution and 8bit color depth and e MS DOS 6 22 Windows 98SE or Linux with kernel 2 4 4 1 2 Installation 5 The files installed on the user s computer Executables spcalcd exe DOS and Windows spcalcw exe Windows spcalcx spcalc shared Linux Documentation 00readme English text file change log english text file Documentation downloadable independently from InterNet SpCalceo pdf english on line SpCalcep pdf english printable Files for graphics spcalc png
14. curve with fine resolution This part is omitted if keyword WriteCurve is set to no This part consists of six columns They contain the calculated independent X and dependent Y data the first Der1 second Der2 and third Der3 derivatives and finally the definite integral Int values For the definite integral the starting point is the smallest input x value and the last point is the actual x value These values are drawn as calculated curve on the graphics screen This table is useful 1 for quick checking of the values and 2 for calculating y values derivatives and definite integrals by interpolation e The last part is also a table beginning with the Data of Ax 3 Bx 2 Cx D s of spline title Each row of this table belongs to a range of x values surrounded by two successive points from the data file The table consists of 12 columns The lowest Xmin and highest Xmax x value of the range the coefficients A B C andD of the third degree polynomial which gives the calculated curve inside the range the function value Y Xmin the first three derivatives Der1 Xmin Der2 Xmin and Der3 Xmin and the definite integral Int Xmin atthelower boundary of the range Finally the last column gives the deviation Err Xmin at the lowest x value of the range If keyword ShowCalculus is set to yes see page 10 the x positions of the minimums maximums and the points of inflection are also given below the row of the range in que
15. e person using this software bears all risk as to the quality and performance of this software 1 2005 University of Szeged Department of Physical Chemistry CONTENTS 1 TIBUOQUCHON cene eara oi o wo de dere CREE a ede e rci i E xU Bag aoe wee 4 1 1 Theoretical Background o d area ee pope ets 4 1 25 cO Detallatioti vo c A revoir ded ae De C AB ec Weare hc Gps e dens Bat dee ace 4 1 241 DOS Windows 95 98 Millenium 2000 XP and 2003 Operating SYSTEMS acu hcec e mue OE an UM aE dh ei etu aos Sod dra 5 1 2 2 Linux Operating System 2 30 43 ex RO AUC ee a dan nod d 5 2 Using Spline Calculus 4 94 ERO dO RO e OCURRE URS 8 2 1 Data Tales a tap IR he UC ATS BG BA A a e d o ol 8 2 2 C nfig ration File g ace stes a qi UO Or Et CR UR OVE GR EDS 8 2 2 1 Keywords for the File Names aont 45 94 8 RR 9 2 2 2 Keywords for the Data to be Used llle 9 2 2 3 Keywords for the Deviations 4s 4 4 2d be Xs desee m edes 10 2 2 4 Keywords for Modifying the Outputs 00 10 2 25 Keywords for Choosing an Appropriate Graphics Driver 10 2 26 Keywords for the Appearance of the Graphics Screen 12 2 2 7 Keywords for the Display Colors 34 3 wa ROREREX 13 22 9 Other Neywotds 4 aire ated Gra Ner Ree Hie Qe eee EE ASA 14 2 3 Using Command Line Parameters x55 A HR eer OR S BA te 14 2 4 Operating on the Graphics Screen d d RS 249 IRR e ona 15 2 5 Result Fle snra e pee ERE A CE ERN poU Er oh ne
16. e icon should be created in one of the folders belonging to the Start menu or on the Desktop according to the followings e Right click on an empty area of the opened folder or the Desktop A folder can be opened in a window by 1 highlighting the name of the folder through the Start Programs or start All Programs menu 2 right clicking the name and 3 choosing the Open menu e The icon can be defined through the Shortcut option of the New menu 1 2 2 Linux Operating System It is important to note before all that the Linux variants of the program have been used successfully on Debian SuSE and Slackware distributions with KDE XCFE Window Maker Self extracting archive is not distributed for security reasons The zip file can be unpacked using e g Unzip exe which can be downloaded from the http www info zip org pub infozip UnZip html web page 6 Introduction IceWM and fvwm2 window managers The successful running is likely but not guaranteed under other systems e g GNOME The executables some parts of the documentation and the example files are to be found in the freely downloadable spcalcxf tgz spcalcxo tgz or spcalcxo64 tgz files These installation packages are identical but the first one was created under XFree with kernel version 2 4 while the latter ones were created under XOrg with kernel version 2 6 The first two ones are for 1386 compatible machines while the last one is for amd64 archi
17. e name of the data file The name can also include the full path with maximum 255 characters OutputFileName default value spcalc out The value of this keyword is the name of the result file The name can also include the full path with maximum 255 characters CalcDataFileName default value spcalc cal The value of this keyword is the name of the user output file The name can also include the full path with maximum 255 characters LogFileName default value spcalc log The value of this keyword is the name of the message file The name can also include the full path with maximum 255 characters ImageBaseFileName default value spcal The value of this keyword is the first part of the names of the image files For example if this value is plot and an image is to be saved the program searches for the plot000 png plot001 png etc files until the file does not exist in the actual directory This non existent filename is used for the image file to be saved next 2 2 2 Keywords for the Data to be Used ColumnX default value 1 The value of this keyword is the number of the column of the independent x values in the data file ColumnY default value 2 The value of this keyword is the number of the column of the dependent y values in the data file OmittedRows default value 8 The value of this keyword is the number of the rows to be skipped in the beginning of the data file ColumnError default value 8 The value of this keyword is the numb
18. er of the column of the relative deviation values see Subsection 2 2 3 in detail in the data file If the value is zero then default value is used for the relative deviations of the dependent y values It should be emphasized that if ColumnError is set i e its value is larger then zero then the data file must contain at least three columns In remark lines the first character is a hash mark The keywords are case insensitive 10 Using Spline Calculus 2 2 3 Keywords for the Deviations Initially all deviations of y values 8 are set to Ymax Umin 10 i e one millionth of the y range This value is called initial base error After the initialization the 5 values are multiplied by the relative deviations The latter values are taken from the column of the data file defined by the keyword ColumnError If no column defined for the relative deviations or the defined column contains missing values then the default value 1 0 is used for the relative deviations This default value can be changed by the keyword ErrorValue Beside the ColumnError the following keywords influences the values ErrorValue default value 1 0 If this value is set to a positive real number then this number becomes the default relative deviation value If the value of this keyword is negative then the default relative deviation is 1 0 ErrorRatio default value no This keyword should equal to the no or should start with the yes string
19. es Essentially the DISLIN GRX tiff png jpeg z and Motif related libraries should be installed to work the dynamically linked executable The exact list of the required shared libraries are the followings Under XFree with kernel 2 4 for 1386 architecture the libdislin so 9 libpngi2 so 0 libjpeg so 62 libtiff so 4 libgrx20X s0 2 libX11 s0 6 libm so 6 libc so 6 libpthread so 9 libXm so 3 libXt so 6 libz so 1 libdl so 2 lib ld linux so 2 libXmu so 6 libSM so 6 libICE so 6 libXext so 6 and libXp so 6 libraries must be present Under XOrg with kernel 2 6 for 1386 architecture thelinux gate so 1 libdislin so 9 libpng12 so 0 libjpeg so 62 libtiff so 4 libgrx20X so 2 libX11 so 6 libm so 6 libc so 6 libpthread so 0 libXm so 4 libXt so 6 libz so 1 libXau so 6 libXdmcp so 6 libdl so 2 lib ld linux so 2 libXmu so 6 libXext so 6 libXp so 6 libXft so 2 libXrender so 1 libfontconfig so 1 libfreetype so 6 libSM so 6 libICE so 6 and libexpat so 1 libraries must be present Under XOrg with kernel 2 6 for amd64 architecture the libdislin so 9 libpng12 so 0 libjpeg so 62 libtiff so 4 libgrx20X so 2 1ibX11 so0 6 libm so 6 libc so 6 libpthread so 0 libXm so 4 libXt so 6 libz so 1 libXau so 6 libXdmcp so 6 libdl so 2 1lib64 ld linux x86 64 s0 2 1libXmu so 6 libXext so 6 libXp so 6 libXft so 2 libXrender so 1 libfontconfig so 1 1 2 Installation 7 libfreetype so 6 libSM so 6 libICE so 6 and libe
20. infection points The value of this keyword is the width of these vertical lines given in pixels WidthXplace default value 1 The focus line shows the actual x value The value of this keyword is the width of the focus line given in pixels 2 2 Configuration File 13 2 2 7 Keywords for the Display Colors The colors can be defined by integer numbers The program uses either an indirect or a direct method for color definition depending on the color depth e The indirect method is used in cases of 1 2 4 and 8 bit color depth The colors are stored in a palette and each color has its own serial number A specific color can be referenced by its serial number The available colors can be displayed by the help of keyword GetColorCodes In 4 and 8 bit modes the most frequently used colors also called VGA colors have the following serial numbers black 0 red 4 dark gray 8 light red 12 blue 1 magenta 5 lightblue 9 light magenta 13 green 2 brown 6 light green 10 yellow 14 cyan 3 lightgray 7 lightcyan 11 white 15 e n cases of 15 16 24 and 32 bit modes the direct method is used It means that the integer number directly defines the color An RGB value is used to define a color The following binary representations of the integer number and five examples illustrate how the red green and blue components of the color should be given 15 bit mode 16 bit mode 24 and 32 bit mode bbbbbbbb bbbbbbbb bbbbbbbbbbbbbbbb bbbb
21. isplays The configurable options of the program can be set in the following order 1 Options are set through the command line parameters have the higher precedence 2 Options are set in the configuration file have the next precedence 3 Under Windows and Linux if the name of the data file is not set either through a command line parameter or in the configuration file then a file open dialog asks the user to choose the data file 4 Options are not set use their default values 2 1 Data File The structure of this file is simple as the sample files illustrates There can be redundant rows at the beginning of the file including titles descriptions remark etc The rest of the file contains the input data arranged in columns At least two columns must exist the values of the independent x and dependent y data The column of the deviation values see Subsection 2 2 3 in detail is optional The sequence of the data must be the same in each row If a string in the x or y column does not represent a real number the whole row is omitted If a string in the deviation column cannot be a real number the default value will be employed for 5 The x values must be in increasing sequence downward in the file If it is not so the program sorts the rows before fitting the spline If two rows has the same x value the program is stopped 2 2 Configuration File The name of the configuration file is supposed to be spcalc cfg initially The p
22. not be initialized Supported graphic modes for the available drivers are BPP color depth in bits Width and Height horizontal and vertical sizes of the graph given in pixels BPP Width Height BPP Width Height BPP Width Height BPP Width Height Driver stdvga 1 320x200 1 640x200 1 640x350 1 640x480 320x200 4 640x200 4 640x350 4 640x480 8 320x200 8 320x240 8 320x400 8 360x480 Driver stdega 1 320x200 1 640x200 1 640x350 4 320x200 4 640x200 4 640x350 Driver mach64 1 320x208 1 640x200 1 640x350 1 640x480 4 800x600 4 1024x768 4 320x200 4 640x200 4 640x350 4 640x480 8 640x480 8 800x600 8 1024x768 8 1280x1024 8 320x200 8 320x240 In this case the program is terminated after the detection and it does not carry out any calculation of course 12 Using Spline Calculus 8 320x400 8 360x480 15 640x480 15 800x600 15 1024x768 16 640x480 16 800x600 16 1024x768 24 640x480 24 800x600 Driver ati28800 1 320x200 1 640x200 1 640x350 1 640x480 4 800x600 4 1024x768 4 320x200 4 640x208 4 640x350 4 640x480 8 640x480 8 800x600 8 320x200 8 320x240 8 320x400 8 360x480 Driver VESA 1 320x208 1 640x200 1 640x350 1 640x480 4 800x600 4 1024x768 4 320x200 4 640x200 4 640x350 4 640x480 8 320x200 8 320x240 8 320x400 8 360x480 8 320x200 8 320x240 8 400x300 8 512x384 8 640x350 8 640x400 8 640x480 8 800x600 8 1024x768 8 1280x1024 15 320x200 16 320x200 15 320x240 16 320x240 15 400x300 16 400x300 15 512x38
23. nown in this manual It is described more deeply at http grx gnu de grx246um htm 14 Using Spline Calculus ColorLine default value 4 8 bit mode 1 15 bit mode 2 1 16 bit mode 2 1 24 32 bit mode 168 This color is used for the solid line of the calculated curve ColorCalculus default value 4 8 bit mode 8 15 bit mode 10579 16 bit mode 2 1130 24 32 bit mode 5526612 This color is used for the dashed and dotted vertical lines nominating the extrema and the points of inflection ColorXplace default value 4 8 bit mode 5 15 bit mode 2 1525 16 bit mode 43029 24 32 bit mode 11010216 This color is used for the focus line nominating the actual x value ColorKeys default value 4 8 bit mode 12 15 bit mode 32074 16 bit mode 64170 24 32 bit mode 16536656 This color is used for the shortcut keyns operating on the graphics screen GetColorCodes default value no In 4 and 8 bit mode if this keyword is set to yes then the colors of the actual palette are displayed and pressing any key terminates the program 2 2 8 Other Keywords JumpSize default value 1 This value determines the unit of the movement in pixels if the focus line i e the actual x value is changed SizingStep default value 0 04 If the user changes the x and or y ranges this value determines the extent of this change The value is interpreted as a relative ratio i e 0 04 means that the range is increased or decreased by 4 MaxIteration default value 1000
24. rogram looks for this file in the actual directory at first If it is not found then the name of the executable is supposed for the configuration file For example if the name of the program is spcalcw exe then the spcalcw cfg file is searched on the actual directory If the actual IPNG is the abbreviation of Portable Network Graphics Homepage http www libpng org pub png Another example for Linux if the name of the executable is spcalcx shared then the supposed name for the configuration file is spcalcx cfg 2 2 Configuration File 9 directory does not contain any configuration file then the file is searched in the directory where the program is placed If no configuration file is found the default values are used In the configuration file each line sets one option The only exception is the first one it must include the SpCalc string If a row includes a hash mark then everything behind this character including the hash mark itself is considered as remark The file can include empty lines and remark lines too An option can be set by the help of the keyword value syntax There can be space s and or tab key s before and after the sign Each option must occur after the row including SpCalc since everything is omitted before this row The following subsections detail the keywords that can be used 2 2 1 Keywords for the File Names InputFileName default value spcalc dat The value of this keyword is th
25. s They have unique color defined by keyword ColorKeys Their actions can be achieved either by pressing the appropriate key or by left clicking the name of the key with the mouse The meaning of the shortcut keys are the following using the left right up and down denotes the arrows They move the graph to the correspond ing direction without resizing The extent of this movement can be set by keyword SizingStep see page 14 F1 and F2 decreases and increases the actual x value respectively The focus line follows the actual x value The extent of this change is one pixel by default but it can be modified by keyword Jumpsize see page 14 A more flexible change of the actual x value is possible through the left button of the mouse F3 writes the actual x value itself its function value the first three derivatives and the definite integral at the actual x value into the user output file Each pressing of this key adds one new row to the file but restarting the program erases the existing user output file F4 saves the current graph into an image file using Portable Network Graphics format The image includes the upper part of the screen the base error and the average deviation values but it does not contain the current mouse position and the list of the shortcut keys The name of the image file is automatically chosen by the program as it is described
26. stion The last row of this table belongs to only the highest x value given in the data file It does not contain coefficients but the other columns are indicated 2 6 User Output File This file makes possible that the calculated results can be stored at only those independent values which are chosen by the user The name of this file is spcalc cal by default which can be changed by keyword CalcDataFileName in the configuration file seep age 9 The first two rows of this file include the version of the program and the most important conditions of the calculation These conditions are given in the same form as they are given in the first part of the result file The structure of the rest of this file is the same as that of the second part of the result file If the user presses the F3 key the program writes the function value the first three derivatives and the definite integral into this file at the actual x value Each new use of F3 key writes a new row into the file Restarting the program erases this file when the F3 key is pressed for the first time Keyword WriteCurve does not influence this file 2 7 Message File This file contains the runtime messages and error descriptions The old version of this file is always erased at the start of the program In case of automatic graphics driver and graphics mode detection see Subsection 2 2 5 the message file includes the available drivers and their modes 8These coefficients are denoted
27. tecture The first one can practically be used under any Linux distribution with kernel 2 2 or higher but it does not understand the UTF characters The installation is suggested to be done the following way e A directory should be created within the home username directory of the user in which Spline Calculus will be installed e The file spcalcxf tgz or spcalcxo tgz or spcalcxo64 tgz has be copied in the previ ously created directory and extracted with the tar xzf spcalcxf tgz or spcalcxo tgz or spcalcxo64 tgz command e The file spcalcxf tgz or spcalcxo tgz or spcalcxo64 tgz can be deleted after extrac tion Certainly there are other means of the installation If more than one users want to use the program and they do not want to have multiple copies of it on the fixed drives then the administrator root may copy the executables to the appropriate directories The above described method however does not require the help of the system administrator any user is able to carry out the installation alone Two identical executables can be found in each package The statically linked executable spcalcx surely works with any Linux distribution since it contains everything which is necessary during runtime and this form can be installed and run without the help of the root user but its size is huge It may removed if the much smaller dynamically linked one spcalcx shared works The latter executable however depends on many librari
28. the drivers of the GRX graphics library but it is not required for the use of Spline Calculus GraphResolution default value 640x480 This keyword determines the width and height of the screen in pixels i e they are the horizontal and vertical resolutions The possible standard values are 320x200 320x240 320x400 360x480 400x300 512x384 640x200 640x350 640x400 640x480 800x600 1024x768 and 1280x1024 Besides them some drivers allow arbitrary resolution within the physical limit of the memory and the graphics card In the latter case the value of this Hn Ww keyword must be two integer values width and height joined with an x without spaces These three keywords are not independent of each other only certain triplets work well The program is able to detect all correct triplets automatically The program carries out this detection and writes the possible triplets into the message file if any of the following conditions is fulfilled e The keyword GraphGRXDriver has an invalid value e The value of keyword GraphResolution does not correspond to the above rules syntacti cally e The given triplet does not correspond to a valid mode of the used graphics card e The values of the keywords GraphGRXDriver and GraphResolution are question marks For example the programmer s computer gives the following list of the valid drivers and graphics modes SplineCalculus v2 00a 20060727 has started The required graphic mode can
29. ve NumberDigits default value 7 This value determines the precision ie it gives the number of significant digits of the floating point numbers in the result file DisplayDigits default value 5 This value determines the precision i e it gives the number of significant digits of the floating point numbers on the screen 2 2 5 Keywords for Choosing an Appropriate Graphics Driver GraphColorBits default value 4 This value determines the color depth i e how many bits gives the color of one pixel on the screen The possible values are 4 8 15 16 24 and 32 In principle values 1 and 2 i e black amp white mode and CGA mode also work In these cases however there is no Such string is considered to be a missing value which is not able to represent a real number 2 2 Configuration File 11 default values for the color codes so they have to be set in the configuration file The color codes are detailed in Subsection 2 2 7 GraphGRXDriver default value VESA under DOS win32 under Windows and xwin under Linux This keyword determines the graphics driver to be used The possible values are herc stdvga stdega et4006 c15426 mach64 ati28800 s3 VESA and memory under DOS win32 and memory under Windows xwin and memory under Linux If the value of this keyword is a question mark then the program tries to detect the graphics driver automatically A detailed description can be found at http grx gnu de grx246um htm for
30. written into the result file This behavior corresponds to the ShowCalculus no setting see page 10 in the configuration file If there is no row to be omitted in the data file this behavior can be achieved by the 9 parameter value Parameter 5 is the column number of the deviation values in the data file so this value corresponds to the value of keyword ColumnError see page 9 2 4 Operating on the Graphics Screen 15 33 7 19 4 6045 X X y Y and quit Figure 2 1 The graphics screen of the program Parameter 6 corresponds to the integer number given in keyword ErrorRatio See page 10 for the interpretation of this number 2 4 Operating on the Graphics Screen If the calculation of the smoothing spline is ended the program plots the results on the screen see Figure 2 1 as an example The displayed window consists of two parts The upper framed one shows the results graphically The lower part include some actual numerical information and it enumerates the shortcut keys for operating on the screen The nominations on the graph are the followings e The input data are denoted by solid circles e The calculated smoothing spline is drawn by a solid line The points of this curve is calculated at 200 or more x values depending on the actual slope These calculated points are connected e The extrema are denoted by vertical dashed lines The line is below the calculated curve at a minimum and it is above
31. xpat so 1 libraries must be present After the installation the programs are ready to use If the directory of the Spline Calculus is listed in the PATH environment variable then the program can be started from an X terminal window with the spcalcx or spcalcx shared commands Otherwise spcalcx or spcalcx shared commands should be used The programs can also be started by clicking on an icon The creation procedure of an icon depends very much on the window manager or graphical desktop used The file spcalc png can be used as the image file of the icon There is a third option to use Spline Calculus under Linux The Windows executable spcalcw exe runs smoothly through WINE CHAPTER 2 UsING SPLINE CALCULUS The program uses simple text files both for input and output Additionally the graphical representation of the result can also be saved as PNG binary image files The program reads two files for input 1 the data file includes the experimental data and optionally their estimated uncertainties and 2 the configuration file Four kinds of output file can be written by the program 1 the result file includes the coefficients of the interpolating cubic polynomials and the curves of the graphics display 2 the user output file contains the data selected by the user through the graphics display 3 the message file includes the messages of Spline Calculus during calculations and 4 the image files contain the user selected graphics d
Download Pdf Manuals
Related Search
Related Contents
TRITURADORA DE PAPEL CORTE EN TIRAS DE 6 HOJAS View - Industry Gear Copyright © All rights reserved.
Failed to retrieve file