Curve Expert Basic & Professional - User Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 284
At a glance
Powered by AI
The document appears to be documentation for CurveExpert, a software for analyzing and modeling data. It covers topics such as working with data, modeling data, graphing results, and defining custom models.

The main sections covered include working with data, modeling data, graphing results, querying results, and defining custom models.

Some of the data manipulation techniques described include data scaling, translation, clipping, sorting, and using the built-in spreadsheet to view and edit data.

CurveExpert Basic

Release 1.4
Daniel G. Hyams
October 05, 2010
CONTENTS
1 Quick-Start Guide 3
1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 CurveExpert is Shareware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Usage Overview 5
2.1 Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Tool Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Ranking Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.6 Graph Preview Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.7 While CurveExpert is Working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.8 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Working with Data 9
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Opening and Saving Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Importing Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4 Overview: Data Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5 Data Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.6 Data Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.7 Data Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.8 Data Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.9 Getting Information about your Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.10 Using the Built-In Spreadsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Modeling your data 17
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3 Nonlinear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.4 Spline Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5 Lagrangian Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.6 Using CurveFinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.7 Calculating Groups of Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5 Graphing 29
5.1 Graphing Window Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Graphing Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3 Graphing Menu and Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
i
5.4 Graph Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5 Graph Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6 Querying Results 37
6.1 Model Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2 Analyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.3 Creating a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.4 File Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7 Dening Custom Models 47
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 User Model Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.3 Custom Model Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8 Computational Performance 51
8.1 Increasing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.2 Floating Point Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
9 CurveExpert Options 55
9.1 Application Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
9.2 Regression Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
9.3 Printing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
10 Appendix: Built-In Nonlinear Regression Models 59
10.1 Exponential Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.2 Power Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.3 Yield-Density Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
10.4 Growth Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
10.5 Sigmoidal Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
10.6 Miscellaneous Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
11 Appendix: Legal Information 63
11.1 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
11.2 Software End User License Agreement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12 About the Author 67
13 Contacting the Author 69
14 Frequently Asked Questions 71
14.1 Can CurveExpert work with more than one independent variable? . . . . . . . . . . . . . . . . . . . 71
14.2 How can I cite CurveExpert in a publication? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
14.3 Why does CurveExpert suddenly erase my curve ts off of the ranking chart? . . . . . . . . . . . . . 71
14.4 How can I increase the speed at which the graphs are updated? . . . . . . . . . . . . . . . . . . . . . 71
14.5 Why does the chi-square reported in the Information dialog not match the standard error? . . . . . . 72
14.6 Why is there a huge number for standard error and correlation coefcient sometimes? Is this a bug? . 72
14.7 As nonlinear regression progresses, the indicator for standard error (S) sometimes freezes, although
the iteration counter keeps on ticking. What is going on? . . . . . . . . . . . . . . . . . . . . . . . . 72
14.8 A spline t never matches my data at the points like it is supposed to, and sometimes has spikes and/or
wildly oscillating tendencies. Is there something amiss? . . . . . . . . . . . . . . . . . . . . . . . . 72
14.9 Lagrangian interpolation sometimes bombs with a oating point exception. What gives? . . . . . . . 73
14.10 I am using a Postscript printer driver, and my plots will simply not print in the orientation (portrait or
landscape) that I tell it to. Is there anything that I can do? . . . . . . . . . . . . . . . . . . . . . . . 73
14.11 CurveExpert saves the previous window position, and I dont want it to. How do I turn this behavior
off? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
ii
14.12 How do I obtain a debugging report to send to the author? . . . . . . . . . . . . . . . . . . . . . . . 73
14.13 Why are grid lines drawn as solid lines (instead of dotted) on some computers? . . . . . . . . . . . . 73
14.14 The Internet links pointed to by the menu items under Help|Internet are now broken. Is there any way
that I can change the addresses to the correct home page? . . . . . . . . . . . . . . . . . . . . . . . 74
14.15 The le import dialog never appears, now that I need it. How do I get it back? . . . . . . . . . . . . . 74
15 References 75
16 Indices and tables 77
iii
iv
CurveExpert Basic, Release 1.4
Contents:
CONTENTS 1
CurveExpert Basic, Release 1.4
2 CONTENTS
CHAPTER
ONE
QUICK-START GUIDE
This guide leads you through the bare minimum of information you need to know to run CurveExpert successfully.
1. Load data into CurveExpert. In this quickstart, we will simply read a sample text le supplied with CurveExpert.
Choose File|Open (see Opening Data Files) , and double click the le BEANROOT.DAT. When the File Import
(see Importing Data Files) dialog appears, simply click OK.
2. Perform all curve ts in CurveExperts library. In most cases, you can select a particular model from the Apply
Fit menu, but in this demo, well will just calculate themall. Choose Tools|CurveFinder (see Using CurveFinder),
and then press OK in the following dialog.
3. Examine the curve t information. A graph (see Graphing) for the Weibull model should now be displayed
on your screen. Right click anywhere on the graph and select Information (see Model Information). Browse
through the tabs as desired, and press Close when nished.
4. Export a table. Again right click anywhere on the graph and select Generate Table (see Creating a Table).
Navigate to a folder that you have permission to write a le to, and also type in the lename weibull.tab, and
set the minimum to 0, maximum to 2, and the increment to 0.01. Click OK. This will generate a text le with
the Weibull model evaluated within the range just given.
At this point, you can go back to the main window and double click any curve t listed in the ranking, which is in
the top right area of the main window. Double clicking these entries will display a graph for that model with the data,
and you can perform similar operations to examine the coefcients, analyze the curve, or generate more tables, among
other things.
1.1 Features
Over 35 built-in regression models to choose from, along with over 15 additional models provided as user-
dened models
User-dened models allow you to input, design, and manage your own regression functions with up to 19
parameters
Toolbox of tting techniques includes linear/nonlinear regression and many types of interpolation/spline tting.
Uses the Levenberg-Marquardt algorithm for quick and robust nonlinear regression performance.
Support for uncertainties in each data point
Unlimited number of data points.
As curve ts are applied, a ranking chart keeps track of the best to the worst models
CurveFinder examines every possible regression model for your data set and returns the best one
3
CurveExpert Basic, Release 1.4
Full-featured graphing capability with customizable, dynamic graphs gives immediate feedback on curve t
quality
User has the ability to terminate a computation at any time
Customizable plots can be copied directly to the clipboard for use in another Windows application
Easy to use point-and-click interface
Reads simple ASCII data les and can ignore comments or text in the le; le import features enable the reading
of a wide variety of les
Data set can be scaled, translated, sorted, the outliers removed, or edited by hand similarly to a spreadsheet
Analysis tools allow the location of exact points on the curve t as well as differentiation and integration of any
model.
Full featured toolbar and status bar increase your productivity
1.2 CurveExpert is Shareware
If you intend to keep this program, please register it so that I can continue development and support of this program.
Registration is quick, easy, and inexpensive the fee is only $45.00.
See http://www.curveexpert.net for more information on the platforms supported by CurveExpert. High school or
college students are eligible for a student discount; simply include a copy of your university or high school ID. Send
your registration today! You may also read over the benets of registering section for extra information on registering.
If you have already registered, I extend a warm welcome and thank you. If you have any suggestions, or there is any
regression model that you would like to see added to the repertoire, please send me mail or e-mail right away. I will
gladly to listen to your comments. Development of this software has taken countless hours of study, programming,
and debugging. Please support the shareware concept and register the software if you intend to keep and use it! The
future of this product depends on the response that I receive from you, the user. If you would like for this project to
continue and grow, please send suggestions and register, if you use this program.
4 Chapter 1. Quick-Start Guide
CHAPTER
TWO
USAGE OVERVIEW
The CurveExpert main window is divided into ve main parts: the data window, ranking chart, the toolbar, menu bar,
and the status bar. A sample CurveExpert window is shown below:
5
CurveExpert Basic, Release 1.4
2.1 Menu Bar
Like all Windows applications, you can select items off of the menu bar to accomplish certain tasks. To nd out what
each menu item does, click here.
2.2 Tool Bar
The toolbar gives access to frequently used commands. Watch the status bar (at the bottom of the main window) as
you move the mouse across each button to nd the function of each one of these buttons.
2.3 Status Bar
The status bar shows you the current status of CurveExpert and gives you help on the function of the toolbar buttons.
2.4 Data Window
This window is the spreadsheet-like interface that occupies the left side of the CurveExpert main window. The data
window holds all of the data that is to be modeled. The rst column of data is the x data, while the second column
holds the y data. As of this version of CurveExpert, the third column is not used. To edit a data point, simply click the
cell that it is in and type in the new value.
2.5 Ranking Chart
The ranking chart ranks all of the valid regression models from best to worst. The standard error and correlation
coefcient (described in detail in the Data Modeling section) are used to determine these rankings. Selecting an entry
in this chart causes it to be previewed in the Graph Preview Area, and double-clicking an entry opens a graphing
window for that particular t. Note that interpolations are not included on this list.
2.6 Graph Preview Area
The graph preview area shows the currently selected plot in the ranking chart (above), as a small thumbnail, so that you
can quickly visualize different curve ts without opening a large number of graphing windows. This preview window
also gives the capability of watching a regression as it progresses to convergence.
The graph preview area on the CurveExpert main window gives you an easy way to quickly visualize various curve
ts that have been performed. As a regression is completed, an entry appears for it in the ranking chart (also on the
CurveExpert main window). Clicking an entry in the ranking chart causes the plot preview area to generate a graph of
that particular regression. If no regression is selected, the preview area simply shows the data present in the built-in
spreadsheet. Note that the preview area will update every time the data set is changed, so it always reects the latest
changes to the data set.
The preview area also gives the capability to visualize regressions as they progress to convergence. At the end of each
iteration, the preview is redrawn with the latest estimates of the parameters. The result is an animation of the curve
t as it attempts to achieve the best estimate of your data. For animations to occur, the Enable Animations menu item
must be checked (see below). Note that the colors, axes, etc. of the plot preview area are determined by the default
6 Chapter 2. Usage Overview
CurveExpert Basic, Release 1.4
plot setup, and cannot be customized directly. To open a plot that is customizable, double-click the plot preview, and
a full graphing window will appear which can be manipulated as desired.
Right-clicking on the preview area shows a menu that allows you to customize the behavior of the preview. The items
are listed below:
2.6.1 Enable Preview
Turn the preview area on or off. When on, the preview area has the behavior described in the documentation above.
When off, the preview does not draw any graphs. If the data and/or curve t takes a signicant amount of time to
regenerate, you might want to turn previews off. Default: On
2.6.2 Enable Animations
Turn preview animations on or off. When on, the preview area graphically shows the progression of a regression
to convergence during a calculation. When off, no updates occur during a calculation. If fast performance is a key
issue, then you might want to disable animations obviously, time is added to each iteration to redraw the preview area.
Default: On
2.6.3 Open Plot
Open a graphing window for the plot shown in the preview area. This can also be accomplished by double-clicking
the preview area.
2.6.4 Help
Get help on how to use the graph preview area.
2.7 While CurveExpert is Working
While the calculation proceeds, you can watch the status bar to see what regression is being calculated, the itera-
tion number, and (most importantly) the current chi-square value of the model as the nonlinear regression algorithm
progresses. The chi square lets you know how well the model is currently tting the data, and it should be steadily
decreasing, in an optimum situation. When CurveExpert is working, the toolbar andmenus are disabled except for two
new buttons on the far right hand side of the toolbar. Note that for interpolations and linear regressions, each button has
the same meaning. They will both terminate the calculation immediately and no results will be shown. Also note that
if background processing is disabled, these buttons will also be disabled; in effect, the ability to stop the calculation
(in a graceful manner) is lost if background processing is disabled.
2.7.1 Yellow Check: (Keyboard Equivalent: ESCAPE)
Press this button to stop the computation for a particular curve t. The parameters are accepted as they are; this button
is handy when the standard error has dropped to a stable value, but CurveExpert is continually tweaking the values
of the parameters to arrive within the tolerance bounds set in the File|Preferences dialog. Selecting this button will
accept the current parameters as they are. The same operation can be accomplished by pressing Esc on the keyboard.
2.7. While CurveExpert is Working 7
CurveExpert Basic, Release 1.4
2.7.2 Red Stop Sign: (Keyboard Equivalent: SHIFT+ESCAPE)
Press this button to abort all calculations immediately. The same operation can be accomplished by pressing Shift+Esc
on the keyboard.
2.8 Printing
2.8.1 Dataset
Choose Print from the main menu to generate a hardcopy of the data set. The data set will be printed in two columns
of x and y data, and each point is labeled sequentially. If the printer is not set as desired, press the Setup button and
congure the printer. Pressing OK will commence printing, and pressing the Cancel button will return you to the
CurveExpert main window.
2.8.2 Graphs
To print a graph, right click on a graph, and select Print. Selecting this menu item prints a hardcopy of the current
plot. A print dialog will be shown that will allow you to select printers and change the print setup. If the printer is not
set as desired, press the Setup button and congure the printer. Pressing OK will commence printing, and pressing the
Cancel button will return you to the CurveExpert graph window.
Note that you may select whether the printout will be in color or black and white by selecting the Black and White
and Color radio buttons at the bottom of the dialog. If you have a black and white printer and select a color plot, then
the plot will be grayscaled before it is sent to the printer.
8 Chapter 2. Usage Overview
CHAPTER
THREE
WORKING WITH DATA
3.1 Introduction
CurveExpert supports a exible text le format for easy data import and supports four types of data manipulation after
the le has been read.
3.2 Opening and Saving Data Files
Data les in CurveExpert are simply two-column text les with the rst column for the x data, and the second column
for the y data. See Data Requirements for more information on the permissible format of a CurveExpert data le.
3.2.1 Opening Data Files
Simply choose the le that you want to use, and CurveExpert will read that le, examine it, and display the data in
the main window for manipulation. If necessary, you may manually edit the data or use the data manipulation features
included in the Data menu. You are now ready to perform some curve ts on the data using the Apply Fit or Interpolate
menu.
Note that you may select the Read Only checkbox to prevent the le that you have opened from being written to at
any time during a CurveExpert session. This keeps accidental saves from overwriting possibly valuable comments and
data in the le that was initially opened. A protected/read-only les name will appear in the status bar in red.
While CurveExpert reads a le, the status bar shows the state of the le being read. The rst section of the status bar
shows the le name, the second section shows the number of lines parsed, and the third section shows the number of
data points read. Finally, the last section shows the action being taken (SCANNING or READING). On each le read,
CurveExpert scans the le on the rst pass, and reads the le on the second pass.
3.2.2 Saving Data Files
Data les will be written in two column form with no headers or footers. A tab separates the rst and second columns.
Note that if a data le that contains comments is read into CurveExpert and subsequently saved over the same le, the
original comments are lost.
While CurveExpert saves a le, the status bar shows the state of the le being written to. The rst section of the status
bar shows the le name, the second section shows the number of lines written, and the third section shows the number
of data points written. Since CurveExpert writes one data point per line, these numbers will be identical. Finally, the
last section shows the action being taken (WRITING).
9
CurveExpert Basic, Release 1.4
3.2.3 Data File Requirements
CurveExpert reads a plain ASCII text le, which consists of columns. You can produce these text les by hand, by
spreadsheet, or any other method that can produce two columns of data. Note that the type of delimiter in the data le
is irrelevant the columns need only be separated by a nonnumeric character. Therefore, the data le may have tab,
space, or comma delimited data.
Comments may be interspersed freely within the data les, with the only restriction being that comments must either
be placed on a line by themselves or after any data on that line. Note again that there must be two numbers on a line
for the data to be read correctly, and that if a line starts with a number, it is assumed to be a data line. If it starts with
a nonnumeric character, the line is assumed to be a comment. Here are two examples, where the user wants all of the
numeric data in the le to be read into CurveExpert:
Incorrect:
1.0
2.5
2.0
2.7
2.5
2.9
this is text 2.9
3.1
3.1
3.2
Correct:
1.0
2.5
2.0
2.7
2.5
2.9
2.9
3.1 this is text
3.1
3.2
When CurveExpert reads the rst example, it assumes that the line with this is text is a comment, and that line is
discarded. In the second example, the line with the comment starts with a number and is read correctly.
3.3 Importing Data Files
CurveExpert allows a large amount of exibility when reading data les. A column can be added to the data set,
columns can be skipped. As soon as a le is selected to be read [note that for this to be true, the Always Show Import
Dialog setting in Tools|Options must be checked] , the le import dialog is displayed, allowing the user to select the
manner in which the le should be read. If the le is a simple two column data le, then the default settings in each
eld are adequate. The File Import dialog is shown below, and explanations of each item contained within it follow.
10 Chapter 3. Working with Data
CurveExpert Basic, Release 1.4
3.3.1 File Import Control Buttons
OK: Press the OK button when all options have been set to your liking, and you are ready for the le to be read.
Cancel: Press the Cancel button to abort the reading of a le. The previous data set will still be intact.
Help: Press Help to get help on using the File Import dialog.
3.3.2 Summary Information
The full path to the le selected is stated rst in the Filename eld. Then, the number of data points and columns
that CurveExpert has detected in the data le is specied. This information should be checked whenever a le is read
to ensure that the le contains the expected data in a valid format. See Data File Requirements for more information
on this topic.
3.3.3 User-Selectable File Options
Along the left side of the dialog, the user-selectable options are listed. Place the rst column that should be read from
the data le in theFirst Column to Read eld. Specify the number of columns to read in theNumber of Columns to
Read eld. The default values for these elds are to start on the rst column and read all columns in the data le. If
theAutoll Independent Variable option is selected, then CurveExpert will automatically ll the independent variable
(x) data column with a linear sequence. The rst number in this sequence is specied in theMinimum eld, and the
increment is specied in theIncrement eld. Autolling adds one column to the data set. The provided column will be
the length specied in the Number of Points Detected information eld. If the data set contains a column that should
be interpreted as standard deviation data (uncertainty data) for the dependent variable (y), then select theLast Column
is Standard Deviation Data checkbox. CurveExpert will use the last column read as the standard deviation data.
3.3. Importing Data Files 11
CurveExpert Basic, Release 1.4
3.3.4 Dataset Results
The region labeled Dataset Results gives the result of the combination of the read data le and the user-selectable
options. The number of independent variables, dependent variables, and columns is specied here. Also, whether the
data set contains standard deviation data is also given. If the le is not yet valid to be read, asterisks appear in these
elds. Adjust the user-selectable items until the desired values appear in the dataset results. Note that CurveExpert
can only accept one independent variable and one independent variable at this time.
3.3.5 Show This Dialog Next Time
If you are always reading simple two-column text les, then this dialog can be suppressed. Deselect theShow This
Dialog Next Time checkbox before exiting this dialog to accomplish this. To regain access to this dialog at a later
time, select Tools|Options and re-check Always show le import dialog.
3.4 Overview: Data Manipulation
Manipulating your data using the built-in features of CurveExpert can be very benecial to curve t performance.
Please review theAvoiding Floating Point Exceptions <fpe.html>_ section. All data manipulation options are orga-
nized into a dialog that is obtained via the Data|Manipulate menu.
At any time, you can always click on the numbers in the built-in spreadsheet and modify the numbers. Also, if you
click on the row one past the end of the dataset (or press return while modifying the last row of a dataset), CurveExpert
12 Chapter 3. Working with Data
CurveExpert Basic, Release 1.4
will allow you to add a new data point by typing directly into the spreadsheet.
3.5 Data Scaling
To obtain the best curve tting performance, you should scale your data to order one if the data is extremely large or
small. Review the Floating Point Exceptions and Performance Issues sections for reasons why you might want to scale
your data.
The Data Manipulation dialog box is the control that you use to multiply your data set by a scaling factor. After
opening this box via the Data|Manipulate menu choice, press the Scale tab. To scale your data set, type in the
desired scale factor into the scaling elds, and select the Enable buttons if you want a scale factor to be applied
to the indicated column of data. Leaving the Enable checkboxes unselected means that CurveExpert will ignore
the factor in the corresponding eld. Finally, click the Apply button; the results of the scaling will immediately be
apparent in the main windows spreadsheet.
Note that after scaling the data, CurveExpert does not automatically get rid of the current curve ts (to prevent work
that you have done from being lost). If you wish to clear the curve t cache, then select Tools|Clear Curvets.
3.6 Data Translation
Translating your data by a xed additive factor can remove a known bias from the data set, as well as allow a better
choice of a function to model the data. The Data Manipulation dialog box is the control that you use to add a factor to
your data set. After opening this box via the Data|Manipulate menu choice, press the Translate tab.
To translate your data set, type in the desired translation factor into the scaling elds, and select the Enable buttons
if you want translation to be applied to the indicated column of data. Leaving the Enable checkboxes unselected
means that CurveExpert will ignore the factor in the corresponding eld. Finally, click the Apply button; the results
of the translation will immediately be apparent in the main windows spreadsheet.
Note that after translating the data, CurveExpert does not automatically get rid of the current curve ts (to prevent
work that you have done from being lost). If you wish to clear the curvet cache, then select Tools|Clear Curvets.
3.7 Data Clipping
Clipping (or pruning) your data means to remove any outliers that might contaminate a curve t which is applied to
your data set. This operation clips the data at a given x/y maximum and minimum. The Data Manipulation dialog
box is the control that you use to clip outliers from the data set. After opening this box via the Data|Manipulate menu
choice, press the Clip tab. Fill in the desired maximum and minimum for the x/y data, and press the Apply button.
The results of the data clipping operation will be immediately apparent in the main windows spreadsheet.
Note that after clipping the data, CurveExpert does not automatically get rid of the current curve ts (to prevent work
that you have done from being lost). If you wish to clear the curve t cache, then select Tools|Clear Curvets.
3.8 Data Sorting
CurveExpert can sort the entire data set, using the either the independent variable (x) or the dependent variable (y) as
the key. When this operation nishes, all of your data will be in order of the key that was chosen. This operation is
crucial for interpolation-type data ts. The Data Manipulation dialog box is the control that you use to sort the data
set. After opening this box via the Data|Manipulate menu choice, press the Sort tab. To sort the data set, choose
the appropriate sort key (x or y) and press the Apply button. The results of the sorting operation will be immediately
3.5. Data Scaling 13
CurveExpert Basic, Release 1.4
apparent in the main windows spreadsheet. If the independent variable (x) is used as the key, the result of the sorting
will be a data set that is in order with increasing x. Conversely, if the dependent variable (y) is used, the data set will
be in order with increasing y.
Note again that sorting the data set on x is crucial for interpolation type curve ts.
3.9 Getting Information about your Data
The data information dialog gives you statistical information about the current data set in CurveExpert; select
Data|Information from the main menu. First, the number of data points in set is given, along with the memory re-
quirement of storing that data. Note that the memory allocated statistic shows the total amount of memory allocated
for data, curve ts, and open graphing windows.
Other statistics given by this dialog are the average, minimum, maximum, and standard deviation from the mean of
both the x and y data. The average is a simple arithmetic average, which is dened as
y =
1
n
n

i=1
y
i
The standard deviation fromthe mean describes the scatter of the data set around the average (higher standard deviation
means more scatter):
=

n
i=1
(y
i
y)
2
n 1
14 Chapter 3. Working with Data
CurveExpert Basic, Release 1.4
3.10 Using the Built-In Spreadsheet
3.10.1 Cutting from Another Application and Pasting into the Spreadsheet
The spreadsheet supports cut/paste operations between CurveExpert and commercial spreadsheets and/or applications;
this expedites the moving of data from a spreadsheet to CurveExpert, or from CurveExpert to the spreadsheet.
For best results, if you are pasting in an entire dataset into an empty spreadsheet, do not select any cells in the
spreadsheet. Just selectEdit|Paste, and CurveExpert will read the clipboard data into the built-in spreadsheet.
Warning: Not following the rules above might result in an undesired (0,0) pair inserted at the end of your dataset,
and this data point WILL affect any curve t calculations. So, watch for this occurrence, after you nish entering
data and/or pasting in data. If the (0,0) pair is there, simply click on its row header and choose Edit|Cut to get rid
of the unwanted point.
CurveExpert features a built-in spreadsheet for editing your data. This spreadsheet strongly resembles commercial
packages such as Excel in operation and in appearance. To edit a particular point, simply click in its cell; a black
selection rectangle will appear along with a blinking caret. The data in the cell may then be edited. To select a range
of data, click the left mouse button and drag the mouse until the desired data is highlighted.
The headings across the top of the spreadsheet indicate the type of data in each column. The X column denotes
the independent variable, the Y column denotes the dependent variable, and the STD column (if present) contains
standard deviation data for each data point. The row headings down the left side of the spreadsheet specify the data
point number. To select the entire spreadsheet, click the button in the upper left corner. To select an entire row or
column, click the row or column header, respectively. The horizontal and vertical scrollbars at the bottom and left
side of the spreadsheet allow you to scroll to different areas of the spreadsheet, if necessary. To navigate within the
spreadsheet, use the arrow keys. Pressing the TAB or ENTER keys will intelligently navigate the selector to the
next position in the spreadsheet in a Z-pattern (across, then down). Holding SHIFT while pressing either the TAB or
ENTER keys will navigate in exactly the opposite manner. Note that you may use the TAB or ENTER to add new
points to the data set. To add a column, click on the empty column directly to the right of the rightmost column. To
delete a column, select an entire column and pick Cut or Clear from the Edit menu. Note that column removal is
only available if the data set still has a dependent and independent variable; likewise, column addition is only available
if standard deviation data is not yet present. Addition of a data point to the data set is a simple as picking the row
below the bottommost row in the data set. All of the operations in the Edit menu will operate on the current selection
in the spreadsheet. A multi-level undo/redo allows you to remove editing mistakes from the data set. Undoable actions
include replacing a data point, range clears, and range inserts. Any action that can be undone can also be redone.
Undo <item>: Undo the last edit in the built-in spreadsheet. The <item> clause identies which action will be
undone. Note that this undo mechanism is a multi-level; you may undo several actions in sequence. Items that
can be undone include replacing a data point, typing in the edit control, clearing a range, or inserting a range. If
no undo action is available, this option will be dimmed.
Redo <item>: Redo the last undone action in the built-in spreadsheet. The <item> clause identies which un-
doable action will be redone; this will always be the last action that was undone. Note that this redo mechanism
is a multi-level; you may redo several undo actions in sequence. Any item than can be undone can be redone. If
no redo action is available, this option will be dimmed.
Cut: Remove the selection in the built-in spreadsheet and place it in the clipboard. This is functionally equivalent
to selecting Copy, and then Clear. If no selection is valid in the spreadsheet, then this option is dimmed.
Copy: Copy the selection in the built-in spreadsheet to the clipboard. If the edit control in the spreadsheet is
active, only the selected text is copied. If a selection has been made in the spreadsheet, then the block is copied,
in tab delimited format, to the clipboard. Note that this can be pasted directly into another region in the built-in
spreadsheet, word processing applications, or commercial spreadsheet applications. If no selection is valid in
the spreadsheet, then this option is dimmed.
3.10. Using the Built-In Spreadsheet 15
CurveExpert Basic, Release 1.4
Paste: Paste the contents of the clipboard at the caret, if the edit control in the spreadsheet is active and only
one value is detected on the clipboard. If more than one point is detected on the clipboard, then the selector
serves as the insertion point for the paste operation. If the number of columns on the clipboard does not match
the number of columns in the data set, then zeros are lled in the space to the side(s) of the pasted columns. If
one row is selected at the time of the paste, the row is deleted, and the contents of the clipboard are pasted in
its place. If a range selection is active in the built-in spreadsheet at the time of the paste, then the extent of the
range must equal the number of rows and columns on the clipboard. The data is simply pasted over the selection
if they match. If they do not match, then the paste operation fails. If no text is available from the clipboard, then
this option is dimmed.
Clear: Remove the selection in the built-in spreadsheet. If the edit control is active, only the selected text is
removed. If a range selection is active, then it is erased from the data set, and the appropriate rows are shifted
upward to take the selections place.
16 Chapter 3. Working with Data
CHAPTER
FOUR
MODELING YOUR DATA
4.1 Introduction
Given a set of data points, often called observations, a common need is to condense the data by tting it to a model
in the form of a parametric equation. This model equation can be anything that the user desires it can range from
a simple polynomial to an extremely complex model with many parameters. One important consideration in selecting
an appropriate model is the underlying law that the data represents. Optimally, the model should be chosen to reect
that law so that the parameters in the curve t have physical interpretation and meaning.
Data modeling may be performed by several techniques: interpolation, regression, or data smoothing. Interpolation
and regression are the types supported by CurveExpert. Interpolation guarantees that the tted curve will pass through
each and every data point. Regression simply ensures that the merit function, which is an arbitrary function that
measures the disagreement between the data and the model, is minimized. In this approach, the model parameters
are adjusted until the merit function becomes as small as possible. One of the features of CurveExpert is the large
number of nonlinear regression models that are available. This type of model is the most commonly used in real-world
applications.
4.2 Linear Regression
All linear regressions are accessible in the rst half of the Apply Fit menu.
Models which consist of a linear combination of a particular set of functions X
k
are called linear models, and linear
regression can be used to minimize the difference between the model and data. The general form of this kind of model
is
y(x) =

a
k
X
k
(x)
where X
k
(x) are xed functions of x that are called the basis functions, and a
k
are the free parameters. Note that linear
refers only to dependence of the model on the parameters a
k
; the functions X
k
(x) may be nonlinear. Minimization of
the above linear model is performed with respect to the merit function
S(a) =
n

i=1
_
y
i

np

k=1
a
k
X
k
(x
i
)
_
2
The minimum of the above equation occurs where the derivative of S with respect to the parameters disappears.
Substituting the linear model into this function, taking the rst derivative, and setting this equal to zero gives the
normal equations that can be solved directly for the parameters a
k
.
17
CurveExpert Basic, Release 1.4
4.2.1 Linear Regression Models
In CurveExpert, all of the linear models implemented are linear combinations of x
n
. These models are listed below:
Linear Fit y = a+bx
Quadratic Fit y = a+bx+cx^2
Polynomial Fit y = a+bx+cx^2+dx^3+....
Setting the Polynomial Degree
For a polynomial regression, you must supply what degree of polynomial that you would like; CurveExpert will prompt
you for that information. Polynomials usually tend to give decent curve ts to almost any data set, but higher order
polynomials (as a rule of thumb, over 9) tend to oscillate badly. Also, polynomials offer no insight into the model that
governs the data.
Note that you may not choose a polynomial degree greater than or equal to the number of points in the data set minus
one. A polynomial degree equal to the number of points in the data set minus one is simply interpolation, and that type
of curve tting can be obtained via the Interpolation menu. Degrees greater than the number of data points cause an
overconstrained problem, to which the solution is undened. Note also that you may not choose a polynomial degree
of one or two; use the built-in linear and quadratic curve ts instead. In short, the polynomial degree that you can enter
in this dialog box is limited to 2 < degree < n-2.
4.3 Nonlinear Regression
All nonlinear regressions are accessible in the last half of the Apply Fit menu. These models include the CurveExpert
built-in models, as well as any user dened models that you have designed.
This program uses the Levenberg-Marquardt method to solve nonlinear regressions. This method combines the
steepest-descent method and a Taylor series based method to obtain a fast, reliable technique for nonlinear optimiza-
tion. This statement will be repeated later, but can bear stating at the beginning of this discussion: neither of the above
optimization methods are ideal all of the time; the steepest descent method works best far away from the minimum,
and the Taylor series method works best close to the minimum. The Levenberg-Marquardt (LM) algorithm allows for
a smooth transition between these two methods as the iteration proceeds. In general, the data modeling equation (with
one independent variable) can be written as follows:
y = y(x; a)
18 Chapter 4. Modeling your data
CurveExpert Basic, Release 1.4
The above expression simply states that the dependent variable y can be expressed as a function of the independent
variable x and vector of parameters a of arbitrary length. Note that using the ML method, any nonlinear equation with
an arbitrary number of parameters can be used as the data modeling equation. Then, the merit function we are trying
to minimize is

2
(a) =
n

i=1
_
y
i
y(x
i
; a)

i
_
2
where N is the number of data points, x
i
denotes the x data points, y
i
denotes the y data points, si is the standard
deviation (uncertainty) at point i, and y(x
i
; a) is an arbitrary nonlinear model evaluated at the ith data point. This
merit function simply measures the agreement between the data points and the parametric model; a smaller value for
the merit function denotes better agreement. Commonly, this merit function is called the chi-square.
Now, we will take a step back to provide a framework of optimization methods. From the area of pure optimization,
which will not be explained here, two basic ways of nding a function minimum are a Taylor series based method and
the steepest-descent method. The Taylor series method states that sufciently close to the minimum, the function can
be approximated as a quadratic. Without detailed explanation of that method, a step from the current parameters a to
the best parameters amin can be written as
a
min
=a
cur
+H
1
_

2
(a
cur
)

where H is the Hessian matrix (a matrix of second derivatives). If the approximation of the function as a quadratic is a
poor one, then we might instead use the steepest-descent method, where a step to the best parameters from the current
parameters is
a
min
=a
cur
c
2
(a
cur
)
This equation simply states that the next guess for the parameters is a step down the gradient of the merit function.
The constant c is forced to be small enough that a small step is taken and the gradient is accurate in the region that the
step is taken.
Since we know the chi-square function, we can directly differentiate to obtain the gradient vector and the Hessian
matrix. Taking the partial derivatives of the merit function with respect to a gives

2
a
k
= 2
n

i=1
y
i
y(x
i
; a)

2
i
y(x
i
; a)
a
k
To obtain the Hessian matrix, take the gradient of the gradient above (so that we have a matrix of partial second
derivatives):

2
a
k
a
l
= 2
n

i=1
_
1

2
i
y(x
i
; a)
a
k
y(x
i
; a)
a
l

y
i
y(x
i
; a)

2
i

2
y(x
i
; a)
a
l
a
k
_
Now, for convenience, dene the gradient vector and the curvature matrix as
G
k
=
1
2

2
a
k
=
n

i=1
_
y
i
y(x
i
; a)

2
i
y(x
i
; a)
a
k
_
C
kl
=

2

2
a
k
a
l
=
n

i=1
_
1

2
i
y(x
i
; a)
a
k
y(x
i
; a)
a
l
_
[Note that the second derivative term in C will be ignored because of two reasons: it tends to be small because it is
multiplied by (y-yi), and it tends to destabilize the algorithm for badly tting models or data sets contaminated with
outliers. This action in no way affects the minimum found by the algorithm; it only affects the route in getting there.]
So, the Taylor series method (inverse Hessian method) can be written as the following set of linear equations:
np

k=1
C
kl
a
l
= G
k
[1]
4.3. Nonlinear Regression 19
CurveExpert Basic, Release 1.4
where NP is the number of parameters in the model that is being optimized. This linear matrix will be our workhorse
for this method after some modication; it can be solved for the increments da that, when added to the current approx-
imation for the parameters, gives the next approximation. Likewise, we can substitute our convenient denitions
into the steepest descent formula to obtain
a
l
= cG
l
[2]
Neither of the aforementioned optimization methods are ideal all of the time; the steepest descent method works best
far away fromthe minimum, and the Taylor series method works best close to the minimum. The Levenberg-Marquardt
(LM) algorithm allows for a smooth transition between these two methods as the iteration proceeds.
The rst issue in deriving the LM method is to attach some sort of scale to the constant c in the steepest-gradient
method (equation 2). Typically, there is no obvious way to determine this number, even within an order of magnitude.
However, in this case, we have access to the Hessian matrix; examining its members, we see that the scale on this
constant must be 1/C
ll
. But, that still may be too large, so lets divide that scale by a nondimensional factor (l) and
plan on setting this much larger than one so that the step will be reduced (for safety and stability).
The second issue to formulate the LM method is noting that the steepest-descent and Taylor series methods may be
combined if we dene a new matrix Mij by the following:
M
ii
= C
ii
(1 +), i = j
M
ij
= C
ij
, i = j
This matrix combines equations [1] and [2] into a convenient and compact form. So nally, we have a means of
calculating the step da in the parameters by the following system of linear equations:
np

k=1
M
kl
a
l
= G
k
[3]
Note that when l is large, the matrix M is forced to be diagonally dominant; consequently, the above equation is
equivalent to the steepest descent method (equation 2). Conversely, when the parameter l goes to zero, the above
equation is equivalent to the Taylor series method (equation 1). So, we vary l to switch between the two methods,
continually calculating a parameter correction da that we apply to our most recent guess for the parameter vector. The
steps that are taken in the LM algorithm are as follows:
1. Compute
2
(a)
2. Pick a conservative value for (0.001 in CurveExpert)
3. Solve the linear equations (equation 3) for a
4. Evaluate
2
(a +a)
5. If
2
(a +a) >=
2
(a), increase by a factor (10 in CurveExpert) and go back to step [3].
6. If
2
(a +a) <
2
(a), decrease by a factor (10 in CurveExpert), correct the parameter vector by a = a +a,
and go back to step [3].
Iteration is stopped when |
2
(a + a)
2
(a)| < . This tolerance is the value specied in the File|Preferences
dialog.
4.3.1 Setting Initial Guesses
All nonlinear regression algorithms require initial guesses to commence the search for the optimum regression param-
eters. As long as AutoGuess isenabled, CurveExpert normally will calculate initial guesses for all built-in nonlinear
regressions (linear regressions do not require initial guesses) for you automatically. However, in the case of a poorly
20 Chapter 4. Modeling your data
CurveExpert Basic, Release 1.4
performing curve t, you might want to set these initial guesses manually. Also, you must set these initial guesses
manually if you are using a user-dened nonlinear regression model.
In many cases, the physical interpretation of the individual parameters in a regression model may not be clear; hence,
an inordinate amount of time can be spent simply trying to obtain appropriate initial guesses. To facilitate this process,
CurveExpert provides a dynamic view plot which adjusts itself every time you adjust the initial parameters. This
allows you to see the behavior of the curve, and adjust the parameters by hand in such a way that the curve is fairly
close to the data points. To display this plot, simply click the Show Plot button. Subsequently, any changes you make
to the initial guesses will be shown immediately on the dynamic view plot.
Hint: The plot drawing speed is increased automatically by CurveExpert; it increases the Resolution parameter. To
increase speed even more, right click on the plot window, choose Attributes off of the popup menu, and increase the
Resolution parameter further.
The initial guess window is shown below:
Initial Guess Control Buttons
OK: Press OK to accept the initial guesses entered in the Parameter Guesses section and let CurveExpert perform
the nonlinear regression.
Cancel: Press Cancel to abort the regression and return to the main CurveExpert window.
4.3. Nonlinear Regression 21
CurveExpert Basic, Release 1.4
Help: Press Help to get CurveExpert help on setting initial guesses for a nonlinear regression.
Model Display
To ensure that the meaning of the parameters is clear, this display shows you the equation for the model that you are
providing initial guesses for.
Parameter Guesses
Guess Listbox/Edit Control: Enter an initial guess for each parameter in the corresponding eld. Refer to
the Model Display for the use of each of the parameters in your nonlinear regression model. The number of
parameters required for you to enter will match the number of parameters that are in the model, and you may
scroll up or down as necessary.
Show Plot: Click this button to dynamically view the changes that you make to the regression parameters. This
will greatly assist you in obtaining good initial estimates for the parameters.
4.3.2 Regression Weighting Schemes
CurveExpert implements ve different types of regression weighting schemes, so that you have a range of methods
to choose from. Weighting allows the user to dene how much inuence each data point will have on the nal set of
tted parameters; a large weight denotes that a particular point inuences the parameters more (pulls the curve toward
itself strongly), and a small weighting on a data point decreases its effect on the parameters. Select Tools|Weighting
Schemes to pick the weighting to use for a particular curve t. Only one can be selected at a time; the currently
selected scheme is denoted by a check in the menu mentioned above.
The particular type of weighting used in a curve t is reported in the Graph Information page of the Graph Properties
dialog. Also note that weighting only has inuence on regressions; any item from the Interpolation menu will not be
affected by weighting, since (by denition) interpolations must go through each data point. The types of weighting
offered by CurveExpert are the following:
None
The regression is performed as is, and no weighting is applied during the curve tting process. This is the most
common type of regression analysis; each point has equal inuence on the nal converged curve. No weighting is
equivalent to weighting each data point by 1.0.
By Uncertainty
The regression is weighted based on the supplied uncertainties in each data point. The uncertainties (in the STD
column in the built-in spreadsheet) are interpreted as one standard deviation around the data point. So, during the
regression, the calculation will be weighted by
1

2
i
The data points with high uncertainty will contribute less to the converged curve, and data points with low uncertainty
will contribute more. This menu choice is not available if CurveExpert detects that no standard deviation data is
present in the built-in spreadsheet. Also, if a le that has standard deviation data is read in, CurveExpert automatically
selects uncertainty weighting for you.
22 Chapter 4. Modeling your data
CurveExpert Basic, Release 1.4
By 1/x
This type of weighting is rarely used, but weights each data point by the inverse of its x value. Be wary to *not* use
this type of weighting when negative x data exists in the data set.
By 1/x^2
This type of weighting is rarely used, but weights each data point by the inverse of its x value squared. The farther the
point is from x=0, the less inuence it will have in the nal parameter set. This type of weighting is sometimes used
when it is known that the uncertainty is a percentage of the independent variables value.
By 1/y
This type of weighting is rarely used, but weights each data point by the inverse of its y value. Be wary to *not* use
this type of weighting when negative y data exists in the data set.
By 1/y^2
This type of weighting is sometimes used when uncertainties in each data point are not known, but when the uncertainty
tends to be a percentage of the measured y value. The larger the y value is, the less weight a particular point has.
4.4 Spline Interpolation
CurveExpert implements four types of spline interpolation: linear/quadratic/cubic splines, and tension splines.
Warning: The data must be sorted for spline interpolations to complete successfully. To sort your data, choose
Data|Manipulation from the main menu and select the Sort tab.
4.4.1 Linear Splines
Linear splines are the simplest form of spline they simply approximate the range between data points by a straight
line. The purest denition of a linear spline is that is simply ensures that each discrete spline matches the data points.
These splines are simply a connect-the-dot approach that can be useful in increasing the resolution of a given table
of values by using linear interpolation between each point. However, if this is the application, cubic splines provide a
much more accurate representation between the data points.
Note also that the data must be sorted for the spline operation to complete successfully. To sort your data, choose
Data|Manipulate and select the Sort tab.
4.4.2 Quadratic Splines
Quadratic splines interpolate the range between data points by a 2nd order polynomial (quadratic). Quadratic spline
curve tting ensures that each spline is equal to the data points, and that the 1st derivative of the splines are continuous,
even at the knots. Quadratic splines performbetter than simple linear splines, but are often characterized by swinging
too high or too low past the data points.
Quadratic splines must have one free condition specied for the rst spline. CurveExpert follows common practice,
which is to specify that the 2nd derivative of the rst spline is zero this has the effect of connecting the rst and
second points with a straight line.
4.4. Spline Interpolation 23
CurveExpert Basic, Release 1.4
The implementation of quadratic splines used in CurveExpert requires a good deal of memory and crunching time
(even more than that of the cubic spline). Do not use this curve t on an excessive number of data points! Use caution
when applying this class of splines.
Note also that the data must be sorted for the spline operation to complete successfully. To sort your data, choose
Data|Manipulate and select the Sort tab.
4.4.3 Cubic Splines
Cubic splines interpolate the range between data points by 3rd order polynomials (cubics). Cubic spline curve t-
ting ensures that each spline is equal to the data points, the 1st derivatives are continuous at the knots, and the 2nd
derivatives are continuous at the knots. Since discontinuities in 3rd and higher derivatives cannot be visually detected,
cubic splines have an aesthetically pleasing appearance. In fact, cubic splines mimic the behavior of drafting splines
used in olden days. Various end conditions can be used for cubic splines. Common practice is to use natural end
conditions by specifying that the 2nd derivative of the end splines are zero at the endpoints. This gives the visual
appearance of straightening out at the ends, which is the behavior of a physical drafting spline. This behavior is the
type implemented in this version of CurveExpert. Note also that the data must be sorted for the spline operation to
complete successfully. To sort your data, choose Data|Manipulate and select the Sort tab.
4.4.4 Tension Splines
Tension splines behave similarly to cubic splines, with the addition of a parameter (the tension) which species how
tightly the spline forms to each knot. A low tension parameter will yield a spline similar to a cubic spline; whereas
at high tension, the spline will approach a linear spline. The Set Tension dialog box allows you to set this parameter
before the tension spline curve t is performed. You can experiment with the tension to obtain the visual quality that
you want in your spline.
Note that there is no easy way to specify a tension spline, except by creating a table of its values. It is also very
ill-behaved expect a few complaints from CurveExpert about oating point errors. To alleviate this type of error,
make sure that your data is scaled to an order of one, and give intermediate tension parameters (0.1 to 20).
Note also that the data must be sorted for the spline operation to complete successfully. To sort your data, choose
Data|Manipulate and select the Sort tab.
4.5 Lagrangian Interpolation
Warning: The data must be sorted for spline interpolations to complete successfully. To sort your data, choose
Data|Manipulation from the main menu and select the Sort tab.
Lagrangian interpolation is simply interpolating the data set with a polynomial. The order of the polynomial is deter-
mined by the number of points in the data set the polynomial must have enough degrees of freedom to t the data
set at every point. Therefore, in a data set with n points, the interpolating polynomial will be of n-1 degree.
Lagrangian polynomials are particularly well suited for data sets with a low number of data points (8 or less). Prefer-
ably, the data points should not have too much scatter. Like all polynomials, the Lagrangian interpolating polynomial
exhibits more oscillatory behavior as the degree increases. Therefore, the use of Lagrangian interpolations should be
avoided if the number of data points is large. Currently, CurveExpert limits the use of this type of interpolations to
data sets with 13 points or less. As the name implies, extrapolating beyond the scope of the data points with an in-
terpolating polynomial can be very detrimental. Interpolations only provide accuracy between the data points using
them to obtain y data outside of the range of the data points must be done very carefully.
24 Chapter 4. Modeling your data
CurveExpert Basic, Release 1.4
Note also that the data must be sorted for the interpolation to complete successfully. To sort your data, choose
Data|Manipulate and select the Sort tab.
4.6 Using CurveFinder
Using the built-in CurveFinder essentially does all of the hard work for you. You provide the data le, and the
CurveFinder does the rest. It sifts through every possible curve t, ranks the ts from best to worst, and presents you
with the best one. Choosing CurveFinder from the Data menu will invoke a dialog box that will ask you for input
on which families of regression models to search. Also, you may use the all on and all off buttons to check or
uncheck all of the families at once. See Regression Models and Linear Regression for details on each built-in model.
If the polynomial family is included for consideration, you must specify the maximum degree of the polynomial that
CurveFinder will consider in the Polynomial Constraint area. Of course, if the polynomial family is not included,
the polynomial constraint will simply be ignored.
Once you are nished selecting which model families CurveFinder should search, press the OKbutton. The calculation
will then proceed, and each curve t is ranked according to its standard error and correlation coefcient (see the Data
Modeling with CurveExpert section for the appropriate equations), and the best t is then displayed in the graphing
window. Thats all there is to it!
Note that CurveFinder considers ONLY regressions (linear and nonlinear) in its search for the best t. Further, as de-
scribed above, you can select only certain families to be considered in the search for the best curve t. See Regression
Models for a description of the model families. Interpolations are guaranteed to pass through each of the data point,
so an evaluation of their performance relative to a regression-type curve t is rather difcult. Therefore, interpola-
tions are excluded from the CurveFinders search; however, you may still decide to try these curve ts manually when
CurveFinder is done.
This dialog will automatically generate initial guesses for the nonlinear regression models, whether AutoGuess is
enabled or not. If a particular curve t diverges or generates a oating point exception, it is excluded from the
calculation process. In the case that an important curve t in the group is not calculated, you must select that curve t
manually from the Apply Fit menu and adjust the initial guesses, if necessary.
The CurveFinder dialog is shown below:
4.6. Using CurveFinder 25
CurveExpert Basic, Release 1.4
4.7 Calculating Groups of Models
The Calculate Groups dialog allows you to automate the process of nding the right data model. This option is
most helpful when you have data that follows a certain trend that matches a particular model family or families.
Using Calculate Groups, you can select those families that you would like to see, and CurveExpert will automatically
calculate all of the curve ts in that group, rank them on the main windows ranking chart, and open a graphing window
for each of the curve ts. See Regression Models for a description of the model families.
This dialog will automatically generate initial guesses for the nonlinear regression models, whether AutoGuess is
enabled or not. If a particular curve t diverges or generates a oating point exception, it is excluded from the
calculation process. In the case that an important curve t in the group is not calculated, you must select that curve t
manually from the Apply Fit menu and adjust the initial guesses, if necessary. The Calculate Groups dialog is shown
below:
26 Chapter 4. Modeling your data
CurveExpert Basic, Release 1.4
4.7.1 All On
Press this button to select all of the families listed in this dialog.
4.7.2 All Off
Press this button to deselect all of the families listed in this dialog.
4.7.3 Model Families
Click the checkbuttons beside each model family to include them in the calculation. Families that are not marked by
an X will not be included.
4.7.4 Calculate Groups Control Buttons
OK: Click the OK button to signify that you are nished choosing regression families, and that CurveExpert
should begin calculating the families that you selected.
Cancel: Click the Cancel button to abort and not calculate any curve ts.
Help: Click the Help button to nd out how to use the Calculate Groups dialog.
4.7. Calculating Groups of Models 27
CurveExpert Basic, Release 1.4
28 Chapter 4. Modeling your data
CHAPTER
FIVE
GRAPHING
CurveExpert has extensive graphing capability. This capability gives you immediate feedback on the performance of
a particular data model.
5.1 Graphing Window Overview
CurveExpert allows you to open many graphing windows at one time so that you may compare different curve ts.
Note that changes that you might make to a particular graphing window will affect only that window. See the Graph
Properties dialog to see how to apply your changes to all plots, as well as saving your customizations for future use.
Each graph has a consistent user interface. Press the right mouse button to obtain the graphing menu, which gives you
access to all of the functions available for plots, such as customizing the plot, obtaining model information, analyzing
29
CurveExpert Basic, Release 1.4
the model, or printing the plot. Zooming and panning are controlled by dragging a rectangle across the graph pane
and/or pressing the arrow keys. Any plot can be autoscaled by pressing Shift+A .
The most vital piece of information that you might want to access are the values of the model parameters. Press the
Info button, select Information from the graphing menu (by clicking the right mouse button), or press Ctrl-I to access
this (as well as other) information. Note that if the graph title is displayed, the Info button is not available; choose
Information from the graphing menu or press Ctrl-I to access the curve t information.
Graphs can be customized by selecting Graph Properties from the graphing menu.
It is possible that CurveExpert will not be able to properly draw your graph. For example, the y-extents might be
negative on a graph that is being drawn with log axes. Or, the extents might be set such that a singularity in the model
exists somewhere in the domain. CurveExpert will notify you of these occurrences with a error message printed on
the graphing surface. In these cases, reset the graphing extents using the XY Axis Properties section of the Graph
Properties dialog (accessed via the popup menu described below).
5.2 Graphing Controls
Zoom: You may zoom in on a region on the graph by holding down the left mouse button, dragging over the
area of interest from top left to bottom right, and then releasing the button. Likewise, zoom out by holding down
the left mouse button, dragging from bottom right to top left, and then releasing the button. Zooming out will
cause the entire graphing area to be enclosed in the rectangle that was made by dragging backwards. Note:
Zooming is not available on log or semilog plots. Also note that any zoom that starts or ends outside of the
graphing pane will be ignored.
Pan: To pan the graph in any direction, press the arrow keys. This will pan the graph in the direction that
you choose by a magnitude of the major tick length. Holding SHIFT while pressing the arrow keys gives you
ner control by only panning one minor tick length. Note: panning in the direction of a log scaled axis is not
supported.
AutoScale: Press SHIFT-A to autoscale the graph. Autoscaling guarantees that every data point on the plot will
be shown, which is the default for a newly opened graphing window.
5.3 Graphing Menu and Shortcuts
By pressing the right mouse button or by pressing Ctrl-M in any graphing window, you can pick from the graphing
menu (keyboard equivalents are listed also):
[Ctrl-W] Find Main Window
[Ctrl-G] Graph Properties
[Ctrl-I] Information
[Ctrl-T] Generate Table
[Ctrl-L] Analyze
[Ctrl-C] Copy
[Ctrl-P] Print
[Ctrl-X] Close/Exit
F1 Help
30 Chapter 5. Graphing
CurveExpert Basic, Release 1.4
5.4 Graph Properties
The Graph Properties dialog allows you to modify all of the scaling and characteristics of the current graph.
5.4.1 Graph Property Control Buttons
OK: Press OK to apply all of your changes to the current CurveExpert graph and quit the dialog.
Apply: Press Apply to try out your graph property changes. The graph will be updated immediately, but you
may still press Cancel to discard your changes.
Apply to All: Press Apply to All to immediately apply all of the current graph properties to the current plot
and all open plots. All attributes as well as the scaling for the current plot are copied to all other plots; hence,
all graphs will have exactly the same view, colors, line thicknesses, etc. This action CANNOT be undone by
pressing the Cancel button.
Save as Default: If you would like to save your graph attribute and scaling setup permanently, click this button.
This information will then be used on every plot that is drawn by CurveExpert.
Cancel: Press Cancel to discard any changes that you have made to the graph properties and quit the dialog.
Help: Press Help to get help on the currently selected tab of the Graph Properties dialog.
Autoscale: Press this button to have CurveExpert automatically set the graph axes and tick mark increments.
This is the default view for a newly opened graphing window, and ensures that all data points will be shown on
the graphing window. This button is only available on the X and Y axis tabs.
If an invalid entry has been entered in any of the tabbed pages (for example, entering 0 for the Resolution parameter
on the Overall page), then the offending entry will be selected, and the computers speaker will sound.
5.4. Graph Properties 31
CurveExpert Basic, Release 1.4
5.4.2 X and Y Axis Properties
The X axis and Y axis property sheets modify all graph properties that are associated with the x/y axes, such as the
scaling, tick marks, and axis labels.
Scaling
Axis scaling is determined by the settings in the High and Low edit elds. As the names imply, the graph will be
displayed over the range set by the Low value and the High value. Major tick marks will be placed at increments
specied in the Increment edit eld. Also, if the corresponding Show Grid Lines box is checked, grid lines will be
displayed at each major tick. The number of minor ticks displayed between the major ticks is specied in the No. of
Minors eld.
Scale Type
The Scale Type section allows you to specify whether the axis should be scaled on a normal (linear) scale or a loga-
rithmic scale. To use normal (linear) axes, select the Normal radio button. Likewise, to use logarithmic axes, select
the Log radio button.
32 Chapter 5. Graphing
CurveExpert Basic, Release 1.4
Using logarithmic scales has limitations a plot showing zero or negative numbers on the axis in question cannot
be scaled logarithmically. Of course, you can always reset the High and Low values to positive values to be able to
scale the axis logarithmically. Note that the High, Low, and Increment elds are not represented exactly when using
logarithmic scaling the closest multiple of ten is chosen for the High and Low entered, and multiples of the next
lower major tick are used for the minor increments.
Tick Labels
The tick labels for both axes can be customized by using the Tick Labels section of the Graph Properties dialog. The
following options are available:
Fixed Point: Select this radio button if you would like the numbers at every major tick to have xed point format.
The number of decimal places displayed is set in the Precision edit box below this radio button.
Scientic: Select this radio button if you would like the numbers at every major tick to have a scien-
tic/engineering format. The number of decimal places displayed is set in the Precision edit box below this
radio button.
Precision: The number in this eld indicates the number of decimal places that will be displayed on the tick
labels along the axes.
Rotation: The tick labels can be rotated from 0 to 360 degrees. Enter the desired number of degrees to rotate
these labels in the Rotation eld.
Font: The font used for the tick labels can be modied by clicking this button. Any Truetype font and any color
can be chosen; refer to the Changing Graph Fonts section for details.
Miscellaneous
Axis properties that do not fall under one of the above categories are documented below.
Label: Type in the axis label that is desired for the axis in question.
Font: The font used for the axis label can be modied by clicking this button. Any Truetype font and any color
can be chosen; refer to the Changing Graph Fonts section for details.
Show Label: Select this checkbox if the axis label should be displayed. If this box is not checked, then the axis
label will not be drawn.
Show Grid Lines: Select this checkbox if grid lines (associated with the axis in question) should be shown at
every major tick mark. If this box is not checked, then the grid lines will not be drawn.
Grid Lines at Minors: Normally, grid lines are drawn only at the major ticks. Checking this button will cause
the grid lines to be drawn at every minor tick also.
Ticks Inside: Select this checkbox if all major and minor ticks should be drawn inside of the graph pane. If this
box is not selected, all ticks will be drawn outside of the graph pane.
5.4.3 Point and Line Properties
The Point/Line property sheet modies all graph properties associated with the appearance of the data point markers
and the curve representing the model prediction.
5.4. Graph Properties 33
CurveExpert Basic, Release 1.4
Data Point Properties
Show points: This checkbox will determine whether data points are drawn on the plot or not. For residual plots,
this choice will read Show Residuals as Points. When this checkbox is selected, all residuals will appear as
points on the graph. When left unselected, the residuals will be drawn as bars. Note that the properties of the
residual points and/or bars can be controlled by the following properties, just as normal data points can.
Fill points: This checkbox determines whether the points will be drawn as a solid color or an outline. For
example, if the circle symbol is chosen and the Fill points options is checked, a solid disk will be drawn at
each data point. The color used to ll the point is the same as the color used to draw the outline.
Show Error Bars: This checkbox determines whether error bars will be shown on the data points, if standard
deviation data is present in your data set. If this option is checked, then a rectangular error bar will be shown
on each point. Note that this option will be disabled if your data set does not contain standard deviation data for
each data point.
Error Bar Scale: By default, the length of the error bar is the value of the standard deviation for the point is
drawn on (this is unscaled, or scale=1.0). If you would like to scale the length of the error bar, then change the
value of this item. A common use for this is to show a (theoretical) 95% condence bound for the data point;
this corresponds to a scale factor of 1.96, based on the Gaussian distribution. This item will not be enabled
unless standard deviation data is present in the current data set.
Point size: Enter the size of the symbol that will denote the data points, in pixels. This size may not be negative.
The up/down buttons beside the edit control may also be used to change the size.
Point color: The current point color is displayed beside this button. To change this color, press this button and
choose a new color.
Symbol: Press the Symbol button to obtain a list of possible markers that can be used for each data point.
The currently selected symbol will have a checkmark beside it on the symbol menu. Currently, the supported
symbols are the circle, square, triangle, inverted triangle, hourglass, plus, and cross.
Line Properties
Line Width: Enter the width, in pixels, of the curve that will be drawn as the curve t. This size may not be
negative. You may also use the up/down buttons beside the edit control to change the size. Note that the Line
Width setting is only valid for solid lines; if any other style of line is chosen, then the width of the line will be
one.
Resolution: Enter the stepsize, in pixels, that the curve will be updated. The curve is made of straight line
segments that appear as a curve when the resolution is small enough; however, the ner the resolution (lower
number) the slower the curve will be drawn. For optimum performance, set the resolution to the highest number
possible without degradation of plot quality.
Line Color: The current line color is displayed beside this button. The line color is used to draw the curve t
line. To change this color, press this button and select a new color.
Line Style: Press this button to display a menu with the available line types. Note that the Line Width setting is
only valid for solid lines; if any other style of line is chosen, then the width of the line will be one.
Sample
This area of the Point/Line property dialog shows a sample of the currently selected point and line combination. Note
that the background color is the currently selected Fill Color from the Overall tab. Also note that this sample is
dynamically updated as you change the settings on this tabbed page.
34 Chapter 5. Graphing
CurveExpert Basic, Release 1.4
5.4.4 Overall Graph Properties
The Overall property sheet modies all properties associated with the plot as a whole, such as the title, graph pane,
graph box, and graph coloring.
Show Header Instead of Title
Selecting this checkbox will display the header instead of the graph title. The header consists of the information button
(which you can press to invoke the Information Dialog), directions concerning how to invoke the graphing menu, and
the value of the standard error and the correlation coefcient for the current model. If this checkbox is left unselected,
the title that is dened by the user in the Graph Title eld will be centered in the window/page in the title font.
Graph Title
Enter the text for the graph title in this eld. The string may be up to 255 characters long; if the title is too long for
one line, then room will be made for it on the plot and it will broken up into multiple lines. Note that the title will not
be displayed unless the Show Header Instead of Title checkbox (above) is left unselected.
Graph Title Font
Press this button to select a font for the title. See also Changing Graph Fonts for further details concerning how to use
the font selection dialog.
Graph Pane
Border Buttons: Select or deselect the pane border checkboxes to show or hide the lines around the graph pane.
Lock Frame Color: If this button is checked, then all text drawn on the graph will automatically follow the
selected Frame Color (see below). When this button is unchecked, the text colors can be individually selected
through the Font selections in the Graph Properties dialog. Note that the text colors selected through the font
dialogs will not be used unless this checkbox is unselected.
Fill Color: The current ll color is displayed beside this button. The ll color is the color that will be used to
shade in the background of the graph. To change this color, press this button and choose a new color.
Grid Color: The current grid color is displayed beside this button. The grid color will be used to draw the dotted
grid lines that are drawn at every major tick. To change this color, press this button and choose a new color.
Frame Color: The current frame color is displayed beside this button. The frame color is used to draw the border
around the graph as well as the tick marks. To change this color, press this button and choose a new color.
Outside Fill: The current outside ll color is displayed beside this button. The outside ll color is the color that
is painted outside of the graphing frame. Since the axes labels and various other printed items are drawn in this
area, this color should not be the same as the Frame color. Remember that if the font color for the title, axes
labels, etc. are the same color as the Outside Fill color, then they will be invisible! See the Lock Frame Color
switch above for more information concerning this.
Graph Box
Show Graph Box: To show or hide the graph box, select or deselect this checkbox, respectively. The graph box
is the box that encloses the entire graph. This box is not very visible for on-screen plots; therefore, this option
is most relevant for printed or copied plots.
5.4. Graph Properties 35
CurveExpert Basic, Release 1.4
Box Width: Enter the line width, in pixels, that the graph box will be drawn with. Click the corresponding
up/down arrows to increase or decrease this line width.
Box Color: Click this button to select the color with which the graph box will be drawn.
Rectangular Corners: Selecting this radio button will draw the graph box as a simple rectangle.
Rounded Corners: Selecting this radio button will draw the graph box as a rectangle with rounded corners.
5.5 Graph Input and Output
5.5.1 Copy to Clipboard
Selecting this menu item copies the current plot to the clipboard so that you can paste it into another application. Best
results when copying are obtained by resizing the graphing window to the actual size that you want to paste into the
other application, and then selecting Copy Plot.
5.5.2 Print
Selecting this menu item prints a hardcopy of the current plot. A print dialog will be shown that will allow you to
select printers and change the print setup. If the printer is not set as desired, press the Setup button and congure the
printer. Pressing OK will commence printing, and pressing the Cancel button will return you to the CurveExpert graph
window.
Note that you may select whether the printout will be in color or black and white by selecting the Black and White
and Color radio buttons at the bottom of the dialog. If you have a black and white printer and select a color plot, then
the plot will be grayscaled before it is sent to the printer.
36 Chapter 5. Graphing
CHAPTER
SIX
QUERYING RESULTS
All result query operations are available through the graph. Right click on the graph in order to access the query
operations.
6.1 Model Information
The Model Information dialog gives all of the information needed to apply a curve t and some supplemental informa-
tion about the performance of the given model. The most important information contained in this panel are the values
of the parameters of the model.
37
CurveExpert Basic, Release 1.4
6.1.1 Information Buttons
OK: Press OK to close this window.
Help: Press Help to get CurveExpert help on how to interpret the items in the this dialog.
Copy: Press the copy button to copy the displayed information to the clipboard. See the individual sections
below for the specic data that will be copied.
6.1.2 Coefcients
The Coefcients page gives the most vital information about the model in the current graph. The values of the
coefcients are given here as well as the model equation, so that meaning of the parameters is clear.
Model
The Model section gives the data modeling equation so that the interpretation of the coefcients is clear. The coef-
cients a,b,c, etc. in the Coefcients section match the corresponding parameters shown in the model.
Coefcients
The Coefcients section gives the values of the relevant parameters for the current model these coefcients are
always expressed as a, b, c, d, and so on. These coefcients match the model shown in the Model section. If the list
of coefcients exceeds the extent of the window that they are shown in, a scrollbar will appear to allow you to scroll
through the parameters.
Copy
If the Copy button is pressed when the coefcient tab is active, the list of coefcients is copied to the clipboard.
6.1.3 History
The History page shows the value of the chi-square and each parameter in the current curve t as a function of the
iteration number. These values give information on the path that the nonlinear regression algorithm took to optimize
the parameters (where optimization means reducing the chi-square value as much as possible). This page is divided
into two sections: the Chi-Square History, and the Parameter Histories.
The Chi-Square history section shows the iteration number in the left column, and the value of the chi square at that
iteration on the right. At iteration zero, the associated chi-square is computed with the initial guesses. To view the
history for any parameter, use the list box beside Param 1 or Param 2. Two lists are provided so that the user can
compare changes in two parameters at once.
Note that the History page is only meaningful for nonlinear regression type curve ts. Linear regressions and interpo-
lations can be solved directly, so there is no iteration involved in their solution.
Copy
If the Copy button is pushed when the history tab is active, the complete history for the chi-square and then each
parameter is copied to the clipboard in successive columns.
38 Chapter 6. Querying Results
CurveExpert Basic, Release 1.4
6.1.4 Covariance Matrix
The covariance matrix gives further information about the relation between the model parameters and their uncer-
tainties. The entries along the diagonal are directly related to the uncertainty in each parameter for example, the
entry in matrix position (2,2) corresponds to the uncertainty in the second parameter (which is b). The off-diagonal
components are the covariances between parameters. For example, the entry in matrix position (3,4) is the covariance
between parameters 3 and 4 (which are c and d). The covariance matrix can be used in further statistical analysis of
the regression model and its goodness-of-t. At this time, CurveExpert offers this matrix as additional information to
the user, and does not draw any conclusions based on its entries. Note also that the inverse of the covariance matrix is
the curvature matrix.
Copy
If the Copy button is pushed when the covariance tab is active, the entire covariance matrix, in nxn format, is copied
to the clipboard.
6.1.5 Residuals
The residual plot graphically depicts the difference between the data points and the model evaluated at the data points.
The residual at point i is dened by
R
i
= y
i
f(x
i
)
where y
i
is the measured value at x
i
, and f(x
i
) is the predicted value at x
i
. These distances are shown as bars or points
on the residual plot; the magnitudes of the data points are simply replaced by the residual dened above. If the residual
is positive, then the data point is above the models prediction; likewise, if the residual is negative, then the data point
is below the models prediction. The residuals can provide an indication of a particular models performance. If there
are runs of like-signed residuals, then a better model for the data is likely to exist.
Optimally, the residuals should exhibit a random scatter around zero, which indicates that the data points are randomly
distributed around the curve. A run is a sequence of like-signed residuals, which stand out on the residual plot. A large
number of runs indicates that data systematically deviates from the curve.
Open/Close Plot
Press this button to open or close a large residual plot. Opening the plot simply shows the residual plot in its own
window in which you may resize, zoom, print, and alter the properties just as with any other graph. While the residual
plot window is open, this button will change to read Close Plot. Clicking this button will then close the large residual
graph.
Copy
If the Copy button is pressed when the residual tab is active, a table of residuals is copied to the clipboard. This table
is in a two-column format separated by a tab character. The rst column is simply the x data, and the second column
is the difference between the data point and the model evaluated at that point (y
i
- f(x
i
)).
If a copy of the plot is desired, simply open a plot window of the residuals (by clicking the Open Plot>> button and
then select Copy from the graphing menu of that plot.
6.1.6 Comments
The comments page is meant to give additional information on the error involved in the curve t, and also gives other
miscellaneous information that could apply to your particular model.
6.1. Model Information 39
CurveExpert Basic, Release 1.4
Errors
The Error section gives you information on the curve t performance. Two quantities are used to express the good-
ness of a particular curve t the correlation coefcient and the standard error of the estimate. In general, the
correlation coefcient will range from 0 to 1, with a correlation coefcient of 1 being the best. In some peculiar
circumstances, CurveExpert will report a correlation coefcient greater than one; this is indicative of a very poor data
model. The standard error will be strictly positive, with a smaller standard error representing the better curve t. For
more information, refer to the Data Modeling with CurveExpert section.
Comments
The Comments section gives you important information about the current model, such as information regarding the
characteristics of interpolation, or the performance of a nonlinear regression. For nonlinear regression, the message
will inform you if the t converged, the number of iterations required for convergence, and the tolerance imposed to
determine convergence.
Copy
If the Copy button is pushed when the comments page is active, the error information and the comments section is
copied to the clipboard.
6.2 Analyze
The Analyze Fit feature allows easy location of x/y points, differentiation, and integration of a curve t that has been
performed. Since this feature may only be used from the graphing window (by choosing Analyze from the graphing
menu or pressing Ctrl-L), all calculations will be based on the model from the invoking window.
6.2.1 Analyze Fit Control Buttons
Calculate: Press calculate to compute the information on the active page. The item calculated could be the
location of an x point, location of a y point, a derivative, or an integral (depending on the active page).
Close: Press Close to indicate that you are through analyzing the current model. The dialog box will be closed.
Help: Press Help to get CurveExpert help on how to use the Analyze Fit feature to locate discrete points,
differentiate, and integrate the model function.
40 Chapter 6. Querying Results
CurveExpert Basic, Release 1.4
6.2.2 Find a Y Value, y=f(x)
CurveExpert can evaluate the curve t at a given x to give you the projected y value by the current curve t. Just type
in the point at which you want to evaluate the curve t (the x value) in the At X= eld and press Apply or <Enter>
on your keyboard. The calculator will then show the corresponding y value. If CurveExpert cannot evaluate the curve
t at the point that you specied, then the word ERR is printed in the result eld.
6.2.3 Find an X Value x=f(y)
CurveExpert can evaluate the curve t at the given y to give you the projected x value. Just type in the point at which
you want the corresponding x in the At Y= eld and press OK or <Enter> on your keyboard. The calculator will
then show the corresponding x value. If CurveExpert cannot nd the corresponding x value, then the word ERR is
printed in the result eld.
NOTE that the results obtained for the x value should be, at the least, visually checked with the graph. There is a
chance the root (x-value) returned matches a y value on the graph at a location other than what was intended. This
occurs simply because functions may have multiple roots, and CurveExpert may locate any one of them (since all of
them are just as valid as the other) without assistance from the user. Consider a simple quadratic y=x^2: if you want
the x value corresponding to y=4, there are two valid answers to this question (2 and -2). So, although this search
facility in CurveExpert is very powerful, it should be used with care. The optional Initial Guess for X eld should be
used wisely so that the correct root is located.
Most of the time, the initial guess eld is not needed; however, as mentioned above, the desired x-value may not be
returned. In this case, you must set the Initial Guess for X to a value reasonably close to the root (x-value) that you
are trying to nd. This greatly assists CurveExpert in nding the correct root. Note that the number shown in this eld
when the Analyze Tool is invoked is the initial guess generated by CurveExpert, which will subsequently be used in
the computation of the x-value.
6.2. Analyze 41
CurveExpert Basic, Release 1.4
6.2.4 Differentiating at a point
Simply ll in the point at which you want to take a derivative into the At X= edit eld. Then press the Calculate
button, and the result will be displayed beside the dY/dX= entry. The default value at which the derivative will be
computed is the current midpoint of the graphing window. If a derivative calculation fails, the word ERR will appear
in place of the result. The derivatives are taken using a central difference combined with Richardson extrapolation to
rene the derivative. This renement is terminated when successive renements yield less than 0.01% difference in
the derivative.
6.2.5 Integrating over an interval
To integrate a function on the interval [a,b], Fill in the value of a in the From X= eld, and the value of b in the to
X= eld. Then press the Calculate button, and the result will be displayed beside the I(ydx)= entry. The default
interval over which the integral will be taken is the current extent of the invoking graphing window. If an integral
calculation fails, the word ERR will appear in place of the integral result.
The integral of the model function is taken using Simpsons 1/3 rule coupled with the Romberg integration method.
The interval is divided into successively ner subintervals which are integrated with Simpsons rule and summed,
and these results are rened with the Romberg method. Renement is terminated when successive iterations yield
less than 0.01% difference in the integral or when the interval has been divided into over 32767 subsegments. If the
integral did not converge before the maximum number of segments is exceeded, a note will appear informing you of
this occurrence. Use the result of an unconverged integral with due caution.
6.2.6 Finding Arclength
The length of the graph from point a to point b is dened as the arclength. This distance is equivalent to the distance
traveled by an observer moving along the curve from the location (a, f(a)) to (b, f(b)).
Exercise caution when nding the arclength of a given plot. The formula to calculate arclength is
L =
_
b
a

1 +
_
dy
dx
_
2
dx
So, if the derivative dy/dx becomes very small (numerically), this calculation can fail. Check your curve using the
Differentiation tab to make sure that the derivative over the interval in question is not small (i.e., less than 1e-5).
6.3 Creating a Table
The CurveExpert table generation mechanism generates a data table based on the current data model. This table will
contain the calculated model values(y) corresponding to the range of x data points that you specify. To create a table,
CurveExpert must know the following information:
1. The starting x value
2. The ending x value
3. The resolution (increment, step size) of the table
Simply ll this information into the provided spaces on this dialog box, enter a lename, and press the OK button.
By default, the tables generated by CurveExpert have the extension .TAB. The generated table will simply be two
columns of data: the rst column is the x data, and the second column is the calculated y data from the model that you
specied.
42 Chapter 6. Querying Results
CurveExpert Basic, Release 1.4
6.3.1 Table Control Buttons
OK: Press OK after you have entered all of the necessary information and you are ready to save your table.
Cancel: Press Cancel to abort this operation and not create a table.
Delimiter: Press this button to specify the type of delimiter, or separator, to use in the table. You may choose a
space, tab, or comma to separate the x and y columns. The default delimiter is a tab.
Help: Press Help to learn on how to generate a table from a given data model.
6.3.2 Table X Range
This region of the dialog box is where you can specify the starting and ending x value and the resolution of the table,
as discussed above.
Minimum: Enter the starting x value of the table in this edit eld.
Maximum: Enter the ending x value of the table in this edit eld.
Increment: Enter the interval in x that you want the data model to be calculated. Note that this number must be
the same sign as (maximum-minimum). By specifying a negative Increment and a minimum greater than the
maximum, it is possible to generate reverse-order tables.
6.3.3 Example
For example, suppose that you wanted to generate a table le named mydata.tab for a range of x=0.0, 0.5, 1.0,
1.5...10.0 with comma separators between columns. You would specify 0.0 in the Minimum eld, 10.0 in the
Maximum eld, and 0.5 in the Increment eld. Then press the Delimiter button and choose Comma from the
delimiter menu. Finally, you would enter the lename mydata.tab in the File Name eld and press the OK button.
6.3. Creating a Table 43
CurveExpert Basic, Release 1.4
6.4 File Export
Exporting a le allows you to easily transfer data out of CurveExpert, most often to a spreadsheet. The exported le
will contain the data points along with the specied curve ts approximation to the data evaluated at every data point.
Also, if you desire, the exported le can contain the specied models coefcients (a,b,c,d...) and statistics describing
your data set such as the mean and standard deviation. The lename for the exported le is entered in the File Name
eld as usual. The extra buttons on the right hand side of the Export dialog are special settings for the exporting
operation.
6.4.1 Delimiters
The Delimiter button allows you to choose what type of delimiter you would like to use to separate the data columns.
The default is a tab delimiter, but you may also use a single space or a comma.
6.4.2 Specifying Curve t Type
The curve t that you will export is, by default, set to the last curve t that was performed. Its name is shown in the
Export Options group. If you wish to change this curve t, click the Change Curvet Type>> button a list of curve
ts that have already been calculated will appear, and you may select from that list. Note that a curve t must already
be calculated to be valid for exporting. If the curve t you desire is not on the list, cancel the Export dialog, calculate
the curve t via the Apply Fit or Interpolation menus, and then reopen the Export dialog.
6.4.3 Include Coefcients
The checkbutton Include Coefcients signies whether you would like the curve t coefcients to be present in the
exported le. Note that for spline interpolations, the coefcients are given as the coefcients of EACH piecewise
polynomial used between each knot/data point. The default is ON.
44 Chapter 6. Querying Results
CurveExpert Basic, Release 1.4
6.4.4 Include Statistics
Lastly, the checkbutton Include Statistics signies whether you would like relevant statistics to be present in the
exported le. The statistics that will be included are: X and Y data minimum, X and Y data maximum, X and Y data
mean, and the X and Y data standard deviation. The default is ON.
6.4. File Export 45
CurveExpert Basic, Release 1.4
46 Chapter 6. Querying Results
CHAPTER
SEVEN
DEFINING CUSTOM MODELS
7.1 Overview
CurveExpert allows you to dene your own nonlinear regression models; all you have to do is type in the equation.
When you choose Dene User Model from the Apply Fit menu, you will be presented with a dialog in which you can
type or choose your model. Type your model into the edit eld provided, or choose a model from the scrolling list. You
may use operators and functions in your model that are dened at the end of this help page. Parameters should start at
letter a and continue sequentially. CurveExpert allows you to use up to 19 parameters, lettered a..s. All arithmetic
operations are valid, as well as the symbol ^ to raise a number to a power. Here is an example of what you could enter
in the Dene User Model dialog box:
a\
*
x\
*
log(b+x)+c^x
Note that there is no need to enter the y= before the function only the right hand side of the model is entered.
Logical operators are also supported in your user-dened regression models. The operators that are less than (<),
greater than (>), less than or equal to (<=), or greater than or equal to (>=). Each of these expressions evaluate to one
if the expression is TRUE, or zero if the operation is FALSE. In this way, you can implement logical expression into
your model. For example, if you would like to construct a model of two separate lines to where one line is applicable
to the region of x<=5, and one line is applicable to x>5, then you might construct the following four-parameter model:
(a+b\
*
x)\
*
(x<=5)+(c+d\
*
x)\
*
(x>5)
These logical operators can be combined in any way to create your user dened model.
See Custom Model Reference for a complete list of the supported arithmetic and logical operators.
7.2 User Model Dialog
A picture of the User Model dialog is shown below, with a description of the controls/operations following:
47
CurveExpert Basic, Release 1.4
7.2.1 User Model Control Buttons
OK: Press OK to use the model that you have entered to t the data set. The nonlinear regression calculation
will begin. If there is a syntax error with your model, you will be notied at this time.
Cancel: Press Cancel to abort this operation and return to the main window.
Help: Press Help to learn how to apply custom regression models.
7.2.2 Model Edit Field
Type your custom regression model into this eld, using a...s for the model parameters. Parameters should start at
letter a and continue sequentially. CurveExpert allows you to use up to 19 parameters, lettered a..s. All arithmetic
operations are valid, as well as the symbol ^ to raise a number to a power. Note that there is no need to enter the y=
before the function only the right hand side of the model is entered. Also, you may edit the text in this box at any
time, even after you have selected a model from the Model List.
The normal cut, copy, and paste keys can be used in this edit eld; i.e., Ctrl+X for cut, Ctrl+C for copy, and Ctrl+V
for paste.
7.2.3 Model List
User models that have been saved will be listed in this box. Scroll up or down to see them all. Selecting an item from
this box will simply copy its formula to the Model Edit Field so that you can either click OK to calculate that model,
or modify it as necessary. Double-clicking a model in this list will select that model for a regression immediately.
48 Chapter 7. Dening Custom Models
CurveExpert Basic, Release 1.4
7.2.4 Add Model
Clicking on this button will add the model that is in the Model Edit Field to the Model List. This operation permanently
saves a model that you have typed in. You will be asked what to call the model so that a name (not a formula) will be
added to the list.
7.2.5 Remove Model
Clicking on this button will remove the highlighted model from the Model List permanently. A dialog will ask you to
verify this operation.
7.3 Custom Model Reference
7.3.1 Operators
The following operators are supported by CurveExpert to be used in your custom regression model: * + addition * -
subtraction * - unary minus (negation) * * multiplication * / division * ^ power * < less than * > greater than * <= less
than or equal to * >= greater than or equal to * != not equal * == equal
7.3.2 Special Variables
The following special variables are supported by CurveExpert may be used in your custom regression model: * pi the
constant 3.14159..... * avgx average of the x column * avgy average of the y column * stdx standard deviation of the x
column * stdy standard deviation of the y column * minx minimum of the x column * miny minimum of the y column
* maxx maximum of the x column * maxy maximum of the y column
7.3.3 Functions
The following functions are supported by CurveExpert to be used in your custom regression model:
abs absolute value
fact factorial
sqrt square root
exp exponential
log natural logarithm
log10 base-10 logarithm
sin sine
cos cosine
tan tangent
asin arcsine
acos arccosine atan
arctangent sinh
hyperbolic sine
7.3. Custom Model Reference 49
CurveExpert Basic, Release 1.4
cosh hyperbolic cosine
tanh hyperbolic tangent
ceil rst integer greater than value
oor rst integer less than value
j0 Bessel function of the rst kind, 0th order
j1 Bessel function of the rst kind, 1st order
y0 Bessel function of the second kind, 0th order
y1 Bessel function of the second kind, 1st order
50 Chapter 7. Dening Custom Models
CHAPTER
EIGHT
COMPUTATIONAL PERFORMANCE
8.1 Increasing Performance
CurveExpert has been optimized to perform regressions and interpolations as quickly as possible. Additional speed
gains are sure to some in later versions; however, you can greatly speed up the operation and reliability of CurveExpert
by carefully following certain guidelines:
8.1.1 Disable graph preview animations
Right click on the graph preview window (the graphing area in the main window of CurveExpert), and make sure that
Enable Animations is off. By default, CurveExpert ships with this option enabled in order to provide live feedback
on changes being made to the curve t as it is being calculated.
8.1.2 Scale your datasets
Always, always, always scale your data sets to the order of one. You may do this prior to reading in your data le, or
after your data le has been imported using the scaling feature in CurveExpert. This point cannot be overemphasized!
If you contact me with a problem concerning a situation where CurveExpert will not t a certain set of data, this is the
rst questions that I will ask.
Imagine a data set with x values ranging from 1000 to 10000 and a regression model where the term exp(a*x) is
involved. Unless a very good initial guess for a is given, chances are that an exponential to a very large power
(eg. exp(1000)) will be taken in the course of the nonlinear regression algorithm. The calculation will overow,
and the regression will fail as a result. Even if the regression happens not to fail, the regression algorithm will have
an exceedingly tough time nding the correct parameters, since a small change in the free parameters will cause a
tremendous change in the size of the term. The moral of the story: always scale your data! Note that CurveExpert is
able to perform correctly on data in any scale, as long as the calculations do not overow or underow. So, if a data
set is giving problems, scaling it should be the rst action to take.
8.1.3 Enable background processing (obsolete)
Enabling background processing (in the File|Preferences dialog) slows down computation considerably, since the
calculation must pause for Windows to process pending messages for all running programs. If you are running Curve-
Expert by itself, or you dont care if another program is ignored when CurveExpert is calculating, then turn this option
off! Calculations speed will increase greatly. The CALC ag in the status bar will be written in red when background
processing is disabled to remind you that every other program is halted while CurveExpert works.
51
CurveExpert Basic, Release 1.4
8.1.4 Set the tolerance parameter reasonably
Dont set the tolerance parameter (in the File|Preferences dialog) too low. In regression modeling, not much advantage
is to be gained by setting a very strict tolerance. Its main purpose in life is to prevent the nonlinear regression algorithm
from converging on local minima.
8.1.5 Use single precision calculations (registered users only)
CurveExpert uses double-precision oating point numbers to do all calculations. The registered version of Curve-
Expert comes with two executables: one version using single-precision calculations (seven sig gs), and the second
using double-precision (15 sig gs). Using a single-precision (theoretically) greatly speeds up performance, at the
cost of accuracy. Especially with extremely large data sets, the single-precision version should provide a speed and
memory advantage. By registering, you can make the choice yourself. See the sample speed test data below for an
indication of the performance of the different packages. You may check what type of data representation is being used
by CurveExpert by selecting Help|About.
8.2 Floating Point Exceptions
CurveExpert takes every precaution to avoid math errors, a.k.a. oating point exceptions. Here are some ways that
you can avoid these errors:
8.2.1 Scaling of your data is important
Take care to scale both x and y data to a magnitude of one. For example, if you have data that describes atmospheric
pressure at different elevations, you might have (in metric units) a data set that looks like:
x=[-100, 0, 100, 500, 1000, 4000] meters
y=[102000,101325,101000,100500,100000,99900] Pascals
Using the scaling feature in the Data menu of CurveExpert, you can scale this data using a scale factor of 0.001 on the
x data, and 0.00001 on the y data. So, you would then have the following data set:
x=[-0.1, 0, 0.1, 0.500, 1, 4] kilometers
y=[1.02,1.01325,1.01,1.005,1.0,0.999] bars
The second example is much more likely to allow nonlinear regressions to converge, and also will allow higher order
polynomial ts to be performed with more accuracy. If you have a data set that seems particularly ill-behaved, scaling
can help solve this problem.
8.2.2 Data should be appropriate to the model
Make sure that the data is appropriate to the model. Especially look out for using logarithmic or exponential families
of models with data that contains zeros or negatives. For example, it is not possible, in any shape or form, to obtain a
negative or zero with the basic exponential model (y=ae^(bx), assuming a is nonzero).
So, it is not wise to use a model that cannot reect the trends in the data. CurveExpert should disallow the use of certain
regression models with data that is negative or zero; however, in the case that one should slip through or you are using
a user-dened model, you should be aware of the characteristics of the data modeling equations so that choices of an
incorrect model can be avoided.
52 Chapter 8. Computational Performance
CurveExpert Basic, Release 1.4
8.2.3 For interpolations, data points must be sorted
If you are using an interpolation-type curve t, the data points MUST BE SORTED by ascending x! Use the
Data|Manipulate feature in CurveExpert to sort your data points correctly. It is quick and painless!
8.2.4 Sometimes, its unavoidable
Some curve ts are simply ill-behaved, i.e. prone to divergence. For some data sets, it may not be possible to converge
certain nonlinear regression models.
8.2. Floating Point Exceptions 53
CurveExpert Basic, Release 1.4
54 Chapter 8. Computational Performance
CHAPTER
NINE
CURVEEXPERT OPTIONS
The Options dialog allows you to set important parameters that CurveExpert will use during operation. Two separate
sets of user preferences are maintained for the single and double precision versions (registered users only).
If an invalid entry has been entered in any of the tabbed pages, then the offending entry will be selected, and the
computers speaker will sound.
9.1 Application Options
The application options tabbed page sets user preferences that control the overall behavior of CurveExpert in the
Windows environment.
55
CurveExpert Basic, Release 1.4
9.1.1 Data Files
Data File Location: The directory in which you store your data les can be input in this edit eld. For conve-
nience, each time CurveExpert is started, the directory will be automatically changed to this working directory.
By default, this directory is set to be the CurveExpert home directory.
Default Data File Extension: If a le extension is not supplied in the File|Open or File|Save dialog box, then this
extension is automatically added. Default: DAT
Automatic Data Sorting: Selecting this checkbox will automatically sort any data le as it is read into CurveEx-
pert. Default: Off
Always show le import dialog: Selecting this checkbox will cause the le import dialog to always appear when
a le is selected to read into CurveExpert. This dialog will give access to all of CurveExpert features for parsing
data les. When this checkbox is cleared, CurveExpert will attempt to intelligently read the data le based on
the number of columns that it detects.
9.1.2 Graph Rendering
The graph rendering radio buttons may be set to Slow, Medium, or Fast. Each setting has advantages and disadvan-
tages.
The Slow setting requires no extra memory, but all graphs are drawn from scratch when their window is
resized or uncovered.
The Medium setting requires a small amount of extra memory and behaves like the Slow setting, with the
exception that any user-model graphs will be drawn using Fast rendering. See below; this is the default.
The Fast setting requires a large amount of extra memory, because the contents of every graph window are
cached for quick redraws. The graph is only drawn the rst time it is opened, and each time it is resized. Any
other graph viewing will take a minimal amount of time to redraw, since the image is stored in memory. This
option is most useful for users who have extremely large data sets that take a long time to draw.
9.1.3 Switches
Enable Background Processing: When CurveExpert is iterating, it can take complete control over Windows
(faster), or do its processing in the background (slower). Checking this checkbox will force CurveExpert to do
its calculations in the background. This is recommended, since certain windows processes need attention often.
On the other hand, if CurveExpert is the only application running, then the best performance will be obtained
by leaving this box unchecked. Default: Enabled
No graphs, only information: CurveExpert gives you the option of viewing the graph rst, or the t information
rst. If this checkbox is selected, the model information (coefcients, etc.) will be shown directly, instead of a
graph. Default: Disabled
3D Dialog Effects: Attractive (in the opinion of the author) gray dialogs with 3D effects are the default in
CurveExpert. If you prefer the white dialogs with no 3D effects, deselect this checkbox. Note that this options
is largely obsolete; as all versions of Windows later than Windows 95 have 3D dialog effects by default. Default:
Enabled.
Save Main Window Position: CurveExpert saves the position of the main window when the application is
exited, so that when it is opened again, it assumes the same position. If this behavior is undesirable, deselect
this checkbox. Default: Enabled.
56 Chapter 9. CurveExpert Options
CurveExpert Basic, Release 1.4
9.1.4 Setting the number of Undo Levels
Number of Undo Levels: CurveExpert implements a multilevel undo system for the built-in spreadsheet. The
number of actions that can be undone can be set in this edit eld. The number of levels of undo must range from
1 to 99. If your system has low amounts of memory, then a low number of undo levels will be conserve this
memory. Default: 20.
9.2 Regression Options
The regression options tabbed page sets user preferences that control the regression and mathematical operation of
CurveExpert.
9.2.1 Linear Regression
Maximum Polynomial Degree: Enter the maximum degree of a polynomial allowed by CurveExpert in this
eld. This setting determines the number of polynomials examined by CurveFinder in a search sweep, and it
also prevents choosing a wildly oscillating polynomial by accident. This number may not exceed 19. Default:
10
Default Polynomial Degree: Enter the default degree of polynomials used in CurveExpert in this eld. The
default polynomial degree is the polynomial that will be calculated by the Calculate Groups command, and the
degree that will appear by default when you select a polynomial from the Apply Fit menu. Default: 4
9.2.2 Nonlinear Regression
Regression Tolerance: Enter the desired tolerance for nonlinear regression convergence in this eld. The non-
linear algorithm uses this number to determine whether or not it has converged on the correct model parame-
ters. Mathematically speaking, the difference between the standard errors in two consecutive iterations must be
smaller than this tolerance for the computation to terminate. The smaller the tolerance, the more accurate the
parameters will be, but the algorithm will take much more time to converge. Default: 1e-6
Diverging Iterations: Enter the number of iterations that the standard error (mentioned above) must increase for
the algorithm to declare divergence. Default: 10
Maximum Iterations: Enter the maximum number of iterations for the nonlinear algorithm to perform before it
is forced to terminate. Default: 100
9.2.3 General Regression
Weighting: CurveExpert can either perform no weighting for each point, or weight each point by 1/y^2 as the
nonlinear regression progresses. Using no weighting is most appropriate when no known relationship exists
between the variances of the data around the tted curve and the y values of the points. However, it is often
the case in experiments that it is known that the uncertainty is a certain percentage of the y value; in this case,
weighting the points by 1/y^2 can prevent the larger scatter at higher y from adversely affecting the regression
model. Default: No Weighting
Automatic Initial Guesses: Enabling this checkbox will let CurveExpert generate initial guesses for built-in
nonlinear regressions for you. This option, in effect, enables AutoGuess upon startup. Default: Enabled
Quick Derivatives: The partial derivatives of the model with respect with each of its parameters is required in the
Levenberg-Marquardt algorithm for nonlinear regression. CurveExpert uses central differencing to approximate
9.2. Regression Options 57
CurveExpert Basic, Release 1.4
these partial derivatives; however, more precise approximations can be accomplished using Richardsons extrap-
olation. Checking the Quick Derivatives checkbox uses simple central differencing; leaving this checkbox
unselected forces CurveExpert to use Richarsons extrapolation for the numerical derivatives. The latter is more
accurate, but much slower than using central differences. Default: Enabled
9.3 Printing Options
The printing preferences tabbed page sets user preferences that control printing settings and margins that CurveExpert
will use for graph hardcopies and data tables.
Current Printer Info: This section shows all information for the currently selected printer. The name, driver
version, orientation, paper size, and resolution are shown.
Default Print Type: The default print type determines whether the Black and White or Color printing se-
lection will be automatically selected when a graph is printed. Of course, the user may change the selection at
print-time. This option is included for the convenience of color printer users. Default: Black and White.
Print Margins: The top, left, bottom, and right margins (in inches) can be set in each of these edit elds. Note
that no margin can be less than 0 inches, and no corresponding margins can add to higher than the paper extent
plus the unprintable margin.
Print Setup: Press the Print Setup button to change the current printer and/or the printer conguration.
58 Chapter 9. CurveExpert Options
CHAPTER
TEN
APPENDIX: BUILT-IN NONLINEAR
REGRESSION MODELS
Nonlinear regression models come in all shapes and sizes in CurveExpert, an attempt has been made to include as
many models as possible, while at the same time providing relevant models to a wide range of applications. Also, keep
in mind that if the model that you desire is not built-in to CurveExpert, you may dene your own using the Dene
User Models facility. In CurveExpert, the nonlinear models has been divided into families based on their characteristic
behavior. These families and their members are enumerated below:
10.1 Exponential Family
Exponential models have the exponential or logarithmic functions involved. They are generally convex or concave
curves, but some models in this group are able to have an inection point and a maximum or minimum.
Exponential y=a*exp(b*x)
Modied Exponential y = a*exp(b/x)
Logarithm y = a+b*ln(x)
Reciprocal Logarithm y = 1/(a+b*ln(x))
Vapor Pressure Model y = exp(a+b/x+c*ln(x))
10.2 Power Family
The Power Family involves raising one or more parameters to the power of the independent variable, or raising the
dependent variable to the power of a given parameter. This family is generally a set of convex or concave curves with
no inection points or maxima/minima.
Power Fit y = a*x^b
Modied Power y = a*b^x
Shifted Power y = a*(x-b)^c
Geometric y = a*x^(b*x)
Modied Geometric y = a*x^(b/x)
Root Fit y = a^(1/x)
Hoerl Model y = a*(b^x)*(x^c)
59
CurveExpert Basic, Release 1.4
Modied Hoerl Model y = a*b^(1/x)*(x^c)
10.3 Yield-Density Models
The yield-density models are widely used, especially in agricultural applications. These models historically have been
used to model the relationship between the yield of a crop and the spacing or density or planting. Essentially two types
of response are observed in practice: the asymptotic and parabolic yield-density relations. If the response is such
that as density (x) increases, but the yield (y) approaches a xed value, the relationship is asymptotic. If the response
is such that there is a distinct optimum as the density increases, the relationship is parabolic. Of course, these types of
relationships occur commonly in other scientic areas; therefore, this family of models is very useful.
Reciprocal Model y = 1 / (a + bx)
Reciprocal Quadratic y = 1 / (a + bx + cx^2)
Bleasdale Model y = (a + bx) ^ (-1/c)
Harris Model y = 1 / (a + bx^c)
10.4 Growth Family
Growth models are characterized by a monotonic growth from some xed value to an asymptote. These models are
most common the engineering sciences.
Exponential Association (2) y = a*(1-exp(-bx))
Exponential Association (3) y = a*(b-exp(-cx))
Saturation Growth y = ax / (b + x)
10.5 Sigmoidal Family
Processes producing sigmoidal or S-shaped growth curves are common in a wide variety of applications such as
biology, engineering, agriculture, and economics. These curves start at a xed point and increase their growth rate
monotonically to reach an inection point. After this, the growth rate approaches a nal value asymptotically. This
family is actually a subset of the Growth Family, but are separated in CurveExpert because of their distinctive behavior.
Gompertz Model y = a * exp (-exp(b - cx))
Logistic Model y = a / (1 + exp (b - cx))
Richards Model y = a / (1 + exp(b - cx))^(1/d)
MMF Model y = (ab + cx^d)/(b + x^d)
Weibull Model y = a - b*exp(-cx^d)
10.6 Miscellaneous Family
As with many things in life, some things just dont t into nice categories. The miscellaneous family is the one in
which these different nonlinear regression models live.
Sinusoidal Fit y = a + b*cos(c*x + d)
60 Chapter 10. Appendix: Built-In Nonlinear Regression Models
CurveExpert Basic, Release 1.4
Gaussian Model y = a*exp((-(x - b)^2)/(2*c^2))
Hyperbolic Fit y = a + b/x
Heat-Capacity Model y = a + bx + c/x^2
Rational Function y = (a + bx) / (1 + cx + dx^2)
10.6. Miscellaneous Family 61
CurveExpert Basic, Release 1.4
62 Chapter 10. Appendix: Built-In Nonlinear Regression Models
CHAPTER
ELEVEN
APPENDIX: LEGAL INFORMATION
11.1 Copyright
CurveExpert 1.4 is composed of the following les: 16-bit version:
CURXPT.EXE
CURXPTS.EXE (registered only)
CURXPT.HLP
CURVLIB.DLL
CURVRES.DLL
DIAGEXT.DLL
HKLIB.DLL
HYAPI.DLL
INSTLIB.DLL
CURVES.INI
README.TXT
VENDOR.TXT
HISTORY.TXT
FILE_ID.DIZ
32-bit version:
CVXPT32.EXE
CVXPTS32.EXE (registered only)
CURXPT4.HLP
CURXPT5.CHM
CURXPT4.CNT
CURVRES3.DLL
DIAGEXT3.DLL
INSTLIB3.DLL
HKLIB3.DLL
63
CurveExpert Basic, Release 1.4
HYAPI3.DLL
GLOBAL.INI
CURVES.INI
README.TXT
VENDOR.TXT
FILE_ID.DIZ
CurveExpert Copyright 1995-2010 Daniel Hyams. All Rights Reserved.
The DIAGEXT.DLL tab-control extensions were modied from original source by Freeman-Teresa Software and Mr.
Edward McCreary:
TabCtrl v1.0 Copyright 1995 Freeman-Teresa Software TabDlg3.DLL is Copyright 1994 Edward Mc-
Creary
Microsoft and Windows are registered trademarks of Microsoft Corporation.
Any other proper names are trademarks of their respective companies.
11.2 Software End User License Agreement
IMPORTANT READ CAREFULLY: This End-User License Agreement (EULA) is a legal agreement between you
(either an individual or single entity) and Mr. Daniel Hyams of 1698 Chadwick Court, Hixson, TN 37343(Mr. Hyams)
for the software product CurveExpert 1.4, which will be designated by the term Software Product. The Software
Product consists computer software and online electronic documentation. By installing, copying, or otherwise using
the Software Product, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA,
do not install or use the Software Product.
1. GRANT OF LICENSE. Mr. Hyams grants to you as an individual, a personal, nonexclusive license to make and
use copies of the Software Product. Copies must be made only for backup or archival purposes.
2. SHAREWARE VERSION. You are hereby granted a non-exclusive license to use the Software Product for an
evaluation period of 30 days, after which you must pay the registration fee to continue using the Software Product.
However, use of the Software Product during the 30-day evaluation period is free of charge. Unregistered use of
the Software Product after the 30-day evaluation period is in violation of Federal copyright laws and the terms of
this EULA. Violators will be prosecuted to the maximum extent under the law. You may make exact copies and
distribute the shareware version of the Software Product and its documentation so long as there is no charge applied
to distribution of these unmodied copies of the Software Product. You are specically prohibited from charging or
requesting donations for ANY and ALL copies of this Software Product or its documentation. You are prohibited
from distributing the Software Product or any portion of the Software Product or its documentation as part of another
product (commercial or otherwise) without PRIOR expressed written consent from Mr. Hyams.
3. REGISTERED VERSION. If you have registered the Software Product with Mr. Hyams (meaning to remit payment
according to the order form contained in the online documentation), the 30-day evaluation period in section 2 is
waived. Mr. Hyams agrees to provide you with a registered version of the Software Product, copied onto media
deemed suitable, within 30 days of receipt of payment.
4. REVERSE ENGINEERING. You may not reverse engineer, decompile, or disassemble the Software Product.
5. UPGRADES. All subsequent versions of the software product fall under the terms of this EULA. Upgrades are
designated as software packages of the same name but with an incremented version number.
6. COPYRIGHT. All title and copyrights in and to the Software Product are owned by Mr. Hyams. The Software
Product is protected by copyright laws and international treaty provisions.
64 Chapter 11. Appendix: Legal Information
CurveExpert Basic, Release 1.4
7. WARRANTY DISCLAIMER. The Software Product and the accompanying les are sold as is without warranty of
any kind. All warranties, either express or implied, including, but not limited to, implied warranties of merchantability
and tness for a particular purpose, are expressly and specically disclaimed.
8. LIABILITY. Neither Mr. Hyams or anyone else who has been involved in the creation, production, or delivery
of this Software Product shall be liable for any direct, indirect, consequential, special, incidental, or similar damages
arising out of the use or inability to use such software even if Mr. Hyams has been advised of the possibility of such
damages or claims. In no event shall Mr. Hyamss liability for any damages ever exceed the price paid for the license
to the Software Product, regardless of the form of the claim. The individual using the Software Product bears all risk
as to the quality and performance of the Software Product.
9. GOVERNING LAW. This agreement shall be governed by the laws of the State of Tennessee and shall inure to the
benet of Mr. Hyams, his heirs, successors, and assigns. Any action or proceeding brought by either party against
the other arising out of or relating to this agreement shall be brought only in a state or federal court of competent
jurisdiction located in Chattanooga, Tennessee. The parties hereby consent to in personam jurisdiction of said courts.
11.2. Software End User License Agreement 65
CurveExpert Basic, Release 1.4
66 Chapter 11. Appendix: Legal Information
CHAPTER
TWELVE
ABOUT THE AUTHOR
Hello, my name is Daniel Hyams. I intend to give you the best support possible for this software, so rest assured that
I will do my best to take care of any problem that you encounter, or answer any questions that you might have.
I would like to thank several people. First, Charles Petzold for writing such a fantastic book that was worth more
than gold throughout this project. Next, the beta testers that provided excellent feedback on the performance of this
software, potential uses, and potential problems. A very special thank-you to my wife Michelle, who patiently put up
with my endless work hours on this project throughout its multi-year development. Last and most of all, I would like
to thank the Lord; without His blessing this project would have never materialized.
The Lord is my shepherd, I shall not want. He makes me lie down in green pastures; He leads me beside
quiet waters. He restores my soul. He guides me in the paths of righteousness for His names sake. Even
though I walk through the valley of the shadow of death, I fear no evil, for Thou art with me. Thy rod and
Thy staff, they comfort me. Thou dost prepare a table before me in the presence of my enemies. Thou
hast anointed my head with oil; my cup overows. Surely goodness and lovingkindness will follow me
all the days of my life, and I will dwell in the house of the Lord forever.
Psalm 23, NAS
67
CurveExpert Basic, Release 1.4
68 Chapter 12. About the Author
CHAPTER
THIRTEEN
CONTACTING THE AUTHOR
If you have any questions at all about the use of CurveExpert, or need technical support, feel free to contact the author
at the contact points listed below. Also, suggestions for the improvement of this program are always welcome! Also,
be sure to read over the Benets of Registering. Care has been taken to test CurveExpert 1.4 thoroughly, but as we
know, bugs may still slip through this process. If you have a problem using this program, experience a bug in the
program, or have any suggestions for improvement, please contact me at the address below. For a bug report, the
resolution of the problem will be facilitated greatly by sending me a debug report from CurveExpert.
Daniel Hyams attn : CurveExpert 1.4 1698 Chadwick Court Hixson, TN 37343 (423) 843-1861
http://www.curveexpert.net
[email protected]
69
CurveExpert Basic, Release 1.4
70 Chapter 13. Contacting the Author
CHAPTER
FOURTEEN
FREQUENTLY ASKED QUESTIONS
14.1 Can CurveExpert work with more than one independent vari-
able?
Unfortunately, no; at this time, CurveExpert only supports one independent variable. For multivariate support, check
out CurveExpert Professional.
14.2 How can I cite CurveExpert in a publication?
Hyams, D. G., CurveExpert software, http://www.curveexpert.net, 2010.
14.3 Why does CurveExpert suddenly erase my curve ts off of the
ranking chart?
Any time that CurveExpert detects that the data set has changed, all curve ts are marked as invalid. The ranking chart
shows only those ts that are valid, so the ranking chart is erased. The data set can change by manual editing or using
the built-in data manipulation tools in the Data menu.
14.4 How can I increase the speed at which the graphs are updated?
Particularly if one has a large number of data points, the graphing windows are sometimes updated very slowly, as the
data point marker must be drawn for every point. However, CurveExpert has a setting in its application defaults, called
the Render Level, that can be used to ease the pain of slow redraws. The tradeoff is that a large chunk of precious
GDI memory will be used for each graph is open. Choose File|Preferences, and select Fast Rendering. Note that
when drawing the plot for the rst time, or when resizing the window, it will take just as long for the graph to be
drawn. The advantage comes about because once this drawing is done, it is saved. Now every time the window is
covered/uncovered by another window, or moved to a different location, it does not have to be redrawn from scratch.
71
CurveExpert Basic, Release 1.4
14.5 Why does the chi-square reported in the Information dialog not
match the standard error?
The standard error and the chi-square values are very similar, but dened differently. The chi square is dened as X2
= sum((y-yi)^2/sigmai^2), while the standard error is dened as S = sqrt(sum((y-yi)^2/sigmai^2)/(N-NP)). So, if you
do the math, you get S = sqrt(X2/(N-NP)).
14.6 Why is there a huge number for standard error and correlation
coefcient sometimes? Is this a bug?
No, this is not a bug. This is CurveExperts way of telling you that your data set is badly out of scale in the course
of computing the standard error of the estimate and correlation coefcient, an accumulation of differences between
the curve t and data points and the mean and the data points takes place. If this calculation overows, which is quite
likely when the magnitudes of the x or y data sets are very large, then CurveExpert does the best it can by setting this
sum to the maximum allowed by the data representation (single precision or double precision). This usually leads to
unrealistic values for the standard error and correlation coefcient. The solution to this problem is to rescale your data
to a magnitude of one.
14.7 As nonlinear regression progresses, the indicator for stan-
dard error (S) sometimes freezes, although the iteration counter
keeps on ticking. What is going on?
Without getting into the internals of the Marquardt-Levenberg method for nonlinear regression (see the Theory sec-
tion), sufce it to say that everything is still functioning correctly. If the algorithm detects that the standard error (chi
square) increases during an iteration, then the new parameters are discarded. This naturally forces the chi square for
the current iteration will be the same as the last. However, all is not lost if this situation occurs, the algorithm makes
adjustments to some internal parameters and performs another iteration. It is searching for an optimum value of
these internal parameters so that it can reduce the chi square and therefore nd better parameters. If the chi square
only adjusts itself every other iteration, then the internal parameters are on the edge of optimum and the calculated
regression parameters are being discarded every other time.
14.8 A spline t never matches my data at the points like it is sup-
posed to, and sometimes has spikes and/or wildly oscillating
tendencies. Is there something amiss?
Two items will denitely cause this behavior [1] tting splines to unsorted data or [2] tting splines to data with
replicate values, i.e., two or more x data points are the same. The solution to problem #1 is easy; simply sort the data
using CurveExperts built-in sort feature. Reapply the spline t, and everything should work as planned. If problem
#2 is the issue, then I have to question the use of a spline to t your data. I would recommend that one or more of the
replicate values be removed, or you will be forced to use a regression-type model. Other reasons that splines might fail
is because of the sheer number of data points. Round-off errors in the computations can accumulate, causing incorrect
splines to be shown. Be careful when applying splines to very large data sets. Again, splines are usually used on small
to moderate size data sets. And as always, as yet another reminder, make sure that your data set is scaled to reasonable
numbers (preferably on the order of one). High or low values may be causing excessive round-off error, overow, or
underow in the computations.
72 Chapter 14. Frequently Asked Questions
CurveExpert Basic, Release 1.4
14.9 Lagrangian interpolation sometimes bombs with a oating point
exception. What gives?
Check in your data set for a replicate value, i.e., two or more x data points are the same. If this is an issue, then I have
to question the use of interpolation to t your data. I would recommend that one or more of the replicate values be
removed, or you will be forced to use a regression-type model. And as always, as yet another reminder, make sure
that your data set is scaled to reasonable numbers (preferably on the order of one). High or low values may be causing
excessive round-off error, overow, or underow in the computations.
14.10 I am using a Postscript printer driver, and my plots will simply
not print in the orientation (portrait or landscape) that I tell it
to. Is there anything that I can do?
There is a bug in the Postscript printer driver (perhaps it is xed by now) that causes it to always print in the orientation
specied in the Control Panel. Unfortunately, this means that you cannot adjust the orientation in CurveExpert.
However, you may open the Control Panel, select Printers, select the Postscript printer, and click the Setup button.
Here, you may adjust the orientation. Now plots from CurveExpert will print in the orientation that you have specied
through the Control Panel.
14.11 CurveExpert saves the previous window position, and I dont
want it to. How do I turn this behavior off?
From the File menu, choose Preferences. Deselect the checkbox that says Save Window Position.
14.12 How do I obtain a debugging report to send to the author?
The key is running CurveExpert with the -d parameter. From the Program Manager or File Manager, choose Run. Use
the Browse command to look in the CurveExpert directory and nd the executable, which is CURXPT.EXE. Double
click on this le. You should then see the Run... dialog again with the full path to CURXPT.EXE in the Command
Line eld. Add a -d to the string already in the dialog, and press OK. CurveExpert will now record information both
onscreen and in a le called CXPTxxxx.REC, where xxxx is a unique number. If multiple debug les are saved, they
will be numbered consecutively. If you are having a problem with CurveExpert, the best way to solve the problem
is to contact me, describe the problem, and send the debug le mentioned above. Obviously, the problem should be
reproduced while the debug le is being made.
14.13 Why are grid lines drawn as solid lines (instead of dotted) on
some computers?
I wish that it was a bug in CurveExpert; if it were, I could x it. However, this happens because of a bug in the display
driver installed on your computer. Contact your video card vendor or Microsoft for the latest driver. If your driver is
the latest version, then you may report the bug to the author of the driver (usually the company that manufactured the
video card).
14.9. Lagrangian interpolation sometimes bombs with a oating point exception. What gives? 73
CurveExpert Basic, Release 1.4
14.14 The Internet links pointed to by the menu items under
Help|Internet are now broken. Is there any way that I can
change the addresses to the correct home page?
As long as you know the correct home pages, the links can be easily updated. Run NOTEPAD.EXE, and open the le
CURVES.INI in your Windows directory. Find the section marked [URL], and simply type in the updated CurveExpert
home pages next to the equal signs. For example, if the CurveExpert home page has moved to www.curveexpert.net,
you might change the following:
[URL]
Home=http://curveexpert.webhop.net
to:
[URL]
Home=http://www.curveexpert.net
14.15 The le import dialog never appears, now that I need it. How
do I get it back?
Select Tools|Options and check the Always show File Import Dialog checkbox.
74 Chapter 14. Frequently Asked Questions
CHAPTER
FIFTEEN
REFERENCES
1. Bevington, Philip R., Data Reduction and Error Analysis for the Physical Sciences, 1969, McGraw-Hill, Inc.,
Library of Congress QA278. B48.
2. Daniel and Wood, Fitting Equations to Data, 1971. Wiley & Sons, New York. Library of Congress QA297.D35.
3. Neter, Wasserman, and Kutner, Applied Linear Regression Models, 2nd ed. 1989, Irwin Press, Boston, MA.
Library of Congress QA278.2 .N46.
4. Press, Flannery, Teukolsky, and Vetterling, Numerical Recipes in Pascal, 1989. Cambridge University Press,
New York. Library of Congress QA76.73 .P2N87.
5. Seber and Wild, Nonlinear Regression, 1989. Wiley & Sons, New York. Library of Congress
6. QA278.2 .S425.
7. Ratkowsky, David A., Handbook of Nonlinear Regression Models. 1990. Marcel Dekker, Inc., New York.
Library of Congress QA278.2 .R369.
8. Ratkowsky, David A., Nonlinear Regression Modeling: A Unied Practical Approach. 1983. Marcel Dekker,
Inc., New York. Library of Congress QA278.2 .R37.
75
CurveExpert Basic, Release 1.4
76 Chapter 15. References
CHAPTER
SIXTEEN
INDICES AND TABLES
genindex
modindex
search
77
CurveExpert Professional Documentation
Release 2.0.4
Daniel G. Hyams
March 11, 2014
CONTENTS
1 What is CurveExpert Professional? 1
2 Installation and Activation 3
2.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Starting a Trial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Purchasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 After Purchase: licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Getting started 7
3.1 Load data into CurveExpert Professional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Perform a Nonlinear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Examine the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Export a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5 Visualize your Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 User Interface 9
4.1 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Results Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Graphs and Data Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5 Preview Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Messages Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7 Status bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.8 Menu Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5 Reading Data 19
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2 Raw le import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3 CurveExpert Pro les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Working with Data 25
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.2 Data statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3 The spreadsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Number Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.5 Operating on Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7 Calculating Results 31
7.1 General Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.2 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
i
7.3 Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.4 Nonlinear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.5 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8 CurveFinder 41
8.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.2 Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9 Working with Results 43
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.2 Color Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.3 Badges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.4 Previewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.5 Placing Results on a Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.6 Removing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.7 Querying Result Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.8 Comparing Two Regressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
9.9 Condence and Prediction Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
10 Graphing 55
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
10.2 Graph Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
10.3 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
10.4 Interacting with a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
10.5 Changing Graph Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
10.6 Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.7 Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.8 Automatic annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.9 Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.10 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
10.11 Saving graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
10.12 Copying graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
10.13 Printing graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
10.14 Graph Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
10.15 2D Contour Graphing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
10.16 3D Graphing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.17 Keyboard Shortcuts for Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.18 Mathtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
11 Graph Theme Manager 93
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.2 Series properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
11.3 Graph elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
11.4 What is contained in a graph theme? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
12 Creating Custom Models and Functions 97
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.2 Custom Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.3 Custom Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
12.4 Custom Models: Advanced Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
12.5 Custom Functions: Advanced Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
13 Plugins 103
13.1 What is a plugin? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
ii
13.2 Running a Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
13.3 Managing Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
13.4 Writing/Editing Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
13.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
13.6 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
14 Equation Display 111
15 Writing Data 113
15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
15.2 Writing a CurveExpert Professional (CXP) le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
15.3 Exporting a dataset to text le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
15.4 Writing a graph to a picture le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
15.5 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
16 Application Preferences 115
16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
16.2 General Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
16.3 Regression Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
16.4 Graphing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
16.5 Logging Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
16.6 Localization Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
16.7 Advanced Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
17 Localization 127
17.1 Executive Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
17.2 Conguring CurveExpert Professional to match your workow . . . . . . . . . . . . . . . . . . . . 127
17.3 File overrides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
17.4 CurveExpert Professional les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
17.5 NIST verication les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
18 Validation 129
18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
18.2 Running the Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
18.3 Performing validations yourself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
19 Miscellaneous 131
19.1 Log Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
19.2 Running Multiple Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
19.3 Where les are located . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
20 End User License Agreement 135
21 Third-Party Licensing 137
21.1 Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
21.2 WxWidgets and WxPython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
21.3 Numpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
21.4 Scipy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
21.5 Matplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
21.6 xlrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
21.7 BioPython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
21.8 winpaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
21.9 Python Imaging Library (PIL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
21.10 Icons and Artwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
21.11 JPEG library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
iii
21.12 prettyPhoto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
22 Appendix A: Math Functions 145
22.1 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
22.2 Transcendental Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
22.3 Bessel Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
22.4 Comparison Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
22.5 Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
22.6 Array Specic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
22.7 Logical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
23 Appendix B: Math Symbol Reference 159
23.1 Subscripts and superscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
23.2 Fractions, binomials and stacked numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
23.3 Using parenthesis properly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
23.4 Radicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
23.5 Accents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
23.6 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
24 Appendix C: Theory 165
24.1 Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
24.2 Nonlinear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
25 Appendix D: References 169
26 Appendix E: Plugin API 171
26.1 Basic API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
26.2 Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
26.3 Graph Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
27 Indices and tables 187
Python Module Index 189
Index 191
iv
CHAPTER
ONE
WHAT IS CURVEEXPERT
PROFESSIONAL?
CurveExpert Professional is a cross-platform solution for curve tting and data analysis. Data can be modelled using
a toolbox of linear regression models, nonlinear regression models, smoothing methods, or various kinds of splines.
Over 60 models are built-in, but custom regression models may also be dened by the user. Full-featured publication-
quality graphing capability allows thorough examination of the curve t. The process of nding the best t can be
automated by letting CurveExpert compare your data to each model to choose the best curve. The software is designed
with the purpose of generating high quality results and output while saving your time in the process.
CurveExpert Professional compares very favorably to the competition and does so at a lower price; for an interactive
comparison, visit http://www.curveexpert.net/products/compare-to-the-competition. The major features of the soft-
ware are enumerated below:
Multiplatform: runs on Windows, Mac, and Linux. Saved les are portable between platforms.
Easy-to-use User Interface: most mathematically-intensive applications are very dicult to use. CurveExpert
Professional has a very intuitive interface, which allows you to import your data, generate results, and create
publication-quality plots with very minimal eort. In fact, to import a le takes only four clicks, and generating
a battery of results with associated graphs takes two more.
Robust le import: data les come in many shapes and sizes, and CurveExpert Professional makes importing
your data les very easy. The smart le reader avoids non-data areas of your le dynamically, and attempts to
nd labels for each column of data in your le.
Publication quality graphs: an arbitrary number of graphs can be created and saved. The rendering of the
plots is of publication quality, with full antialiasing support and the ability to extensively customize each graph.
Graphs can be saved to a variety of graphics le formats, and they may be directly copied and pasted into
another application. For the purposes of 3D plotting, scatterplots, surfaces, and contour plots are supported.
Graph themes allow you to customize a look that you prefer, and reuse it. Graphs are interactive, with zooming,
panning, autoscaling, and view stack capability.
Multivariate: linear and nonlinear regressions can be computed for datasets with multiple independent vari-
ables, without any limits.
Multicore: put your extra CPU cores to work and compute results more quickly. A typical speedup is 3.5X on
a 4 core system.
Built-in models: over 60 built-in nonlinear models, with high-quality automatic initial guesses, are available
for use. The provided models cover all of the major families.
Detailed Result Query: parameter values and uncertainties, covariance matrix, parameter histories, residual
plots. Forward and backward evaluation of the models value, dierentiation, integration, and table generation.
1
CurveExpert Professional Documentation, Release 2.0.4
Residual runs test, F-Tests, Akaikes Information Criterion Test. All results formatted beautifully in HTML
reports, with fully customizable numerical formatting.
Custom models: you can also dene models yourself, using a very large library of built-in mathematical func-
tions, and parameters in your models can take any name that you like. For more advanced users, a model can
be as complex as necessary, as long as it can be expressed as a Python function. This allows the creation of
extremely complicated models, instead of the normal one-line-equation models limitation in other software.
Further, the number of parameters is unlimited.
Functions: much like models, a suite of built-in functions (over 40) can be evaluated, and you can dene your
own custom functions as well.
Ranking of results: results are automatically ranked by your choice of score, correlation coecient, standard
error, or coecient of determination.
Validated: validated against the Statistical Reference Datasets Project of the National In-
stitute of Standards and Technology. These datasets can be downloaded directly at
http://www.itl.nist.gov/div898/strd/general/dataarchive.html, but are also included verbatim in the Curve-
Expert distribution for you to use yourself.
Quality spreadsheet: the built-in spreadsheet allows you to manually enter data and/or modify it with a suite
of data transformation tools. Data entry and cutting and pasting capabilities are as easy as Excel.
Localization: Importing data or interoperating in European-style environments (which use a comma as a dec-
imal) is extremely easy; regional settings are automatically obeyed, or can be selectively enabled in order to
match your particular workow.
Logging: a log of actions is kept across sessions of the software, in case you need to recreate a particular result.
A messages pane keeps you informed of the status of every computed result.
Documentation: Extensive documentation in HTML, PDF, and EPUB format, available both directly from the
software and online at http://docs.curveexpert.net/curveexpert/pro.
2 Chapter 1. What is CurveExpert Professional?
CHAPTER
TWO
INSTALLATION AND ACTIVATION
2.1 Installation
2.1.1 Windows
To install on Windows platforms, simply run the installer, either from the command line or by double clicking it in
the Windows explorer. The automated installer will start and guide you through the installatin process; just follow the
on-screen prompts. CurveExpert Professional will install for all users (if you are the Administrator), or for you only
(if you are not). This allows you to install CurveExpert Professional without any Administrator privileges.
Windows automated installs
The installer for Windows operating systems recognizes two command line switches: /S for silent installs, and
/D=dirname to specify where the program should be installed. For example, in an environment where a system
administrator would want to install the program silently to the directory d:\sharedprogs, one would do:
> CurveExpertPro-2.0.0-win32.exe /S /D=d:\sharedprogs
2.1.2 Mac/OSX
To install on an Apple Macintosh, double click the downloaded .zip archive. If this le is in your Downloads folder,
the installation process will start immediately. Otherwise, a .pkg le will be created. In that case, run the .pkg le by
double clicking it, and the installation process will then start. Then, follow the on-screen prompts to complete your
installation.
CurveExpert Professional is not an Apple-signed application. Therefore, Gatekeeper (if you have OSX Mountain
Lion or later) will complain about this fact. This behavior is normal, and it is safe to ignore the complaints from
Gatekeeper.
2.1.3 Linux
Note: CurveExpert Professional is a 32-bit application, and as such, requires 32-bit libraries to be installed, and
in some cases, the 32-bit libraries must be present even before the CurveExpert Professional installation process. If
you are running a pure 64-bit Linux installation, you will likely have to install your distributions 32-bit compatibility
libraries. Usually, you can install the 32-bit version of zlib, gtk libraries, and standard c++ library, and that will be
enough (on Debian/Ubuntu distributions, this is packages: ia32-libs-gtk, lib32z1, and lib32stdc++6).
3
CurveExpert Professional Documentation, Release 2.0.4
To install on a Linux machine, rst download the .run le from the CurveExpert Professional web site. Usually, this
le will not download with the correct permissions to be run directly. So, give the le execute permissions and then
run the downloaded package directly from the command line:
% chmod +x CurveExpertPro-2.0.0-Linux.run
% ./CurveExpertPro-2.0.0-Linux.run
Alternatively, you can double-click the downloaded .run le in your le manager, but before you do this, you must
give the le execute permissions by right clicking on the le, selecting Permissions, and checking Give le executable
permissions (or Allow executing le as program) before you can run the le directly from the le manager.
Then, follow the on-screen prompts to complete your installation.
CurveExpert Professional has been tested on the following Linux distributions. If a particular distribution is not listed,
that does not necessarily mean that the application will not run properly; as long as the distribution is reasonably
recent, the software should work with no problems.
SuSe 11.0 [WORKS]
SuSe 11.1 [WORKS]
SuSe 11.2 [WORKS]
SuSe 11.3 [WORKS]
SuSe 11.4 [WORKS]
Kubuntu 10.04 [WORKS]
Kubuntu 10.10 [WORKS]
Kubuntu 8.10 [WORKS]
Ubuntu 10.10 [WORKS]
Ubuntu 12.10 [WORKS]
Xubuntu 12.10 [WORKS]
Fedora 13 [WORKS]
Fedora 14 [WORKS]
CentOS 5.0 [FAILED: libc version is too old: 2.7 required]
CentOS 5.5 [FAILED: libc version is too old: 2.7 required]
Mandriva 2010 Spring [WORKS]
Linux Mint Debian 6 [WORKS]
Debian 6 [WORKS]
In the Linux arena, there are two primary desktop systems: GNOME and KDE. CurveExpert Professional integrates
well with GNOME, oering a desktop icon, appropriate menu entries and icons, le association between .cxp les,
and icons for .cxp les. Under KDE, desktop integration is not fully developed. Desktop icons and menu entries are
created, but the icons for these do not yet work. File association also works, but the icons for .cxp les are not yet
functional.
To run the software from the command line, run the cepro.sh script. For example, if CurveExpert Professional was
installed in your home directory, the command would be:
~/CurveExpertPro/cepro.sh
4 Chapter 2. Installation and Activation
CurveExpert Professional Documentation, Release 2.0.4
2.2 Starting a Trial
If you want to evaluate CurveExpert Professional on a trial basis, you can start a trial period by selecting Help-
>Activate Trial Period; note that an Internet connection is required for the starting of the trial period, but is not
required once the trial period has been activated.
Note: If you use an authenticating proxy for Internet access, please set the appropriate proxy settings in Edit-
>Preferences->Advanced (see Proxy settings).
This trial period is active for approximately 30 days from activation date. During this period, all features of Curve-
Expert Professional are accessible. When the software is out of its trial period (either before or after), most output
functions are disabled, and a watermark appears on all graphs.
After evaluation via the trial period, please consider purchasing the software at http://www.curveexpert.net/order.
2.3 Purchasing
To purchase CurveExpert Professional, visit http://www.curveexpert.net/order, and choose the product that you would
like to purchase.
2.4 After Purchase: licensing
If you have purchased a CurveExpert Professional license, will received the license information via email. Licenses
are fullled within 24 hours of receipt; average turnaround time between purchase and license fulllment is 2 hours.
Proceed to Help->Enter License, and paste the entire email into the box. The elds below the box (Name, Company,
etc.) will update, and you can then press OK to complete the process.
If you are not sure how to copy and paste the email, highlight the text of the email with your mouse (click and drag),
and press Ctrl+C (Cmd+C on a Macintosh). Then, just press the Paste button in the Help->Enter License window.
Thank you for your support of CurveExpert Professional!
2.2. Starting a Trial 5
CurveExpert Professional Documentation, Release 2.0.4
6 Chapter 2. Installation and Activation
CHAPTER
THREE
GETTING STARTED
This guide leads you through the bare minimum of information you need to know in order to run CurveExpert Profes-
sional successfully. See the User Interface chapter for a full explanation of the interface.
7
CurveExpert Professional Documentation, Release 2.0.4
3.1 Load data into CurveExpert Professional
Read a sample le supplied with CurveExpert Pro. Choose File->Open, double click on example_data, set the le
lter to *.dat, and double click the le beanroot.dat. When the File Import dialog appears, simply click OK. (see
Reading Data)
3.2 Perform a Nonlinear Regression
Choose Calculate->Nonlinear Model Fit. Select the Sigmoidal Family, which automatically selects all of the members
of that family for computation. Click OK. (see Calculating Results)
3.3 Examine the Results
As a result of the computation, the results will be shown in the left pane in CurveExpert Pro, ranked in order from
the best t to the worst t (see Working with Results). Double click, or right-click and select Details..., on any of the
results to see details (see Querying Result Details). Also, you can click the tabs in the graph stack (the right hand pane
in CurveExpert) to see visualizations of the results. Later, you can add graphs of your own.
3.4 Export a Table
Double click on a result in the Results pane to see its details, and click the Table tab in order to generate a table for
that result (see Table).
3.5 Visualize your Results
In the Graphs and Data pane, two graphs have been automatically created for you; one that shows the data only,
and one that shows the data plotted with the top few results that have been computed. To add a graph that you can
manipulate freely, click the + tab in the Graphs and Data pane (see Graphing), and add results by simply dragging
and dropping them from the Results pane.
8 Chapter 3. Getting started
CHAPTER
FOUR
USER INTERFACE
The CurveExpert Professional user interface is divided into panes:
Results
Graphs and Data
Preview
Messages
The panes, as well as the toolbar and status bar, are labeled clearly in the graphic below:
9
CurveExpert Professional Documentation, Release 2.0.4
All of the panes can be shown or hidden via the Window menu in the menu bar. Further, panes (except for the Graphs
and Data pane) can be torn out from the main window; grab the pane by its title bar, and tear it out. The panes can
be redocked in the main window by the reverse operation; drag the window to one of the docking indicators, and
a transparent hint will appear to show where the window will be docked. Using this procedure, the panes can be
rearranged inside the main window to taste.
Panes can be quickly maximized by clicking the small box at the top right of each pane; this allows the pane to ll the
entire main window. Restoring the size of the pane can be performed by clicking the double-box at the top-right of the
pane. This gives a quick means of viewing a particular pane (most commonly the Graphs and Data pane) in full size.
All panes can be hidden by clicking the X at the top right of the pane, or by deselecting the corresponding pane name
in the Window menu. To show a pane after being hidden, select the corresponding pane name in the Window menu.
10 Chapter 4. User Interface
CurveExpert Professional Documentation, Release 2.0.4
4.1 Menus
If current conditions are such that a particular result cannot be computed, it will be dimmed in its Calculate menu.
For example, with only one point in the dataset, an interpolation cannot be computed. So, all interpolations in the
Calculate menu will be dimmed and therefore unselectable. See Menu Reference for a quick explanation of each of
the menu choices.
4.2 Toolbar
The toolbar can be shown or hidden via Window->Toolbar.
Each button on the toolbar has a one-to-one mapping to an item in the menus. The toolbar is divided up into the
following sections:
File
Edit
Calculate
Tools
Help
The buttons are each documented below.
4.1. Menus 11
CurveExpert Professional Documentation, Release 2.0.4
Icon Meaning
File->New. Reinitializes the application with an empty dataset and no results. When New is selected, you must input the desired number of columns in the new dataset.
File->Open. Opens a new (text) data le or CurveExpert Pro le.
File->Save. Save the current data, results, graphs, and notes into a CurveExpert Pro le.
File->Print. Prints the contents of the spreadsheet as a data table. If you would like to print all graphs, hold SHIFT while selecting File->Print.
Edit->Undo. Undo the last appropriate action.
Edit->Redo. Redo the last appropriate undone action.
Edit->Cut. Cuts the selected item(s) to the clipboard as appropriate.
Edit->Copy. Copies the selected item(s) to the clipboard as appropriate.
Edit->Paste. Pastes data from the clipboard as appropriate.
Calculate->Linear. Calculates a straight line regression for the data.
Calculate->Nonlinear Model Fit. Shows the nonlinear regression picker so that you can select a model or models to compute.
Calculate->Cubic Spline. Calculates a cubic spline for the data.
Calculate->Lowess Smoothing. Immediately calculates a Lowess smoothing of the data.
Calculate->Function. Shows the function picker so that you can select a function or functions to compute.
Tools->CurveFinder. Runs the CurveFinder to scan models for the best t for your data
Tools->Custom Models(Simple). Opens the custom model creator (simple interface)
Help->Manual. Opens the documentation.
12 Chapter 4. User Interface
CurveExpert Professional Documentation, Release 2.0.4
4.3 Results Pane
The results pane displays a list of the currently calculated results. This list is color-coded and badge-coded; see
Working with Results for an explanation of the color codes and badges.
The items displayed in the columns of the results pane can be customized by right-clicking the column headers. The
following items may be selected for display:
Name (required; cannot be deactivated)
Kind
Family
Score
R (correlation coecient)
R^2 (coecient of determination)
Std_Err (standard error)
Remember that you can send results to a plot, remove a result, or view result details by right-clicking a particular
result. See Working with Results for details.
4.4 Graphs and Data Pane
The Graphs and Data pane is a notebook where the dataset and graphs reside (as well as any notes that you would like
to save). Please refer to The spreadsheet for information on how to work with the dataset via the built-in spreadsheet.
Refer to Graphing for documentation concerning how to work with graphs.
Two graphs are always present: Data Plot and Top Results. As the name implies, the Data Plot always displays
your raw data with no other results. Top Results displays the top n results from each calculation that the user has run;
n is congurable via Edit->Preferences->Graphing->Automatically plot top n results.
To add another graph, simply press the + tab; this adds another graph for you to build as you see t. You may also
rename any of your custom plots by right-clicking on the tab and selecting Rename; this assists in keeping track of
multiple graphs. Also, you can delete a graph entirely by right-clicking the graph tab and selecting Delete. Finally,
you can copy (clone) a graph by right-clicking the appropriate graphs tab and selecting Clone.
Your notebook can also be rearranged to taste. Select one of the notebook pages (by clicking on it), and then hold the
shift key along with a left or right arrow key to move the selected notebook page left or right, respectively. Using the
left/right arrow keys without holding shift simply selects the page to the left or right, respectively.
Remember that, for a graph that you have created, you can drag and drop results from the results pane to plot any
results of interest.
4.5 Preview Pane
The preview pane displays the result that is pointed to in the Result pane, or, if a result is pointed to in a graph, the
preview pane also updates to the pointed-to-result. While convenient, the preview window can cause the user interface
to be sluggish on older computers; to disable the preview, simply hide it by deselecting Window->Preview, or more
straightforwardly, click the X at the top right of the preview pane.
4.3. Results Pane 13
CurveExpert Professional Documentation, Release 2.0.4
4.6 Messages Pane
The Messages Pane is an area where CurveExpert Professional sends all notications for your perusal. For example,
when a le is read, the a summary of the le contents appears in the Messages pane. Also, when any calculation is
undertaken, a summary of the result appears in the Messages pane.
The content of the messages pane can be copied and pasted to another application by highlighting a portion, right-
clicking, and selecting Copy, or by using Ctrl+C (on a Mac, Cmd+C).
Error messages appear in the Messages pane in red, and special messages appear in blue. All messages that appear in
the Message pane are automatically logged, and be accessed after-the-fact via Tools->Log Viewer (see Log Viewer).
4.7 Status bar
The status bar is divided into ve sections, which show the following items:
Sec-
tion
Displays
1 typically shows vital statistics for the currently pointed-to result, or displays help when appropriate.
2 size of the currrent dataset (nrows x ncolumns)
3 dimension of the dataset, which determines the mode of the application
4 current locale
5 number of helper processes present that perform calculations (see Max number of cores to utilize). Each
asterisk represents one helper process.
4.8 Menu Reference
Note: On OSX, some menu items appear both in the CurveExpertPro menu at the top left of the menubar (in order
to conform to Apple UI guidelines), and in their standard locations as documented below. Specically, Preferences
(documented throughout this manual as Edit->Preferences), About (documented below as Help->About), and Quit
CurveExpert Pro (documented below as File->Exit).
14 Chapter 4. User Interface
CurveExpert Professional Documentation, Release 2.0.4
4.8.1 File menu
Menu choice Purpose
File->New Reinitializes the application with an empty dataset and no results. When New is selected, you
must input the desired number of columns in the new dataset.
File->New
from
Clipboard
Reinitializes the application with a dataset imported from the clipboard. The le import dialog
allows you to ne-tune the importing process.
File->Open Opens a new (text) data le or CurveExpert Pro le.
File->Recent
les
Opens a previously opened le.
File->Close Closes the current le.
File->Save Save the current data into a le.
File->Save As Save the current data into a le, under a dierent name.
File->Export exports the current dataset as a text le.
File->Print Prints the contents of the spreadsheet as a data table. If you would like to print all graphs, hold
SHIFT while selecting File->Print.
File->Print
Preview
Shows a print preview of the spreadsheet data, optionally printing it as well. If you would like
to print preview for all graphs, hold SHIFT while selecting File->Print Preview.
File->Page
Setup
allows setting of preferences for margins, paper orientation, etc., for printing.
File->Exit close CurveExpert Professional
4.8.2 Edit menu
Menu choice Purpose
Edit->Undo Undo the last appropriate action. For data in the spreadsheet, see Undo and Redo.
Edit->Redo Redo the last appropriate undone action. For data in the spreadsheet, see Undo and Redo.
Edit->Cut Cuts the selected item(s) to clipboard as appropriate. For selections of data, see Cutting,
Copying, and Pasting.
Edit->Copy Copies the selected item(s) to clipboard as appropriate. For selections of data, see Cutting,
Copying, and Pasting.
Edit->Paste Pastes items from the clipboard as appropriate. For pasting of data, see Cutting, Copying, and
Pasting.
Edit->Clear clears the selected data as appropriate, without placing it on the clipboard.
Edit->Select
All
Selects all items as appropriate.
Edit-
>Preferences
Opens a dialog where the application settings/preferences can be viewed and/or modied. See
Application Preferences.
4.8. Menu Reference 15
CurveExpert Professional Documentation, Release 2.0.4
4.8.3 Data menu
Menu choice Purpose
Data->Sort sort the selected data by the rst column. See Operating on Data.
Data->Scale scale the selected data by a factor. See Operating on Data.
Data->Translate translate (add) a constant to the selected data. See Operating on Data.
Data->Transform Apply a general transformation to the selected data. See Operating on Data.
Data->Crop Crop the data to a selected minimum and maximum; removes points from the
dataset. See Operating on Data.
Data->Clamp Clamp the selected data to a minimum and maximum. See Operating on Data.
Data->Rotate Rotate the columns in a dataset to the left. See Operating on Data.
Data->Add/Remove
STDDEV Column
Add or remove a standard deviation column to/from the dataset, as appropriate.
Data->Statistics Show the basic statistics for the dataset. See Data statistics.
4.8.4 Calculate menu
Menu choice Purpose
Calculate->Linear Fit Calculates a straight line regression for the data. See linreg.
Calculate->nth Order
Polynomial
Calculates a polynomial t for the data, with a user-selectable degree. See linreg.
Calculate->Nonlinear
Fit
Shows the nonlinear regression picker so that you can select a model or models to
compute. See nonlinreg.
Calculate->Linear
Spline
Calculates a linear spline for the data (dot-to-dot). See interpolation
Calculate->Cubic
Spline
Calculates a cubic spline for the data. See interpolation
Calculate-
>Polynomial
Spline
Calculates an nth-degree polynomial spline for the data. See interpolation
Calculate->Tension
Spline
Calculates a tension spline for the data. See tensionsplines
Calculate->Moving
Average
Calculates a moving average for the data, with parameters such as the window size and
type to be specied. See movingaverage
Calculate->Lowess
Smoothing
Calculates a Lowess smoothing of the data. See lowess.
Calculate->Function Shows the function pick so that you can select a function or functions to compute. See
functions.
16 Chapter 4. User Interface
CurveExpert Professional Documentation, Release 2.0.4
4.8.5 Tools menu
Menu choice Purpose
Tools->CurveFinder Runs the CurveFinder to scan models for the best t for your data. See
CurveFinder.
Tools->Custom
Models(Simple)
Opens the custom model creator with the simple one-line-equation interface. See
Custom Models.
Tools->Custom
Models(Advanced)
Opens the custom model creator with the advanced interface. See Custom
Models: Advanced Usage.
Tools->Custom
Functions(Simple)
Opens the custom function creator with the simple one-line-equation interface.
See Custom Functions.
Tools->Custom
Functions(Advanced)
Opens the custom function creator with the advanced interface. See Custom
Functions: Advanced Usage.
Tools->Manage Graph
Themes
Create/delete graph themes. See Graph Themes and Graph Theme Manager.
Tools->Run NIST Validation Check CurveExpert Pro against certied NIST results. See Validation.
Tools->View Logs View the log les. See Log Viewer.
4.8.6 Window menu
Menu choice Purpose
Window-
>Results
Toggle the Results pane on and o. See User Interface.
Window-
>Graphs and
Data
Toggle the Graphs and Data pane on and o. See User Interface.
Window-
>Messages
Toggle the Messages pane on and o. See User Interface.
Window-
>Preview
Toggle the previewing pane on and o. See User Interface.
Window-
>Toolbar
Toggle the main toolbar on and o. See Toolbar.
Window->Dock
All
Dock all oating panes back into the main window. See User Interface.
Window-
>Restore to
Default
Restores all panes the the default layout (docked, Results pane top left, Preview bottom left,
Graphs and Data top right, and Messages bottom right). See User Interface.
4.8.7 Help
Menu choice Purpose
Help->Manual Displays the CurveExpert Professional manual (HTML version).
Help->Web Site Displays the CurveExpert web site.
Help->Discussion Forum Displays the CurveExpert user-to-user discussion forum.
Help->Tutorial Videos Displays the available video tutorials for CurveExpert Pro
Help->Activate Trial Period activates a 30 day trial period for CurveExpert Pro; see Installation and Activation.
Help->Enter License after purchase, enter your license for the software; see Installation and Activation.
Help->Order direct link to the website for ordering.
Help->Check for Updates Checks to see if your version is the latest one; requires Internet access.
Help->Show Diagnostics Displays diagnostic information in the Messages pane.
About Displays the application about box.
4.8. Menu Reference 17
CurveExpert Professional Documentation, Release 2.0.4
18 Chapter 4. User Interface
CHAPTER
FIVE
READING DATA
5.1 Introduction
The rst task in any data analysis program like CurveExpert Professional is to read or import your data into the
software. For this, CurveExpert Pro provides a robust le import mechanism, which can be accessed simply by
choosing File->Open. You can read in both native CurveExpert les (.cxp) and generic data les in text format.
Note: To be able to choose les with extensions other than .cxp, you must select the appropriate extension in the
bottom right corner of the le choosing dialog.
Most of the time, the data to be read in is contained within a text le of some sort, with headers and comments
interspersed. CurveExpert Professional tries to make the job of importing this data as easy and painless as possible.
The le import intelligently examines your raw le in order to nd the data, as well as nding column headers for that
data, if present.
5.2 Raw le import
To read in a text le (common extensions are .dat and .txt, but can be anything that you choose), simply choose File-
>Open, and then the lename. Alternatively, drag and drop the le to the CurveExpert Pro spreadsheet. The le import
window will display, as follows:
19
CurveExpert Professional Documentation, Release 2.0.4
Basic information about the le is shown at the top of the window, where the complete path to the le, le size, and
the number of lines detected in the le is displayed. The middle section of the window is where you set parameters
necessary for reading in the le. Most of the time, default options are appropriate, and there is not much more to do
except to glance at the spreadsheet preview in the bottom third of the window, and click the OK button. However,
in cases where the defaults are not appropriate, there are a range of settings you can manipulate to read your le in
successfully.
5.2.1 Number of independent variables
First, the number of independent variables must be set. CurveExpert Professional normally guesses the number of
independent variables to be the number of columns detected in your le minus one. You may change this setting if the
default is not correct. Initially, in the absence of any column labels in the le, the independent variables are always
called X1, X2, X3, and so on, and the dependent variable is called Y. The result of your operation is shown instantly
in the spreadsheet preview.
Note: CurveExpert Professional always expects the independent variable column(s) to be to the left of the dependent
variable column.
20 Chapter 5. Reading Data
CurveExpert Professional Documentation, Release 2.0.4
5.2.2 Numeric format
By default, the numeric format is set according to the settings in Edit->Preferences->Localization (see Localization).
The two available settings are English (use dots for decimals) and European (use commas for decimals). Select the
appropriate numeric format for your le.
5.2.3 Standard deviation in last column
If the last column of your dataset is standard deviation data, make sure to check the standard deviation in last column
checkbox. A typical situation is that, on import of a three column dataset, CurveExpert guesses that there are two
independent variables and no standard deviation data. To remedy the situation, simply set the number of independent
variables to 1, which will leave the last column unassigned. Then, select Standard deviation in last column The result
of your operation is shown instantly in the spreadsheet preview.
5.2.4 Rotate columns left
Some raw datasets list the dependent variable rst. If this is the case, checking Rotate columns left will shift the data
in the rst column to the last, moving all other columns to the left. This is the ordering that CurveExpert Professional
expects (independent variables rst, and the dependent variable following). For a two column dataset, this operation
is equivalent to swapping the columns. To see the eects of your choice here, the Reread le button must be pressed.
5.2.5 Autoll
Sometimes, the independent variable is implied by the ordering of the data. If you would like to generate the rst
column of data as a simple range and increment, select Autoll rst column, and then choose the starting value and
increment between each data point. The result of your operation is shown instantly in the spreadsheet preview. The
ll is computed as follows:
x = x
start
+ ix
where i is the point id (starting at zero for the rst point), x
start
is the starting value input, and x is the increment
input.
5.2.6 Treatment of Header and Footer
Often, data les have text that is not part of the dataset, and this text appears either before or after the real dataset (or
both). To accommodate for this, you can set the Header Skip and Footer Skip, which is the number of lines in the le
that are skipped at the top and bottom, respectively, before any attempt is made at reading data. This capability can
also be used to intentionally skip over certain data in your le.
The header and footer skip can be thought of as a mask that is applied to your le before any reading takes place.
CurveExpert Professional uses a sophisticated procedure to try to guess the header and footer skip correctly. In all but
the most esoteric cases, the header and footer skips will be correct already, and therefore need no interaction from the
user.
Note: Anewline at the end of your le counts as just that; a newline. This line is skipped by CurveExpert Professional
because it is a line with no data. Therefore, it is common for the footer skip to be set to 1 by the automatic header/footer
algorithm.
5.2. Raw le import 21
CurveExpert Professional Documentation, Release 2.0.4
5.2.7 Comment character
Most data les have comments interspersed throughout them, sometimes in the middle of the data. In order to skip
these comments, the character that designates the comment must be specied. In the data le, then, anything that
appears after a comment character is ignored. Common comment characters are # and %.
5.2.8 Refreshing the preview
If rotating columns or changing the header/footer treatment, you must press the Reread le button to refresh the
preview.
5.2.9 File import preview and raw le preview
The le import preview shows the result of the reading of the le, augmented by the current settings discussed above.
This preview shows you exactly what CurveExpert Professional will read and place in the main spreadsheet.
The raw le preview shows you a copy of the le, with no modication, so that you can see the contents. Line numbers
are annotated on the left, the the header and footer skip settings are shown by dimming the areas of the le that are
masked away by these settings.
5.2.10 Column Labels
CurveExpert Pro attempts to detect the labels of your columns, such that they are correctly read into the software. To
detect the column labels, the le reader examines one line above the skipped header, if such a line exists. In other
words, if the header skip is set to 10, line 10 is examined for the column labels. First, the line is trimmed of any white
space and comment characters, and then broken into individual tokens. If the number of items on this line is the same
as the detected number of columns, these tokens are treated as the column names, as long as they look like names.
To look like a name, the labels must begin with an alphabetical character, and only contain legal punctuation ()+-*.
So, your data le can look something like this:
Comments at the top of the file are automatically
ignored by the file reader, because
it can tell
that there is no numeric data there.
# or you can comment with a designated comment character
time(s) voltage(volts)
1.0 4.5
2.0 4.23
3.2 4.1
In the example above, the column labels will be automatically detected as time(s) and voltage(volts).
5.2.11 Other le metadata
To force the localization of a given text le, see File overrides for the required header information.
5.2.12 Finishing
When the le import preview looks like the desired dataset, simply hit OK; your data will be read and placed into the
main spreadsheet.
22 Chapter 5. Reading Data
CurveExpert Professional Documentation, Release 2.0.4
5.3 CurveExpert Pro les
CurveExpert Pro les contain the data, results, graphs, and notes. To save a .cxp le, simply choose File->Save or
File->Save As as appropriate. Correspondingly, to read a .cxp le, choose File->Open.
These les are portable across platforms (Mac, Windows, and Linux), so you can read a le in on a Mac that was
generated in Windows, for example.
Also, if a particular model or function is saved as a result in a CXP le and it is not present on the system reading the
le, the model/function will automatically be created on your behalf. This newly created model/function will then be
available for use in the Imported family, and will appear appropriately in the Nonlinear model or function pickers.
5.3. CurveExpert Pro les 23
CurveExpert Professional Documentation, Release 2.0.4
24 Chapter 5. Reading Data
CHAPTER
SIX
WORKING WITH DATA
6.1 Introduction
The raw data in CurveExpert Professional is handled as a simple matrix of numbers; the dataset is made up of a number
of rows and a number of columns. Usually, the last column is interpreted as the dependent variable, and the ncol-1
columns before this are all of the independent variables. However, if you have selected in the le import that the last
column is a column of standard deviation data per point, the last column is appropriately treated in this manner.
6.2 Data statistics
Simple statistics for the current dataset can be obtained by selecting Data->Statistics. The resulting window will
display the number of points and columns, and the following stats for each column of your dataset:
minimum
maximum
range
average (mean)
standard deviation
The average is computed with the standard formula:
x =
1
N
N

i=1
x
i
Standard deviation is computed with the following formula, which is called the standard deviation of the sample:
=

_
_
1
N
N

i=1
(x
i
x)
2
To copy the statistics information to the clipboard, press the Copy button at the bottom of the dialog.
6.3 The spreadsheet
The spreadsheet resides in the Graphs and Data pane in CurveExpert Professional.
25
CurveExpert Professional Documentation, Release 2.0.4
The spreadsheet allows manual entry or modication of a dataset either entry-by-entry, or by cutting and pasting from
within CurveExpert Professional, or from other sources. An example of the spreadsheet is shown below;
All cells that hold data are white, and cells that are not part of the dataset are colored in gray. At the end of the dataset
is one light-gray row, which signies that the cells may be typed into (in order to add data points), but are not yet part
of the dataset.
Right-click the spreadsheet in order to access operations that you can perform on the data itself, in-place.
The name of a column of data can be changed by right-clicking the appropriate column header and selecting Rename
Column (alternatively, double click the column header). These names are for user information only, but are used if
an entire dataset with multiple dependent variables is sent to a graph; the column names are used to dierentiate the
various curves in the legend.
The name of a row of data can be changed by right-clicking the appropriate row header and selecting Rename Row
(alternatively, double click the row header). These names are currently for user information only.
26 Chapter 6. Working with Data
CurveExpert Professional Documentation, Release 2.0.4
6.3.1 Cursor Movement
Cursor movement in the spreadsheet is normally accomplished with the TAB and RETURN keys; TAB moves the
cursor to the right, and RETURN moves the cursor downward. Of course, the arrow keys and PAGEUP/PAGEDOWN
may also be used to move the cursor. If it is desired to move the cursor with a carriage-return like approach (in which
the RETURN key moves the cursor to the next line if at the end of a row), this can be selected in Edit->Preferences-
>General->Excel style cursor movement.
To reverse the direction of cursor navigation, hold the SHIFT key.
6.3.2 Cutting, Copying, and Pasting
When copying data, the current selection in the spreadsheet is placed on the clipboard (and obeys your regional settings
while doing so). If no data is selected, all data is copied. The delimiter used between columns, if applicable, is the
delimiter chosen in Edit->Preferences->General->Default Delimiter.
A cut must involve all columns of the dataset. Therefore, the Cut item in the data menu is dimmed if your selection
only involves some of the columns. This behavior is due to the fact that a cut will remove points from the dataset, and
your selection should reect that reality.
A paste from the clipboard informs CurveExpert Professional to attempt to intelligently read what is on the clipboard
and turn that into an intermediate dataset for subsequent pasting. Dierent rows in this intermediate dataset are delim-
ited by newlines (or carriage returns), and columns are delimited by whitespace or commas (unless using European
format for incoming numbers, in which case commas are not valid as a delimiter). This intermediate dataset will then
be inserted at the current cursor location in the spreadsheet, overwriting parts of your existing dataset and extending
your existing dataset as necessary. A paste operation can be viewed as an insertion of a block of data at the current
cursor location, following by a subsequent discarding of any data that happens to fall outside the current number of
columns of your dataset.
6.3.3 Inserting Rows
To insert a row into your dataset, right click on the spreadsheet and select Insert Row. This will cause all rows at
or below the current cursor location (indicated by the black outline) to be shifted downwards, and a new row will be
inserted at the current location.
To insert multiple rows at once, select a range in the spreadsheet, right click, and select Insert Row as before. In
this case, all rows touched by the selection will be shifted downwards, and new rows are inserted at the current cursor
location. The number of inserted rows will equal the number of rows in the original selection. For example, to insert
three rows at row 2, select rows 2-4 (inclusive) and select Insert Row.
6.3.4 Removing Rows
To remove rows from the dataset, select a set of rows to be removed, right click, and select Remove Rows. This is
functionally similar to cutting the rows (see above), except that the data is not copied to the clipboard.
6.3.5 Undo and Redo
All data operations are undoable and redoable to a number of levels possible by the Edit->Preferences->Advanced-
>Peak Undo Memory Usage setting. All data operations are undoable and redoable to a number of levels possible by
the Edit->Preferences->Advanced->Number of undo levels setting. So, you can feel comfortable manipulating data
knowing that any transformation, clear, or cut/paste operation can be undone.
6.3. The spreadsheet 27
CurveExpert Professional Documentation, Release 2.0.4
6.4 Number Formatting
The values shown in a spreadsheet may be formatted by selecting a block via the mouse, right clicking, and selecting
Format Numbers from the resulting menu. A dialog will appear as follows:
A General formatting prints a number naturally as most practitioners would write the number. Scientic formatting
prints the number always with a mantissa and exponent part, as in 1.532e+04. Engineering formatting is almost
the same as scientic, but the exponent is always guaranteed to be a multiple of three. Percentage formatting shows a
decimal as a percentage, with a following percentage sign. For example, the number 0.05 would be shown as 5.0%.
The Decimal places eld allows the user to specify the number of decimal places shown; this setting is relevant for all
formatting settings listed above except for General.
The Leader and Trailer elds allow the user to place customized text before and/or after the number. These elds
are very useful for adding units to numbers (use the trailer) or prepending a dollar sign for currencies (place $ in the
Leader eld).
6.5 Operating on Data
CurveExpert Professional provides several ways that you can operate on raw data in the spreadsheet. To perform these
operations, simply highlight the data that you want to work on, and select one of Sort, Scale, Translate, Transform,
Crop, or Clamp from the Data menu. Alternatively, you can right click on the spreadsheet after making a selection. If
no selection is made, the operation is assumed to apply to the entire dataset (all rows and all columns).
6.5.1 Sort
To sort your data against the rst column of the dataset, select Sort from the Data menu (the entire dataset must be
selected in the spreadsheet). If CurveExpert Professional has detected that the data is already sorted, this menu item
will be dimmed. If the choice is nondimmed, however, it does not necessarily mean that the dataset is already sorted.
Sorting your dataset is crucial for splining of your data or other operations that depend on the data being sorted.
6.5.2 Scale
To multiply by or divide the selected data by a factor, select Data->Scale.
6.5.3 Translate
To add a constant value to the selected data, select Data->Translate.
6.5.4 Crop
To drop points from the selected part of your dataset that are above or below a certain threshhold, select Data->Crop.
After a cropping operation, there is likely to be fewer data points in your data set than before the crop. Usually,
cropping is used to eliminate outliers from a dataset.
6.5.5 Clamp
To clamp points in the selected part of your dataset to a certain threshhold value, select Data->Clamp. Clamping is
usually used to correct values that are slightly over or under a valid domain for that value.
28 Chapter 6. Working with Data
CurveExpert Professional Documentation, Release 2.0.4
6.5.6 Rotate
To rotate columns in a dataset, select Data->Rotate. For a dataset with two columns, this is exactly the same as a
column swap. Note that the rotation always proceeds to the left in a circular fashion; the leftmost column becomes the
rightmost one after the rotation, and all other columns are displaced by one to the left.
6.5.7 Transforming Data
Data->Transform allows you to map the selected part of your dataset through a general function. If this menu item is
selected, you can enter an expression, as a function of x, and all selected data will be evaluated via this function. Note
that x, in this context, just refers to the selected data.
For example:
x + 5
pow(x*100,0.75)
degrees(x)
In the transformation, you may use any functions listed in Appendix A: Math Functions. Note that both the Scale and
Translate operations above can just as easily be done via a transformation here.
6.5. Operating on Data 29
CurveExpert Professional Documentation, Release 2.0.4
30 Chapter 6. Working with Data
CHAPTER
SEVEN
CALCULATING RESULTS
CurveExpert Professional supports four distinct classes of results:
regressions
linear regressions (linear and polynomial ts)
nonlinear regressions (built-in and custom models)
interpolations
linear spline
cubic spline
polynomial spline
tension spline
smoothings
lowess smoothing
moving averages
functions (built-in and custom functions)
All of these results can be accessed through the Calculate menu in CurveExpert Professional, or optionally via the
corresponding buttons on the toolbar (see Toolbar).
Note: A distinction is made between models and functions. Models have free parameters, and are therefore
dependent on the independent variables and the parameters: f
_
x; a
_
. Functions are dependent on the independent
variables only, with no free parameters: f
_
x
_
.
7.1 General Guidelines
7.1.1 Scaling Datasets
For best results, always scale your data sets to the order of one. You may do this prior to reading in your data le, or
after your data le has been imported using the scaling feature in CurveExpert Pro (see Operating on Data).
Imagine a data set with x values ranging from 1000 to 10000 and a regression model where the term exp(a*x) is
involved. Unless a very good initial guess for a is given, chances are that an exponential to a very large power
(eg. exp(1000)) will be taken in the course of the nonlinear regression algorithm. The calculation will overow,
and the regression will fail as a result. Even if the regression happens not to fail, the regression algorithm will have
31
CurveExpert Professional Documentation, Release 2.0.4
an exceedingly tough time nding the correct parameters, since a small change in the free parameters will cause a
tremendous change in the size of the term. The moral of the story: always scale your data!
As another example, if you have data that describes atmospheric pressure at dierent elevations, you might have (in
metric units) a data set that looks like:
x=[-100, 0, 100, 500, 1000, 4000] meters
y=[102000,101325,101000,100500,100000,99900] Pascals
Using the Data->Scale feature in the Data menu of CurveExpert Pro, you can scale this data using a scale factor of
0.001 on the x data, and 0.00001 on the y data. So, you would then have the following data set:
x=[-0.1, 0, 0.1, 0.500, 1, 4] kilometers
y=[1.02,1.01325,1.01,1.005,1.0,0.999] bars
The second example is much more likely to allow nonlinear regressions to converge, and also will allow higher order
polynomial ts to be performed with more accuracy. If you have a data set that seems particularly ill-behaved, scaling
can help solve this problem.
Note that CurveExpert Pro is able to perform correctly on data in any scale, as long as the calculations do not overow
or underow. So, if a data set is giving problems, scaling it should be the rst action to take.
7.1.2 Set the tolerance parameter reasonably
Dont set the tolerance parameter (in Edit->Preferences->Regression) too low. In regression modeling, not much
advantage is to be gained by setting a very strict tolerance. Its main purpose in life is to prevent the nonlinear regression
algorithm from converging on local minima, not to make the calculated parameters more accurate.
7.1.3 Data should be appropriate to the model
Make sure that the data is appropriate to the model. Especially look out for using logarithmic or exponential families
of models with data that contains zeros or negatives. For example, it is not possible, in any shape or form, to obtain a
negative or zero with the basic exponential model (y=ae^(bx), assuming a is positive; the inverse problem exists for a
negative a). So, it is not wise to use a model that cannot reect the trends in the data.
7.1.4 For interpolations, data points must be sorted
If you are using an interpolation-type curve t, the data points must be sorted by ascending x. Use the Data->Sort
feature in CurveExpert Pro to sort your data points correctly.
7.1.5 Sometimes, it is unavoidable
Some curve ts are simply ill-behaved, i.e. prone to divergence. For some data sets, it may not be possible to converge
certain nonlinear regression models.
7.2 Interpolation
7.2.1 Introduction
An interpolation, by denition, passes through every data point, and as such, the correlation coecient will always
be 1, and the standard error will always be zero. CurveExpert Professional supports polynomial splines and tension
32 Chapter 7. Calculating Results
CurveExpert Professional Documentation, Release 2.0.4
splines. All splines are dened in a piecewise fashion between data points.
Note: The dataset must be sorted (based on the independent variable) in order for any spline interpolation to work.
Select Data->Sort from the main menu in order to sort your dataset if necessary. If CurveExpert Pro detects that your
dataset is not sorted, it will not allow spline interpolations to be selected.
Note: Currently, CurveExpert Professional supports interpolation for datasets with one independent variable only.
For multivariate datasets, all interpolations will be disabled.
7.2.2 Linear Splines
To calculate a linear spline, select Calculate->Linear Spline from the main menu. The linear spline is simply a
polynomial spline of order 1. It appears as a dot-to-dot connecting each point with a straight line segment. Linear
splines only guarantee continuity of the spline at the data points.
7.2.3 Cubic Splines
To calculate a cubic spline, select Calculate->Cubic Spline from the main menu. The cubic spline is simply a polyno-
mial spline of order 3; cubic splines are the most common form of spline. Cubic splines guarantee continuity in the
spline, and continuity in the rst and second derivatives of the spline at the data points. At the endpoints, the second
derivative is set to zero, which is termed a natural spline at the endpoints, as the curvature goes to zero.
7.2.4 Polynomial Splines
To calculate a generic polynomial spline, select Calculate->Polynomial Spline from the main menu. A prompt will
appear to ask for the degree of the polynomial spline; by way of example, a degree of 1 would be a linear spline, and
a degree of 3 would be a cubic spline.
7.2.5 Tension Splines
To calculate a tension spline, select Calculate->Tension Spline from the main menu. A prompt will appear to ask for
the amount of tension desired. Tension splines are based on hyperbolic functions, and simulate a cord being stretched
with a dened tension (amount of force) between the data points. An extremely high tension approaches a linear
spline, and low tensions will appear correspondingly loose around the data points, resembling a cubic spline.
7.3 Linear Regression
7.3.1 Introduction
Linear regressions, as a class of results, can be calculated directly, and do not need an iterative process like nonlinear
regressions do. See Linear Regression in the appendices for a more in-depth explanation. A linear regression can be
constructed from any model that is a linear combination of functions; the coecients in the linear combination are the
parameters to be found.
There are two types of linear regressions supported in CurveExpert Pro: linear and polynomial. All other regressions,
even if they could be calculated as a linear-type regression through a variable transformation, are computed with the
nonlinear regression engine.
7.3. Linear Regression 33
CurveExpert Professional Documentation, Release 2.0.4
7.3.2 Linear Fit
In CurveExpert Pro, you can choose to calculate a straight line regression:
y = ax + b
by choosing Calculate->Linear Fit. For multivariate datasets (more than one independent variable), a straight line
regression is computed as
y =
NVAR

j
a
j
x
j
+ b
For example, for a 3D data set,
y = ax
1
+ bx
2
+ c
7.3.3 nth Order Polynomial Fit
To calculate a polynomial via linear regression, choose Calculate->nth Order Polynomial Fit. A prompt will appear to
ask for the degree of polynomial desired. Also, in the same prompt, you can choose to force the polynomial through
the origin, which forces the intercept to zero. After entering the degree (and origin forcing option), the polynomial
will be computed and added to the result list.
Note: Polynomial ts computed via linear regression are supported only for 2D datasets. To compute a similar
polynomial for multivariate datasets, use the nonlinear regression capability, selecting or dening a model as necessary.
7.4 Nonlinear Regression
7.4.1 Introduction
Nonlinear regressions are solved with the Marquart-Levenberg method as documented in Nonlinear Regression in the
appendices. To calculate a nonlinear regression, select Calculate->Nonlinear Model Fit from the main menu.
7.4.2 Selecting a Model or Models
Upon selecting Calculate->Nonlinear Model Fit, the nonlinear regression picker will appear; all models appear in this
picker (built-in models and custom models) that are appropriate for the number of independent variables in the dataset.
A screenshot of the model picker is below:
34 Chapter 7. Calculating Results
CurveExpert Professional Documentation, Release 2.0.4
On the left side of the dialog is where the desired models can be selected. Models can either be selected individually
(by clicking the checkboxes next to the model), or a family at a time (by selecting the checkbox next to the desired
family). All models can be selected by clicking the root of the tree labeled Nonlinear Models.
A search eld appears below the picker, so that you can lter the models to a certain specication. For example, typing
sig in the search eld will show all models that have sig in their name, or belong to a family with sig in its name.
The search eld allows you to quickly nd a desired model in the hierarchy.
For convenience, the list of currently selected models will appear in the Currently Selected Models list in the upper
right region of the picker. A preview of the equation for the currently pointed-to model is rendered in the Equation
preview region in the bottom right area of the picker.
The Automatic Initial Guesses checkbox allows you to enable or disable automatic initial guessing for the calculation
of the selected nonlinear models. If this box is enabled, CurveExpert Pro will provide high-quality initial guesses for
built-in models, and for custom models, the custom model initialization (if any) will be called. If this box is disabled,
you will be prompted for initial guesses for every model selected.
Note: if automatic initial guesses are disabled, the multicore capability, if enabled, will not be used for the currently
selected batch of models.
Creating a Custom Model
The nonlinear model picker also provides for a quick way of creating a custom model (normally, custom models are
created with Tools->Custom Models, see Creating Custom Models and Functions). To utilize this feature, simply click
on the Create a Custom Model expander. This will open a small area in which you can type the name and equation for
a model, and save it. Upon saving, the new custom model will be immediately available in the left pane for selecting.
7.4. Nonlinear Regression 35
CurveExpert Professional Documentation, Release 2.0.4
7.4.3 Manually setting initial guesses
Two situations cause the manual initial guess window to appear; one is if you choose to disable automatic initial
guesses in the nonlinear model picker. The other is if a nonlinear regression fails, and you choose to set the initial
guesses yourself in an eort to successfully calculate that model.
The manual initial guess window is shown below:
For informational purposes, the name, family, and equation for the nonlinear regression is shown in the upper left
quadrant of the window. The parameters can be adjusted in the bottom left quadrant by clicking on the entries. As you
adjust parameters, the graph drawn on the right will adjust accordingly. This gives real-time feedback on the parameter
adjustment so that you can quickly rene the initial guesses into a reasonable state.
7.5 Smoothing
7.5.1 Introduction
Smoothings generate a new set of data points from the existing dataset. In CurveExpert Pro, Lowess smoothing is
supported, as well as moving averages with an averaging window dened by the user.
7.5.2 Lowess Smoothing
To calculate a Lowess smoothing, select Calculate->Lowess Smoothing from the main menu. Lowess smoothing
(which stands for LOcally WEighted Scatterplot Smoothing) builds on regular linear regression in order to smooth an
existing dataset; in this context, an entirely new dataset will be generated that represents the smoothed data. Lowess
smoothing generates a polynomial t to a subset of data around each point in the dataset. More weighting is given
to points near the point of interest, and less weight is given to points far away. After the polynomial is determined, a
smoothed y data value is obtain by evaluating the polynomial at x.
36 Chapter 7. Calculating Results
CurveExpert Professional Documentation, Release 2.0.4
The weighting function used is the tri-cube weighting function for x < 1:
w(x) =
_
1 x
3
_
3
where x = (x
i
x
p
){s, and the weighting function is zero for x >= 1. x
p
is the point of interest, and s is the maximum
distance of any point in the local dataset to x
p
.
The polynomial used by CurveExpert Pro is a simple degree-one linear regression. Once the smoothed values are
obtained, a linear spline is used to connect the points for visualization and evaluation purposes.
Note: William S. Cleveland: Robust locally weighted regression and smoothing scatterplots, Journal of the Amer-
ican Statistical Association, December 1979, volume 74, number 368, pp. 829-836.
Note: William S. Cleveland and Susan J. Devlin: Locally weighted regression: An approach to regression analysis
by local tting, Journal of the American Statistical Association, September 1988, volume 83, number 403, pp. 596-
610.
7.5.3 Moving Averages
Moving average applies an averaging window to each point in a dataset, in turn, in order to generate a new set of data.
The size and type of window determine the amount of averaging that will take place. To calculate a moving average,
select Calculate->Moving Average from the main menu. A dialog will appear that will allow you to select the window
to utilize for the averaging.
The rst parameter to select for the window is its size. Here, you can select the size (sometimes called the extent) of
the window in terms of units (meaning a distance along the x axis), or in terms of number of points. The (0.0) location
7.5. Smoothing 37
CurveExpert Professional Documentation, Release 2.0.4
on the preview is always dened to be at the x location of the point being window averaged. The window preview will
continually update in order to show the currently dened window. Note that the underlying dataset must be sorted in
order for the window to be specied in terms of a number of points. If the dataset is not sorted, the points choice is
disabled.
The window type can also be selected from the following:
rectangular
Bartlett (triangular)
Blackman
Hamming
Hanning
The window type aects the weighting factor that is applied to each point within the window that is to be averaged.
For example, a rectangular window applies a weight of 1 to all points within the window.
Finally, the relative window position can be set. Usually, a centered window is used, which places the center of the
window at the same x location as the data point being averaged (location 0.0). Alternatively, you can select a leading
or lagging window, which places the window ahead of the data point or behind the data point, respectively.
After tuning the window parameters to the desired settings, click OK, and the moving average will compute and
display.
7.6 Functions
7.6.1 Introduction
Functions in CurveExpert Professional depend on the independent variables (x) only, with no free parameters. Func-
tions are available in CurveExpert Pro for convenience, and you can perform all of the normal operations on functions
that you can on any other results.
To calculate a function, select Calculate->Functions from the main menu. There does not have to be a dataset present
in order to compute a function.
Note: A distinction is made between models and functions. Models have free parameters, and are therefore
dependent on the independent variables and the parameters: f
_
x; a
_
. Functions are dependent on the independent
variables only, with no free parameters: f
_
x
_
.
7.6.2 Selecting a Function or Functions
Upon selecting Calculate->Functions, the function picker will appear; all functions appear in this picker (built-in func-
tions and custom functions) that are appropriate for the number of independent variables in the dataset. A screenshot
of the function picker is below:
38 Chapter 7. Calculating Results
CurveExpert Professional Documentation, Release 2.0.4
On the left side of the dialog is where the desired functions can be selected. Functions can either be selected individu-
ally (by clicking the checkboxes next to the model), or a family at a time (by selecting the checkbox next to the desired
family). All functions can be selected by clicking the root of the tree labeled Functions.
A search eld appears below the picker, so that you can lter the functions to a certain specication. For example,
typing bes in the search eld will show all functions that have bes in their name, or belong to a family with bes
in its name. The search eld allows you to quickly nd a desired function in the hierarchy.
For convenience, the list of currently selected functions will appear in the Currently Selected Functions list in the
upper right region of the picker. A preview of the equation for the currently pointed-to function is rendered in the
Equation preview region in the bottom right area of the picker.
Creating a Custom Function
The function picker also provides for a quick way of creating a custom function (normally, custom functions are
created with Tools->Custom Functions, see Creating Custom Models and Functions). To utilize this feature, simply
click on the Create a Custom Function expander. This will open a small area in which you can type the name and
equation for a function, and save it. Upon saving, the new custom function will be immediately available in the left
pane for selecting.
7.6. Functions 39
CurveExpert Professional Documentation, Release 2.0.4
40 Chapter 7. Calculating Results
CHAPTER
EIGHT
CURVEFINDER
8.1 Usage
CurveFinder is a tool that you can use to search all available regressions (and Lowess smoothing) for the best t to
your data. When CurveFinder is run, it will compute a fairly large list of results, and they will be shown in ranked
order in the Results pane.
The use of the CurveFinder tool is quite straightforward; simply choose Tools->CurveFinder from the main menu, and
then select the results that you want included in the calculation.
In this context Linear Regression refers to a polynomial of degree 1, which is the same straight line obtained from
choosing Calculate->Linear. You can also choose the range of polynomials that should be searched, which ranges
from 2 up to the lesser of 20 and the number of points in the dataset minus one. Nonlinear regressions (either built-in,
custom, or both) can also be searched. Also, a Lowess smoothing can be searched.
For convenience, you can use the All On/All O button to turn all results on or o, as appropriate. After selecting
the set of results that should be computed, simply press the OK button.
8.2 Cautions
Just because a particular model is ranked high in the Results pane does not mean that it is necessarily a good choice.
Make sure to visually inspect the curve that represents your model. Polynomials, in particular, are very prone to
41
CurveExpert Professional Documentation, Release 2.0.4
oscillation, and can veer wildly away from the dataset before returning to be near the data points at each x value. Make
sure that the model that you choose as best is a reasonable representation of your data.
42 Chapter 8. CurveFinder
CHAPTER
NINE
WORKING WITH RESULTS
9.1 Introduction
Once any results have been calculated, whether they are curve ts (regressions), interpolations, smoothings, or func-
tions, they appear in the result pane ranked in order of their score (the result pane normally is shown in the upper left
part of the CurveExpert Pro application, see User Interface). The score reects how closely the model adheres to the
underlying data. Note that functions (as opposed to models) do not have a score, as they are not associated with the
data directly in any way.
In the results pane, the results can also be sorted by any of the items displayed in the column header (name, kind, family,
score, correlation coecient, coecient of determination, or standard error) simply by clicking the appropriate column
header. Note that you can right-click on the column header in order to customize what is displayed in the results list;
by default, the name, kind, and score is displayed.
When selecting results, you can simply click on the result (which selects it), or use multiple selection by holding down
SHIFT or CTRL when clicking on results. This allows you to apply an operation to batches of results at once.
Every result in the results pane has a unique icon indicating the kind of result that it is. The table below shows meaning
of each icon.
Icon Meaning
Linear regression model (includes polynomials)
Nonlinear regression model (curve t)
Data smoothing
Function
9.2 Color Coding
Also in the results pane, each result has a color coding of green or yellow. An example is shown below:
43
CurveExpert Professional Documentation, Release 2.0.4
A green color coding indicates that the result was calculated successfully; it does not mean that the result is necessarily
good; that is indicated by its score. The green coloring only indicates that the calculation of the result proceeded
smoothly, and it is not possible to get a better result than what is given. In the common parlance of nonlinear regression,
the parameters of the t are said to be converged.
A yellow color coding indicates that the result should only be used with caution. It indicates that the calculation
succeeded, but with reservations. The most common cause for this is a nonlinear regression calculation that did not
converge before the maximum number of iterations (congurable via Edit->Preferences->Regression) was reached.
Again, the score will indicate how well the model adheres to the data.
If a result is presented in yellow, it is highly recommended to examine the residual and parameter histories to see if
the parameters would have changed further if the max number of iterations is higher. Double click on the result in the
results pane, and select the Convergence tab in the resulting dialog. Also examine the PHist tab.
9.3 Badges
Every result is badged with either a green checkmark or a yellow exclamation point. The intention here is to inform the
user when a result becomes invalid due to a change in the underlying dataset. For example, if a nonlinear regression
is calculated, and then the dataset is scaled (using, say, the tools in the Data menu), that nonlinear regression becomes
invalid, and an attention badge is placed on that result in the results pane to signify this.
44 Chapter 9. Working with Results
CurveExpert Professional Documentation, Release 2.0.4
To remedy the situation, you can update the result yourself by right clicking on the result and selecting Update, or,
if you would like to keep the old result and compute a new one, simply reselect the desired result from the Calculate
menu, and an entirely new result will be generated.
Badge Meaning
Data unchanged since calculation of this result
Data changed since calculation of this result
9.4 Previewing
Pointing at a result will show its preview in the preview pane, usually at the bottom left of your application. Also, the
standard error and correlation coecient, if applicable, will display in the status bar at the bottom of the application
window.
9.5 Placing Results on a Graph
There are several ways for a result to be shown on a graph; the rst is automatic, in that the top scoring results (usually
the top 3), are automatically placed in the Top Results graph whenever a new calculation is performed.
To place a specic result on a graph that you have created (press + in the Graphs and Data pane), you can:
right click a result in the Results pane, and select Send to Plot
drag and drop the result from the Results pane into a graph, and that will add the result to the graph.
Note: To send multiple results to a graph at once, you can multiple select items in the result pane with either the shift
or control key. Then drag and drop, or right-click and select Send to Plot as normal.
9.6 Removing Results
If you decide that a result is no longer needed, select it, right click, and pick Remove. This action is not undoable, but
certainly the result can be calculated again by simply picking it from the Calculate menu.
Like placing results on a graph, you can remove multiple results at once by shift-clicking or control-clicking to select
the results that you want to remove.
If the results are shown in any graph, they are removed from the graph as well.
9.7 Querying Result Details
If you want to get more detail on a calculated result, either double-click it in the Results pane, or right-click and select
Details. This will display a window very similar to the following:
9.4. Previewing 45
CurveExpert Professional Documentation, Release 2.0.4
In the result details window, you can examine a particular result much more closely. The left pane shows the name of
the result, its family, and an equation for the result, if applicable. For a model, the tted parameters are also shown on
the left. To copy result details to the clipboard in text format, simply click the Copy button.
The notebook on the right contains several items of interest, most notable of which is the result graph (in which a
graph is shown with just the data and the single result), and the table tool, in which a data table can be generated with
this result. The following sections describe each section of the notebook.
9.7.1 Result Graph
The result graph simply shows the data and the current result, so that you can visualize the result without the (possible)
clutter of having other results on the same plot. All of the graphing capabilities (see Graphing) are also available here,
including zooming, panning, changing the graph properties, saving the plot to le or clipboard, and printing.
As you move your pointer over the graph, the live model evaluation tool above the notebook activates and displays
your current xy location, the result evaluated at x, and the results derivative evaluated at x. A marker follows the
result depedending on where the mouse pointer is placed. This behavior can be disabled by unchecking the Live
box above the graph, or it can be made to only activate when the left mouse button is pressed ( by setting the Live
box to its intermediate state).
9.7.2 Detail
The Detail notebook section contains a formatted report that shows the basic statistics of the result, such as the standard
error, correlation coecient, and coecient of determination. Also, the covariance matrix and parameter uncertainties
46 Chapter 9. Working with Results
CurveExpert Professional Documentation, Release 2.0.4
are displayed as appropriate.
The style of numeric formatting can be adjusted using controls at the top of the report, where you can choose from
normal, xed point, or scientic notation (and choose the precision for each as appropriate). Also, you can choose
the condence level with which the parameter uncertainties are reported. Any adjustment to any of these controls will
cause the report to be regenerated automatically.
Press the Export HTML button in order to export an HTML le of the report. Press Print Report in order to send the
report directly to the printer.
9.7.3 Residuals
The Residuals notebook section shows the dierence between the result and the data, as a function of the independent
variable. All of the graphing capabilities (see Graphing) are also available here, including zooming,panning, changing
the graph properties, saving the plot to le or clipboard, and printing.
Also displayed on the residuals plot is a straight-line t to the residual points. This regression line (colored light red)
shows whether there is an upward or downward trend to the data (indicated by the slope of the line) as well as showing
whether the residuals bias upward or downward.
Also, a Wald-Wolfowitz runs test is performed on the residuals. At the bottom of the plot, the observed number of runs
is listed, as well as the likelihood that this observed number of runs could occur if the model used to t the data was
correct (i.e., the residuals are randomly distributed around the curve). If the probability is less than 5%, CurveExpert
Pro states that the run pattern of the residuals is unlikely; if greater than 5%, the pattern is not unlikely (which is
distinctly dierent than being likely, which cannot be claimed). A higher likelihood is desirable, obviously.
9.7. Querying Result Details 47
CurveExpert Professional Documentation, Release 2.0.4
9.7.4 Convergence
For nonlinear regressions (which is the only type of result for which this page appears), a graph of the convergence
history is displayed. The norm of the residual (dierence between the result and the data) is shown as a function of
iteration number, and the change in the residual is also shown as a function of the iteration number. If the iteration has
converged, the residual on the last iteration should be to the level set in the application preferences. One exception to
this is if the iteration has terminated based on lack of change in parameters, rather than lack of change in the residual.
48 Chapter 9. Working with Results
CurveExpert Professional Documentation, Release 2.0.4
9.7.5 Parameter Histories (PHist)
For nonlinear regressions (which is the only type of result for which this page appears), a graph of the parameter
histories is displayed. The value of each parameter is shown as a function of iteration number. Here, you can see
whether or not the parameters have settled on a particular value before the iteration was terminated. Unless the
iteration is terminated due to exceeding the maximum number of iterations set in the application preferences, the
parameters are always at at the right side of the plot, indicating that they are settled.
9.7. Querying Result Details 49
CurveExpert Professional Documentation, Release 2.0.4
9.7.6 Analyze
The Analyze notebook page is a toolbox of mathematical operations that you can apply to the current result. Select
the operation that you want to enact by selecting the appropriate sub-tab. You can calculate y as a function of x, x as
a function of y, dierentiate the result, integrate the result, or compute the arclength of the result. Simply select the
appropriate sub-tab, ll in the numbers, and hit Go. Also note that pressing Enter in any of the llable elds is the
same as hitting the Go button; this allows you to quickly change the numbers being computed without having to reach
for the mouse.
For each type of result, a helpful graphic will be drawn on the graph. For example, if integrating, the area under the
curve between the two limits of integration will be shown.
50 Chapter 9. Working with Results
CurveExpert Professional Documentation, Release 2.0.4
9.7.7 Table
The Table notebook page allows you to create data tables corresponding to your result. Specify the min, max, and
increment of your table, click Update, and the table spreadsheet will update to show the calculated values. To write
the table, press Save... at the bottom. Alternatively, if you want your table on the clipboard for subsequent pasting into
another application, press Copy.
Normally, an Evaluation style table is appropriate; an evaluation table simply evaluates the results at each of the
points in the independent variable column. An Accumulation table computes the integral
_
x
i
x
0
f
_
x; a
_
dx
for every point in the dataset, where x
0
is the min value specied for the table.
At the bottom of the table, before you copy or save, you can pick Selection only to only save the data that you have
currently selected in the table spreadsheet. Otherwise, the entire table is saved or copied. Also, you can select the
delimiter to use between values on the same row. The default delimiter can be set at Edit->Preferences->General-
>Default delimiter.
9.7. Querying Result Details 51
CurveExpert Professional Documentation, Release 2.0.4
9.8 Comparing Two Regressions
CurveExpert Pro has the capability of comparing two regressions (curve ts) to provide some basis for the superiority
of one versus the other. To compare two regressions, simple right click on a regression in the Results Pane, and pick
Compare To.
The compare tool will appear, which presents a report in the left side, and the graph, with both regressions drawn, in
the right side. By default, both regressions will have their condence and prediction bands shaded in matching colors
with their curve. If desired, these can be turned o by modifying each curves properties via the normal properties
dialog (right click and select Properties, or as a shortcut, press 2 or 3).
52 Chapter 9. Working with Results
CurveExpert Professional Documentation, Release 2.0.4
To compare two regressions, CurveExpert Pro uses both the Akaike Information Criterion (AIC) test, and the more
commonly known F-Test. The better of the two ts, as judged by these two tests, is shown at the top of the report in
the Comparision section. Following the best t choices, a justication is given as to the reason for the choice, as well
as supporting calculations.
One should note that the F-Test is only valid in cases where one model is a subset of the other; i.e., the less complex
model can be obtained from the more complex one by judicious choice of the model parameters. CurveExpert Pro, at
this time, has no means of determining whether or not this is true, so the interpretation of the F-test results is left up to
the user. the AIC test is valid in any case, and is therefore the preferred method of comparision in CurveExpert Pro.
If you would like to print the report, simply click Print Report at the bottom of the comparison tool. Also, any part of
the report can be copied out with the normal copying procedure (highlight and then pres Ctrl+C).
9.9 Condence and Prediction Bands
For any regression (linear or nonlinear), the condence bands and prediction bands can be shown. In order to show
these bands, and/or change their appearance, right click the plot, select Properties->Series, and then select the ap-
propriate series (alternatively and much more quickly, if the regression is the 3rd entry in the legend, press 3). If the
series is a regression, options to control the appearance of the condence band and prediction band will be present.
See Series Page for more information on changing the appearance of the bands.
The condence band is the area that has a certain likelihood (typically 95%, but you can adjust the level to your liking)
of containing the true curve that ts the data.
The prediction band is the area that has a certain likelihood (typically 95%, but you can adjust the level to your liking)
of containing any future data points. The prediction band is always wider than the condence band.
9.9. Condence and Prediction Bands 53
CurveExpert Professional Documentation, Release 2.0.4
54 Chapter 9. Working with Results
CHAPTER
TEN
GRAPHING
10.1 Introduction
CurveExpert Professional contains a fully-featured graphing engine. The graphs are publication quality and are fully
antialiased for the best possible appearance. Graphs are also themeable in order to save the user time in the production
of a large number of similar plots.
Both 2D and 3D graphing is supported. The 3D graphing is activated when a dataset is read in or created that has two
independent variables. When a dataset with more than two independent variables is read in, graphing is disabled.
10.2 Graph Types
There are three types of graphs supported by CurveExpert Professional. These three types are XY, Polar, and 3D.
10.2.1 XY Plots
XY plots, by denition have two axes in Cartesian space. XY plots are appropriate for showing relationships between
cause and eect, or equivalently, the relationship between one independent variable and one dependent variable.
Note that XY plots can also display contours (both lled and unlled), and is the appropriate plot type to use for
contour plots. Contour plots show the relationship between two independent variables and one dependent variable.
10.2.2 Polar Plots
Polar plots have one radial axis and one angular axis. Polar plots always treat the angular axis in radians, although the
numbers shown on the angular axis can easily be formatted as degrees. In other words, a dataset that ranges between
[0, 2] will completely wrap around a polar plot.
10.2.3 3D Plots
3D plots have three axes; two for independent variables X1 and X2, and the third in the vertical direction for the
dependent variable (Y).
55
CurveExpert Professional Documentation, Release 2.0.4
10.3 Basics
The graphing area is divided into two primary portions; the toolbar, which is situated along the top of a graphing
area, and the graph canvas, where the plot is drawn. The toolbar allows interactivity with the graph, such as panning,
zooming, and autoscaling. Right clicking on the plot canvas shows the graphing menu, where you can customize items
on the plot like the axis labels, title, and the look of the graph. Also from this menu, you can print, copy to clipboard,
or save your graph in one of many picture formats. An example of a graph is shown below:
Graphs occur in quite a few places throughout CurveExpert Professional, and you can always interact with them in
a very similar way. Just right-click on plots wherever you see them, in order to nd out what sorts of interaction are
possible.
Right clicking on elements in the graphs (such as legends, images, annotations, and colorbars) show appropriate menus
for manipulations of those objects. Also, remember that anywhere that you can change the text on a graph (such as
the title or axis labels), you can use mathtext for high quality rendering of mathematical expressions and symbols. For
example, in the above graph, mathtext was used to render the m^2 part of the y axis label. See mathtext for details.
The hotkeys (keyboard shortcuts) for use with graphs are documented in Keyboard Shortcuts for Graphs.
10.4 Interacting with a graph
Interacting with a graph is quite straightforward; the mouse cursor always gives a hint of what can be done to various
elements on a graph; a cursor that consists of four arrows indicates that the pointed-to-element is moveable, acti-
56 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
vateable, and possibly resizeable. A hand cursor means that the pointed-to-element can be activated. In this context,
activating means to show a dialog box to modify the properties of the element in question.
Further, the frame of the graph can be moved and resized by pressing shift (or ctrl) and clicking anywhere inside of the
frame. Equivalently, the r key can be pressed while the mouse pointer is inside of the frame. This displays a standard
set of resizing handles that you can use to move the edges of the graph frame into the desired locations.
10.4.1 Graph Toolbar
The rst style of interaction with a graph is to use the toolbar. A sample of a toolbar is shown below:
All buttons have tooltip help, so if you cant remember what a button does, either watch the status bar at the bottom of
the main window as you point to the buttons, or hover your mouse over a button to see its function.
Home, Back, Forward
As the graph view changes interactively, each view is saved so that you can return to a previous one at any given time.
If you change the view via the zoom/pan/autoscale controls, you can return to a previous view by clicking the Back
button, and once you have done this, you can move forward to the next view by clicking the Forward button. Pressing
the Home button will return you to the initial view of your graph.
Pan
The pan button allows you to move the graph extents with your mouse. Press the pan button to begin a pan operation,
press and drag in the plot to move it around, and then press the pan button again to end the pan operation. Using the
right mouse button to drag during the pan manipulates each axis independently in a pseudo-zooming operation.
Polar Panning
For polar plots, the pan button allows zooming in on the radial axis. With the right button, the location of the radial
axis labels can be moved by right clicking and dragging them into place.
3D Panning
For 3D plots, the pan button allows more transformations than just a simple move, depending on the mouse button that
is depressed.
The left mouse button moves the entire XYZ axes box around on the background canvas, and is analgous to panning a
virtual camera pointed where the view direction is unchanging.
10.4. Interacting with a graph 57
CurveExpert Professional Documentation, Release 2.0.4
The right mouse button stretches axes in the direction in which you are dragging the mouse, and is also aected by the
location at which the drag starts (called the grab point). For example, if you right click and hold at the center of the
axes box (grab point at the center), and drag right, the X1 and X2 axes expand in size. If you grab in the center of the
axes box and drag upward, the Y axes expands. Drag the opposite direction for a contraction. The grab point, in fact,
is a xed point. Grabbing at the right of a plot, for example, and dragging right, will contract the lateral directon of
the axes, but will keep the right side reasonably xed in the canvas.
A useful way of dragging is to grab in the center, and drag diagonally. This expands/contracts all three axes at the
same rate, and has the eect of interactively moving the camera toward or away from the axes box.
In summary, the right mouse button manipulates the viewing frustum in regard to the axes box.
Zoom
The zoom button allows you to zoom in or out on a graph with your mouse. Press the zoom button to begin a zoom
operation, and draw a box from top left to bottom right in order to zoom in, by clicking and dragging your left mouse
button. To zoom out, drag a box with the right mouse button instead of the left. Note that the zoom box is not available
for polar plots.
Autoscale
The autoscale button chooses new limits and new tick intervals for your graph that t the current dataset. See also
Autoscaling.
Autoscale lock
CurveExpert Professional will automatically autoscale your plot as data or results are added, changed, or removed.
This is done according to Graphing Preferences. If you click the autoscale lock, it will prevent any of these automatic
autoscales from aecting this particular plot. Note that as soon as CurveExpert Professional detects that you have
manually set the axis limits or tick location properties (see Axis pages), the autoscale lock is set on your behalf. To
release the lock, obviously, just click on the autoscale lock button again.
Add Artistic Element (Annotations, Images, Arrows)
The add artistic element button allows opens a tool palette in order for you to add a new drawing element to your
graph. The three main classes of drawing elements that can be added are Images, Annotations, and Arrows. Note that
58 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
shapes are just annotations without any text displayed inside of them; text may be added inside if you wish. Pressing
this button shows the following tool palette:
The annotation button allows you to add an annotation (text box with an optional arrow) at any time. Pressing this
button immediately adds an annotation, which you can then drag and drop to the desired location, as well as edit by
right clicking the annotation and selecting Annotation Properties. For more information, see Annotations.
The image button allows you to add images at any time. Pressing this button allows you to browse for an image le
(PNG, JPG, BMP, TIFF, GIF, etc.), which will be added, at its native resolution, to the graph. You can then interactively
drag and resize the image much like a similar operation in regular photo/image packages. The image can also be edited
by right clicking the image and selecting Image Properties. For more information, see Images.
There are two arrow-style buttons; one to add an arrow, and one to add a line. The only dierence between the two is
that an arrow has a single arrowhead at the destination by default, while the line (obviously) does not by default. The
arrowheads, as well as other properties, may be changed by right clicking the arrow and selecting Arrow Properties.
For more information, see Arrows.
The rest of the buttons in the panel allow you to add a shape to the graph, of the type depicted on the button. The list
of available shapes (via the buttons) are: square, circle, rectangle, ellipse, trapezoid, inverted trapezoid, left parallelo-
gram, right parallelogram, diamond, triangle, horizontal arrow patch, and vertical arrow patch. The properties of any
of these shapes, including the type of shape, may be modied by right clicking the shape in the graph and selecting
Annotation Properties. For more information, see Annotations.
Note: All shapes are considered Annotations, and can have text inside of them as well as an optional arrow.
Save
The save button allows you to save your graph in a variety of picture formats. Pressing this button shows a le chooser,
so that you can select the le type and where to save the graph. See Saving graphs for more information, including
supported image formats.
10.4. Interacting with a graph 59
CurveExpert Professional Documentation, Release 2.0.4
Print
The print button allows you to quickly output a hardcopy of the currently visible graph.
Locator
The locator always reports the location of your mouse, in data coordinates. Note that the locator is only activated for
2D plots only.
10.4.2 Dragging Elements on Graphs
Annotations, legends, images, graph titles, and colorbars are all draggable; meaning that they can be moved directly
via interaction with the mouse. If any of these elements are not where you desire them be, simply click and drag it to
the desired position.
10.4.3 Picking
If you point to a series on your graph, it will become highlighted. If you then double-click the mouse, a dialog will
appear to allow you to change the properties of that series (color, marker style, etc.).
Further, if you right click on a series, you can also select Details in order to show the details for the underlying
dataset or result associated with that particular curve. When right-clicking on a curve, there is also the opportunity
to automatically add an annotation with information about that particular curves result; choose Autoannotate. This
generates an annotation with the name of the result, equation, and coecients (if applicable). The content of this
annotation can then be edited just like any other annotation by right clicking it and selecting Annotation Properties.
Copy underlying data
If you right click on a curve, you can also access the data that the particular curve is built from. Pick Copy underlying
data, and a table of numbers will be written to the clipboard. Now, you may paste these numbers into another
application for further analysis and/or exploration.
In most cases, the table has the x data in the rst column, and the y data in the second. However, if your dataset has an
associated set of error bars, there will be a third and fourth column which list the values of the lower error bar, and the
upper error bar, respectively.
If your curve has condence or prediction bounds, the lo/hi values of the condence or prediction bounds will be
placed in additional columns (columns 3 and 4) as appropriate as well. In the case that both the condence and
prediction bounds are present, the lo/hi for the condence bounds is listed in columns 3 and 4, and the lo/hi for the
prediction bound is listed in columns 5 and 6.
60 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
10.4.4 Autoscaling
Every series on a graph has its own default minimum and maximum value along each axis. Autoscaling a graph means
that each (visible) series will be tested, and the extents of each axis will be set to values that encompass all of the
series.
If the series is a dataset, the minimum and maximum along each axis is determined from the datasets minimum and
maximum along the corresponding axes (naturally). If the series is a continuous entity, such as a model or function,
a specied default domain must be set in each direction for the autoscaler to use. This is set when the function
is dened; see Creating Custom Models and Functions for details. Note that this default domain is for autoscaling
purposes only, and the graph extent along any axis can be set by the user to the desired values in the graph properties
dialog, as described in Axis pages.
Exactly when the plot automatically autoscales is determined by the current preference settings in Graphing Prefer-
ences. If you click the autoscale lock, it will prevent any of these automatic autoscales from aecting this particular
plot. Note that as soon as CurveExpert Professional detects that you have manually set the axis limits or tick location
properties, the autoscale lock is set on your behalf. To release the lock, obviously, just click on the autoscale lock
button again.
10.4.5 Adding images and annotations
Adding images and/or annotations can be done straightforwardly by clicking the appropriate Add button in the graph
toolbar palette (see Graph Toolbar). However, there are other ways of adding annotations and images.
If text is on the clipboard, you can press Ctrl+V (Cmd+V on a Mac) on a graph, or right-click and select Paste. The
text on the clipboard automatically becomes an annotation. You can also drag and drop text from another source for
the same eect.
If an image is on the clipboard, you can press Ctrl+V (Cmd+V on a Mac) on a graph, or right-click and select Paste.
The image on the clipboard will then be pasted to the graph canvas in its native resolution. You can also drag and drop
an image le to the graph canvas for the same eect.
10.5 Changing Graph Properties
The graph properties window is divided by functionality into pages.
10.5. Changing Graph Properties 61
CurveExpert Professional Documentation, Release 2.0.4
10.5.1 Axis pages
The axis pages (there can be two or three depending on whether you are working with a 2D or 3D graph), allows you
to set properties such as the axis limits, labeling, and grid lines.
The Axis Type section allows you to set your axes to a normal (linear) scale, or a logarithmic scale. Note that
logarithmic scales are not available on 3D graphs.
The Labeling section can be used to either hide the axis label, or specify the label itself. Also, the font and font color
of the axis label can be selected by pressing the Font button in this section.
The Axis extent and major/minor spacing section allows you to specify the minimum and maximum value of the
axis (determining its limits). To have your axis run in reverse, set the maximum of the axis less than the minimum.
The major and minor spacing can each be set in one of two ways: by a xed amount of spacing between each tick, or
by the number of divisions an interval is divided into. To select the kind of spacing, click the radio buttons under the
at xed multiples or by # of divisions column as desired. If at xed multiples is chosen, each tick mark (either major
or minor) is set each time the multiple appears on the axis. For example, if the major ticks are set at xed multiples
of 0.2, there will be a major tick at -0.2, 0, 0.2, 0.4, etc. If by # of divisions is chosen, the ticks are placed such that
the appropriate interval (the entire axis in the case of minor ticks, and the interval between two majors in the case of
major ticks) is divided into the specied number of parts. For example, if the minor ticks are set to a # of divisions of
4, there should be four intervals between each major tick (which means that three minors will be visible).
The Grid Lines section allows you to specify the line style, line width, color, and transparency (alpha) of both the
major and minor grid lines.
The Appearance of tick marks and labels section is where the size and style of tick marks, the font and color of
the tick mark labels, and the numerical format of the tick mark labels can be specied. The Major/Minor tick size
determines how large the markers are that are placed at each tick, in points. Also, the Draw ticks inside of axis setting
determines if these tick marks are placed completely inside, outside, or across the axis. Label minors determines
whether or not text labels are placed at each minor demarcation (most useful for log scaled plots).
The format of the tick mark labels is determined by the combination of the Formatting setting and the Numerical
62 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
precision setting. Formatting can be set to normal for a generic style of numerical formatting, xed point, scientic,
engineering, 10^x, or degrees. In all cases except for normal formatting and 10^x, the Numerical precision eld
determines exactly how many places are shown after the decimal in the label.
Normal: a generic style of formatting that lets the software determine best appearance. e.g. 10245.1234
Fixed point: exactly like normal formatting, except that the numerical precision is honored. e.g. 10245.1
(coupled with a numerical precision of 1)
Scientic: a mantissa followed by an exponent. e.g. 1.02e4 (coupled with a precision of 2)
Engineering: a mantissa followed by an exponent that is a power of 3. e.g. 10.25e3 (coupled with a precision of
2)
10^x: most useful for log scale plots, where the user desires to display the number on the axis as 10 raised to
the appropriate exponent. e.g. 10
2
Degrees: most useful for polar plots, where the user desires to display a number in radians as a number in
degrees. e.g. 60

(coupled with a precision of 0)


Any axis tick label can be preceded or followed by customized text (including mathtext) as you specify. For text to
appear before each axis label, place the text in the Leader eld; for text to appear after each axis label, place the text
in the Trailer eld. By default, no text appears before or after the axis tick label. Examples of common usage of this
feature are to place a dollar sign in front of the numbers to indicate currency, or units after the label.
Finally, the set of tick labels can be rotated by a certain number of degrees, which is also congurable in this section
via the Rotation setting.
10.5.2 Series Page
The Series page is where the settings for individual series can be changed. For quick help with any of the settings in
this page, hover your mouse over any control.
10.5. Changing Graph Properties 63
CurveExpert Professional Documentation, Release 2.0.4
The rst item to choose is the Series; this determines which curve the settings in the dialog apply to. As the series
is changed, the controls in the rest of the dialog will update appropriately. Next to the series chooser, you can set
the Visible ag, and the overall transparency of the series via the Alpha control (100 being opaque, and 0 being fully
transparent).
The next section can be either Line or Bar, depending on the selection of the user. A Line section indicates that the
series should be drawn as a line with markers at each data point (both line and markers are optional, though, based on
your specic settings for these). A Bar section indicates that the series should be drawn as a sequence of vertical bars
extending upwards from y=0. If Bar is selected, there is no concept of markers or condence/prediction bands (see
below), so these sections are hidden.
The Line section obviously sets properties for the line; the linestyle can be chosen, as well as the color and width. The
Resolution parameter determines how many pieces make up the curve, from the current minimum extent to maximum
extent of the graph. Higher resolutions look more attractive, but take longer to draw. If your curve changes sharply
over a short distance, increase the resolution in order to avoid a segmented look to the curve.
The lock button adjacent to the line color selector determines whether or not the marker edge color and ll color
(see below) remain the same as the line color. If left unlocked, the marker edge color and ll color may be adjusted
independently from line color. If locked, the marker edge color and ll color are always governed by the line color.
The Bar section sets properties for the bar sequence; the color of the bar border, linestyle of the bar borders, and
the line width of the bar borders can be chosen. Further, the bar can be lled with a particular color that does not
necessarily match the bar borders described above. The resolution determines the number of divisions to create over
the current x range of the graph. Finally, the bar width can be either prescribed specically as a horizontal extent, or
set to Auto, which sets the width of each bar such that each bar touches the bar before and after.
The Marker section obviously sets properties for markers (this section is not visible while Bar is selected). The
marker type can be chosen from a set of 22 dierent markers, and the marker size can be set with the Size control.
Most markers (such as circles, squares, triangles, etc.) consist of both edge and ll; the edge is the outline of the
shape, and the ll is the interior of the shape. Other markers (such as X, +, etc.) consist of only an edge, and the
ll property has no eect. The edge and ll properties can be set independently in order to customize the markers to
the maximum degree possible. Also, the markers can be half-lled or fully-lled according to the Style setting. If the
marker distribution is too dense, the Skip Stride parameter can be increased in order to decrease the marker density on
any particular series. Note that for a dataset, there is one marker per data point; for a continuous result, there is one
marker per resolution increment set in the Line section. Also note that the marker edge and ll colors may only be
adjusted if the lock button in the line section (see above) is unlocked.
The Legend Entry section gives control over the seriess appearance in the legend. Here, you can exclude the series
from appearance in the legend, and also change the label that appears in the legend for the active series.
If the selected series at the top of the dialog is a regression, there will also be controls to manipulate the appearance of
the condence and/or prediction bands (see Condence and Prediction Bands). By default, condence and prediction
bands are not drawn on normal graphs, but are in the result details window (see Querying Result Details), and in
the regression comparison window (see Comparing Two Regressions). A sample of the available controls for the
condence and prediction bands is shown below:
64 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
In both the Condence band and Prediction band sections (these sections are not visible unless the series is a
regression, and further, are not visible when Bar is selected), the visibility of the respective bands can be set via the
Visible checkbox; if visibility is o, none of the other settings are signicant. the Filled checkbox determines if the
bands are drawn as a lled region or a pair of lines. The Condence level allows you to set the desired probability
level for the condence bands or prediction bands; the default value for this probability is set via the Application
Preferences. If the bands are drawn as a pair of lines, the Linestyle setting determines the style for those lines; the line
color always matches the line color of the corresponding regression curve. If the bands are drawn as a lled region,
the Alpha parameter determines the transparency of that region.
If the selected series at the top of the dialog is a 3D series, the Surface section becomes active, the the Marker section
is hidden:
10.5. Changing Graph Properties 65
CurveExpert Professional Documentation, Release 2.0.4
The Surface section allows you to set parameters for the 3D series. Here, the surface type can be selected as a
scatter, wireframe, triangulated wireframe, surface, triangulated surface, 3D contour, or 3D lled contour. Like the
corresponding parameter in the Line section, the Resolution parameter determines the number of intervals used in
the X1 and X2 directions in order to form a mesh on which to evaluate the 3D function for visualization. Higher
resolutions in this case will increase drawing time severely, as the amount of work to be done is proportional to the
square of the resolution. Note that the color mapping applied to your 3D surface is set via the Color mapping section;
see 3D Graphing for further information.
The Line section is still active for a 3D surface, because it aects the lines drawn around each of the patches that make
up the 3D surface. In particular, for a wireframe surface, the colormap (which aects ll) is irrelevant, while the line
style and width set in the Line section control the appearance of the lines that make up the wireframe.
66 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
10.5.3 Overall Page
The overall settings page is where the global settings for a plot are changed, such as the title, background, and legend
box appearance. For quick help with any of the settings in this page, hover your mouse over any control.
The Canvas Aspect Ratio setting determines the aspect ratio of your plot. If set to Dynamic, which is the default, the
plot will always ll the window that it resides in. However, there are many cases where the aspect ratio of the plot
should be xed; there are several predened aspect ratios in the Canvas Aspect Ratio pulldown to select from, that
t common aspect ratios in use in various modern applications. If one of these xed aspect ratios is set, your plot will
automatically size itself in its parent window (leaving part of the parent window unpainted) appropriately in order to
retain the desired aspect. If Custom is selected as the aspect ratio, you may type in the desired aspect (width/height)
as a oating point number next to the pulldown.
The Title and Background section allows the title, font and color to be set. The position of the title is governed by
the Position setting; this position is in the axes coordinate system, which is a system that is (0,0) at the bottom left
corner of the axes frame, and (1,1) at the top right corner. The default position is (0.5,1.02), which places the title
horizontally centered and above the top of the axes frame. Note that the title may be dragged and dropped interactively
on the plot itself. The title can be turned completely o by unchecking the Visible box. Also, the background color
(the area around the graph frame) can be set with the Background ll parameter.
In the Graph Frame section, the graph frames line color and width, along with its ll and transparency, can also be
set. The position of the graph frames sides can be set by sliding the appropriate sliders near the bottom of this section;
each side of the graph frame can also be turned on and o individually. The Use padding setting determines whether
or not extra padding is added around the graph in order to make sure that all text (i.e., tick labels, axis labels, and
titles) is visible. Turning the padding o provides ner control over the location of the axes frame (because there is
not an automatic sizer involved; all sizing is explicit), but also will allow you to set the frame such that certain textual
elements are not visible. Note that if you move/resize a frame interactivity in the plotting window (by pressing r or
shift-clicking the axes area), the padding switch is automatically turned o. A solid line, of the same thickness and
color of the frame, can be drawn specically at x=0 or y=0 by checking the appropriate box.
10.5. Changing Graph Properties 67
CurveExpert Professional Documentation, Release 2.0.4
The Legend Box section is located in the right side of the Overall page. See Legend Properties for details.
10.6 Legend
The legend shows the mapping between a drawn entity on the plot and the dataset/function/model that it represents.
Right click on a legend for the actions that be performed on the legend itself; one can change the look of the legend or
reorder items in the legend (Legend Properties), or raise/lower legend itself in order for it to be drawn appropriately
with other items on the graph.
10.6.1 Legend Properties
The legend properties can be accessed via the normal graph properties dialog (right click on the graph, choose Prop-
erties, and then go to the Overall tab), or can be accessed by right clicking on a legend itself. The legend properties
dialog appears as below:
The entire legend box can be made invisible, and its placement in the graph can be chosen from the Placement chooser.
If the placement is set to specied location, the XY location of the legends upper left corner can be set. The XY
location is in graph coordinates, which run from (0,0) at the bottom left of the graph frame to (1,1) at the top right of
the frame. The XY location can certainly be set to numbers greater than 1 or less than 0, in order to move the legend
into the desired position.
Still in the Legend Box section, the color and linewidth of the legend frame can be selected, and the ll/transparency
can also be selected. A legend title may be specied (along with a font and color), that is displayed above the legend
entries and inside the legend box. A set of checkboxes allow the legend frame to be visible/invisibile, have a drop
shadow, have rounded corners, or have the labels in the legend assume the same colors as the line that they refer to.
68 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
At the bottom of the Legend Box section, the font and color of the legend labels can be selected. If markers need
to be made smaller or larger in the legend, a Scale markers setting takes care of this. To lay your legend out in a
multicolumn format, increase the number of columns in the Columns setting. To include more than one marker in a
legend key, increase the Points in key setting.
10.6.2 Legend label editing
Legend labels may be changed in the Legend labels section, by clicking an already-selected label. The label will
become editable, and you can change the text to whatever is desired. Remember that mathtext can be used in a legend
label as well. Also, the label can be made blank so that the series does not appear in the legend. Editing a label in this
manner is exactly the same as doing so via the Series Page in the Graph Properties dialog.
10.6.3 Legend Ordering
The order of the series in of a legend can be changed by selecting the desired seriess legend label in the Legend labels
section, and pressing the appropriate arrow buttons to arrange the ordering of the series. The topmost arrow button
moves the selected series to the top; while the bottommost arrow button moves the selected series to the bottom. The
inner two arrow buttons move the selected series up or down by one slot as appropriate.
The ordering of items in the legend also has another important role: it determines the order in which each series is
drawn in the graph. So, if you would like a particular series to be drawn on top, move it to the front in the legend
ordering. Series are drawn in reverse order as the legend ordering, which means that the item appearing on top of the
legend order will also appear on top of other series in the graph.
10.7 Annotations
Annotations are essentially a text box (the text is optional, in which case an annotation can be more accurately de-
scribed as a shape) with an optional arrow that points to any desired location. Annotations add any information
content to a graph that is desired by the user, including equations. mathtext is valid to use within an annotation
wherever desired. Some annotation samples are shown below:
10.7. Annotations 69
CurveExpert Professional Documentation, Release 2.0.4
To add a new annotation, press the Annotation button in the Graph Toolbar, or press the N key while in a graph. When
adding an annotation, the annotation properties dialog will appear, which is documented below. Another way to create
an annotation is to clone an already existing one, by right clicking an annotation and picking Clone from the resulting
menu.
Once an annotation has been added to the graph, it may be freely dragged and dropped to its desired location. If an
annotation has its Fit to text property set (see below in the documentation for annotation properties), it may only be
moved to a particular position; the size of the annotation is xed. If Fit to text is not set, grab-handles will appear on
the annotation when clicked, and these can be used to resize the annotations box as desired. In this mode, moving of
the annotation proceeds as usual; just click and drag near the middle of the box.
The order in which the annotations are drawn (called the z-order) can be manipulated by right clicking an annotation
and selecting one of the Send to back, Bring to front, Send backward, or Bring forward options. Note that the graph
legend, arrows, and images also participate in the z-ordering process, so annotations can be placed in front of or behind
the legend, other images, arrows, or other annotations as desired.
To edit an annotation, right click it and select Annotation Properties; alternatively, you can right click anywhere in the
graph, select the Edit Annotation submenu, and select the annotation that you desire to edit.
To remove an annotation, right click it and select Remove, or press the DEL key after selecting the desired annota-
tion. Alternatively, you can right click anywhere in the graph, select the Remove Annotation submenu, and select the
annotation that you desire to delete.
10.7.1 Cutting, Copying, and Pasting Annotations
Cut/Copy/Paste is also supported for annotations; right click the desired annotation, and pick the desired cut or copy
operation. Then, right click the plot, and if there is an annotation on the clipboard (from a previous cut/copy of an
70 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
annotation), the Paste option will appear in the menu. Annotations may be freely copied/pasted between documents
or even between invocations of CurveExpert Professional.
One trick that can be used is to paste an annotation as text into another application (such as notepad) for storage. You
can then highlight the pasted text and copy to the clipboard, so that you can paste the annotation into a CurveExpert
Professional graph at a later time. This is useful for annotations that are commonly used; you can build a library of
common annotations as just text entries in a le that you store.
10.7.2 Annotation properties
When adding a annotation, or editing its properties, the following dialog will appear:
10.7. Annotations 71
CurveExpert Professional Documentation, Release 2.0.4
Text properties
The annotation properties dialog allows you to set all available properties for an annotation (except for the z-order,
which will be discussed shortly). The Contents section is the text content of the annotation; recall that mathtext is
valid (place the mathtext between dollar signs), such that equations can be added if desired. The font of the annotation
text can be adjust with the Font button. Horizontal alignment can be set to left aligned, centered, or right aligned. Any
annotation can be rotated an an arbitrary angle as specied in the Rotation control; spacing between lines of a multiline
annotation is given in Line spacing (a value of 1.2 is approximately equal to single spacing). The transparency of the
text can be set in the Alpha control.
72 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
The (x,y) location of the center of the annotation box is specied by the Location elds. By default, the coordinate
system used is the graph coordinate system, which is (0,0) at the bottom left of the axis frame, and (1,1) at the top
right of the axis frame. However, if desired, the location can be expressed in data coordinates, in which case the center
of the annotation box will always be pinned to the given (x,y) coordinate in the same system as the data set.
Note: In 3D plots, the only available coordinate system is the graph coordinate system (no data coordinate system
supported).
Box properties
The middle section of the annotation properties dialog species the properties of the box surrounding the annotation
text. The Show box control determines if the box is visible at all. The box style can be set to one of rectangular,
square, ellipse, circle, diamond, rounded rectangular, sign, roundtooth, sawtooth, right facing arrow, left facing arrow,
triangle, parallelogram-right, parallelogram-left, trapezoid, or inverted trapezoid.
The Fit to text control determines whether or not the box will be sized only to t the text present (if any), or if the
box will be sized according to the Specied size settings. The size given as a horizontal and vertical extent in the
same coordinate system as given for the Location of the annotation box in the Text Properties section. Another way
of specifying the size of the box is interactively on the graph itself. If an annotation has its Fit to text property set,
it may only be moved to a particular position interactively; the size of the annotation is xed. If Fit to text is not
set, grab-handles will appear on the annotation when clicked, and these can be used to resize the annotations box as
desired. In this mode, moving of the annotation proceeds as usual; just click and drag near the middle of the box.
A drop shadow behind the annotation box can be activated by selecting Shadowed. The Fill and Frame color selectors
determine the color of the interior and frame of the box, respectively.
The transparency of the box can be set via the Alpha control, and the line width of the box frame is given via the
Width control.
To create a box with no text, just leave the Contents eld blank.
Arrow properties
The last section of the annotation properties dialog species the properties of the arrow, if any. If Show Arrow is
checked, an arrow is drawn from the middle of the annotation box to the (x,y) point specied in the Points to elds.
Like the location of the annotation textbox, the location of the annotated point can be in either graph coordinates or
data coordinates.
Note: In 3D plots, the only available coordinate system for the annotated point is the graph coordinate system.
The appearance of the arrow is given by the Style, Connection style, and the Arrowhead placement/style elds. The
arrowstyle can be one of plain, thick, wedge, or fancy; each arrowstyle has its own distinct appearance that can be most
easily previewed by clicking the control itself. The connection style is how the arrow connects between the annotation
and the point being annotated; the connection style can be a simple straight line, an arc, or a line that travels only
in the X and Y directions appropriately to reach between the source and destination. The arrowhead placement/style
determines the appearance of the arrowheads themselves, and whether or not the arrowheads are placed at both ends
of the connecting line, at the annotation end of the connecting line, or the destination end of the connecting line.
Note that arrowhead placement/styles are only valid for plain arrow styles. Also, the XY connection style is only
valid for the plain arrow style. Finally, the connection style for the thick arrow style is always straight. The graph-
ical interface will prevent you from selecting invalid combinations of arrow style, connection style, and arrowhead
style.
The line color, transparency, and width of the arrow can be set via the Line, Alpha, and Width controls, respectively.
10.7. Annotations 73
CurveExpert Professional Documentation, Release 2.0.4
10.8 Automatic annotations
An automatic annotation is an annotation with the name, formatted equation, and coecients (if applicable) of a
particular result. The content of this annotation can then be edited just like any other by right clicking it and selecting
Annotation Properties.
For results that are plotted on a graph, an autoannotation can be generated in two ways. The rst method is to right
click the graph, and pick the appropriate result under the Autoannotate submenu; all results available on that graph
will be available for selection. Secondly, you can generate an automatic annotation by pointing to the result (it will
become highlighted), right clicking, and selecting Autoannotate.
10.9 Arrows
Arrows are essentially lines that connect two points on a graph to indicate association between them, or to indicate a
direction of information ow. Some arrow examples are shown below:
To add an arrow, press one of the Add Arrow buttons in the Graph Toolbar. When adding an arrow in this manner,
an arrow will immediately appear near the center of your graph; you can then edit the arrows properties by right
clicking on it and selecting Arrow Properties. Another way to create an arrow is to clone an already existing one, by
right clicking an arrow and picking Clone from the resulting menu.
Once an arrow has been added to the graph, it may be freely dragged, resized and dropped to its desired location. The
order in which the arrows are drawn (called the z-order) can be manipulated by right clicking an arrow and selecting
one of the Send to back, Bring to front, Send backward, or Bring forward options. Note that the graph legend,
annotations, and images also participate in the z-ordering process, so arrows can be placed in front of or behind the
legend, other images, annotations, or other arrows as desired.
To edit an arrow, right click it and select Arrow Properties. To remove an arrow, right click it and select Remove or
press the DEL key after selecting the desired arrow.
74 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
10.9.1 Cutting, Copying, and Pasting Arrows
Cut/Copy/Paste is also supported for arrow; simply right click the desired arrow, and pick the desired cut or copy
operation. Then, right click the plot, and if there is an arrow on the clipboard (from a previous cut/copy of an arrow),
the Paste option will appear in the menu. Arrows may be freely copied/pasted between documents or even between
invocations of CurveExpert Professional.
10.9.2 Arrow properties
When editing the properties of an arrow, the following dialog will appear:
The starting and ending xy locations (origin and destination) are given in the Start location and End location elds;
each are in the coordinate system specied (graph or data coordinates).
Note: In 3D plots, the only available coordinate system for the source and destination point of the arrow is the graph
coordinate system.
The appearance of the arrow is given by the Style, Connection style, and the Arrowhead placement/style elds.
The arrow style can be one of plain, thick, wedge, or fancy; each arrow style has its own distinct appearance that can
be most easily previewed by clicking the control itself. The connection style is how the arrow connects between the
origin and destination points; the connection style can be a simple straight line, an arc, or a line that travels only in
the X and Y directions appropriately to reach between the source and destination. The arrowhead placement/style
determines the appearance of the arrowheads themselves, and whether or not the arrowheads are placed at both ends
of the connecting line, at the starting end of the connecting line, or the destination end of the connecting line.
Note that arrowhead placement/styles are only valid for plain arrow styles. Also, the XY connection style is only
valid for the plain arrow style. Finally, the connection style for the thick arrow style is always straight. The graph-
ical interface will prevent you from selecting invalid combinations of arrow style, connection style, and arrowhead
style.
The line color, transparency, and linewidth of the arrow can be set via the Line, Alpha, and Width controls, respec-
tively.
The Shape scaling parameter determines the fatness of the arrow shape. Lower scalings lead to thinner arrow bodies
10.9. Arrows 75
CurveExpert Professional Documentation, Release 2.0.4
(in cases where the arrow body is a shape, and not just a line), and smaller arrow heads. Higher scalings conversely
lead to thicker arrow bodies and correspondingly larger arrow heads.
Note: To create a simple line on your graph, set the arrow style to plain, connection style to straight, and set the
Arrowhead Placement/Style to the rst selection (no arrowheads). This is done for you automatically via the line
button in the Graph Toolbar palette.
10.10 Images
Images can be added to any graph, and will be saved along with the graph just with any other graph element. Images
can be added by pressing the Add Image button in the Graph Toolbar (which will allow you to browse for the image
le), via a clipboard paste from another application, or via drag and drop of an image le. Images are always rst
added at their native resolution, and then can be interactively moved and/or resized by clicking on them and dragging
the appropriate handles. Images with embedded transparency will have that transparency respected.
Further image properties can be modied by right-clicking the image and selecting Image Properties. From the prop-
erties dialog, an image can be placed precisely, turned into a background, or have other image processing techniques
applied to achieve a desired eect.
Supported images le formats are: PNG, BMP, JPEG, GIF, PCX, PPM, TGA, TIFF, WMF, XBM, XPM, and Photo-
shop 2.0/3.0 PSD les.
Once an image has been added to the graph, it may be freely dragged and/or resized to its desired location. The order
in which the image are drawn (called the z-order) can be manipulated by right clicking an image and selecting one of
the Send to back, Bring to front, Send backward, or Bring forward options. Note that the graph legend and annotations
also participate in the z-ordering process, so images can be placed in front of or behind annotations, arrows, or the
legend as desired.
To edit an image, right click it and select Image Properties; alternatively, you can right click anywhere in the graph,
select the Edit Image submenu, and select the image that you desire to edit.
76 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
To remove an image, right click it and select Remove or hit the DEL key after selecting the image. Alternatively,
you can right click anywhere in the graph, select the Remove Image submenu, and select the image that you desire to
delete.
10.10.1 Cutting, Copying, and Pasting Images
Cut/Copy/Paste is also supported for annotations; right click the desired images, and pick the desired cut or copy
operation. Then, right click the plot, and if there is an image on the clipboard (from a previous cut/copy of an images),
the Paste option will appear in the menu. Images may be freely copied/pasted between documents or even between
invocations of CurveExpert Professional.
To quickly delete an image, simply press the Delete key after selecting an image.
10.10.2 Image properties
When editing the properties of an image, the following dialog will appear:
10.10. Images 77
CurveExpert Professional Documentation, Release 2.0.4
The Name eld is only for identication of the image (at times, the image name will appear in the right-click graph
properties menu to allow you to edit or delete the image directly). This name can be anything that you desire it to be.
Images always obey any built-in transparency (alpha) values. So, you can (for example) read in a PNG with trans-
parency, and it will be displayed properly within CurveExpert Professional.
Image location
Images can be utilized on a graph in a number of dierent ways. By default, an image is treated similarly to any
drawing program, where the location is specied by the Lower left corner and Size elds. The lower left corner and
size can be changed directly, or more commonly, the image can be dragged and resized to the desired location on the
graph. The interpretation of the coordinate numbers can be modied by choosing the appropriate coordinate system
in the Coordinate system choice list. Graph coordinates are (0,0) at the lower left corner of the graph and (1,1) at the
top right corner; axes coordinates are (0,0) at the lower left corner of the frame and (1,1) at the top right corner, and
data coordinates are coordinates in the current x/y dataset.
Normally, images share z-ordering with annotations and legends, and can be placed as desired with the Bring to front,
78 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
etc. right-click menu items. However, if you want the image to be placed behind everything on the graph, select the
Background checkbox.
The Preserve aspect ratio property governs how the image behaves as the image is resized; if selected, the image
always retains its aspect ratio; if not, the image will be free to stretch to retain its specied coordinates.
If the Fill axes checkbox is set, the image will be placed into the background and scaled such that it lls the axes
frame. Likewise, if the Fill graph checkbox is set, the image will be placed into the background and scaled such that
it lls the entire graph. If either of these options are selected, the image is automatically placed into the background
and does not share z-order with other graph elements.
Image Frame
Any image can have a simple frame drawn around it, with the Draw frame and Shadowed settings. The frame color
can be specied with the Color setting, and the frames line width can be modied with the Width setting.
Image Processing
CurveExpert Professional oers image processing facilities in order to create desired eects with your images. Your
image is never modied with the image processing options; only its appearance. The Grayscale switch causes the
image to be grayscaled before display. The Alpha setting determines the tranparency of the image.
The Eects setting sets a particular image lter that operates on the original images pixels, and outputs a changed
image, much like lters in popular image processing software packages. Filters available are blur, contour, detail,
edge enhance, emboss, nd edges, smooth, and sharpen.
The image can be rotated arbitrarily with the Rotation setting. The rotation is given in degrees, and can range between
positive and negative 360 degrees.
The Added transparency setting is a way to generate a transparency mask on an existing image. The color mask
method allows you to select a particular color, and all pixels of that color are turned transparent. Floodll from corners
applies a ood ll at each of the four corner pixels of the image, lling with transparency until a dierent color is
encountered.
Note: In 3D plots, the only available coordinate system is the graph coordinate system (no data coordinate system
supported).
10.11 Saving graphs
To save a graph, either choose the Save button in the graph toolbar, or right click the graph and select Save. A le
chooser will appear that allows you to select the location and lename of the graph to be saved, and the format of the
picture le to be saved. For image (raster) les, supported letypes are:
portable network graphics (PNG)
JPEG
TIFF
raw RGBA bitmaps (RGBA or RAW)
Supported vector graphics le formats are:
scalable vector graphics (SVG)
enhanced metales (EMF)
10.11. Saving graphs 79
CurveExpert Professional Documentation, Release 2.0.4
encapsulated postscript (EPS)
postscript (PS)
portable document format (PDF)
Of these formats, the PNG format is the most common for raster-type images, and SVG is most common for vector
graphics. A PNG le can be read by any graphics application, and by applications such as Microsoft Word and
Powerpoint. SVG les can be read by computer illustration software, such as Adobe Illustrator or Inkscape. It should
be noted that an SVG le written by CurveExpert Professional retains all object information, so you can add or remove
elements from the graph after-the-fact with an illustration package, if desired.
10.12 Copying graphs
To copy a graph, right click it and select Copy. An image will be copied to the clipboard, which can be subsequently
pasted into any application that can receive an image from the clipboard, such as Microsoft Word.
10.13 Printing graphs
To print a graph, right click it and select Print Preview or Print, depending on the desired action. Alternatively, press
the Print button in the graph toolbar associated with the desired graph.
10.14 Graph Themes
Agraph theme gives the user the opportunity to set up the look of a graph once, and reuse these settings in subsequent
graphs. A graph theme is a snapshot of the parameters set in the Graph Properties window (accessible by right-
clicking a graph and selecting Properties) as well as the properties of elements on the graph, such as annotations and
arrows. In fact, so that the appearance of annotations, legends, arrows, and images match the look of your graph, it is
recommended to create one each element and congure them before saving the theme.
10.14.1 Saving a theme
To save the current look of your graph, right click the graph and select Save Theme. Give your theme a name, and
select OK.
The second way to save a theme is to select Tools->Manage Graph Themes from the CurveExpert Professional main
window; this gives access to a sandbox where you can change the graph look freely, and save the results when you are
nished. See Graph Theme Manager.
10.14.2 Applying a theme
To apply a saved theme to your current graph, right click the graph and select Apply Theme, which will give access to
all of the available saved themes. Select the desired theme, and the graph will change its look.
10.14.3 Copying/Pasting a theme
A theme can be copied by right clicking the graph and selecting Copy Current Theme. This operation internally stores
the theme of the current graph so that you can use this theme on a another graph. To apply a previously copied theme,
80 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
right click the graph and select Paste Theme. While this operation is extremely similar to a standard cut/paste clipboard
operation, it does not actually use the clipboard; so, any item that you have on the clipboard remains intact. This does
mean, however, that you cannot copy/paste themes between applications; if this is desired, just save and then apply the
theme as documented above.
10.15 2D Contour Graphing
The 2D contour graphing capability is activated when there are two independent variables present. So, either a dataset
must be read in with two independent variables, or the user can select File->New, and specify three columns in the
dataset. The typical method of creating a 2D contour graph is to select the + tab in the Graphs and Data pane,
followed by a selection of 2D Contour. This creates a graph axes that is appropriate for both line and lled contours.
10.15.1 Interactive Viewing
Mouse manipulations, panning and zooming in a contour plot is identical to that described above for normal XY
graphs.
10.15.2 Changing 2D Contour Graph Properties
To access the graph properties, right click the graph, and select Graph Properties as usual. The main changes that
you will see are that there is an extra tab for Color Mapping; so that you can set the colorbar appearance, as well
as changing the mapping from values in the z direction (height) in the contour to a color. The color mapping panel
(within the Graph Properties dialog) is shown below:
The Colorbar section allows the specication of the colorbar that is shown on the graph (as long as the Visible
checkbox is set) to show the mapping between contour height (z) and a color. The Orientation selection determines
if this colorbar is drawn in a vertical or horizontal orientation. The position, length, and width of the colorbar is
given in the next section of elds; the position as well as the length and width are given in terms of axes coordinates,
10.15. 2D Contour Graphing 81
CurveExpert Professional Documentation, Release 2.0.4
where (0,0) is the bottom left corner of the axes pane, and (1,1) is the upper right corner. The Font button allows the
specication of the font and color of the text used to label the ticks on the colorbar.
The Color mapping section determines the mapping between contour height (z) and color. This mapping can be
selected in the rst pulldown; there are currently 130 choices for a colormap to use. The minimum value and maximum
value given are mapped to the left and right end of the selected colormap, respectively. The tick increment can either
be automatically determined or specied; the tick increment aects how many ticks are drawn in the colorbar.
Further, the Series section holds the settings for the contour series, when that series is selected in the Series pulldown.
The relevant panel is shown below:
The Contour Lines section determines the overall appearance of the contour lines (or lled areas as appropriate). The
Filled contour checkbox determines if the contour is drawn as a set of curves, or as a set of lled regions. The No. of
Levels eld determines the resolution with which the z (height) direction is lled with contour lines or lled regions,
as appropriate. The Resolution eld increases the number of line segments that are used to dene the contour curve at
a specic height (a higher resolution means a less segmeneted-looking contour curve). The Line Style and Line Width
are active only when the contour is not lled, and determines the style and width of the lines used to draw the contour
lines.
For more contour lines, increase No. of Levels. For a better quality draw of the contour lines, increase Resolution.
The Contour Labels section controls the inline height(z) labeling of the contour lines, and is only applicable when
using unlled contours. The Visible ag toggles whether or not the labels are drawn. Label colors match contour lines
determines if the contour labels are colored the same as the contour line that they are associated with, or colored with
the font color as selected in the color picker on the next line (labeled Font size/color). The Font size/color section
determines the size of the labels and their color, provided that Label colors match contour lines is left unchecked. The
Inline spacing determines the size of the break in the contour line in which the label is inserted; smaller sizes mean that
the contour lines practically touch the label. The Precision and Formatting settings determine the number of decimal
places used in the label, and the formatting style of the labels, respectively.
The Legend Entry section indicates whether this series should be listed in the legend, and if so, what label should be
used (the default label in the legend is the name of the series, which is used if the legend label eld is left empty).
82 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
10.16 3D Graphing
The 3D graphing capability is activated when there are two independent variables present. So, either a dataset must be
read in with two independent variables, or the user can select File->New, and specify three columns in the dataset.
Note that pointing at a series in a 3D plot will not highlight it as is done in the 2D plots; this operation is too expensive
to be carried out in an interactive way.
10.16.1 Interactive Viewing
For the most part, plotting in 3D is exactly the same as in 2D, except with more interactivity with the viewing angle.
Clicking and dragging the left mouse button on a 3D plot will dynamically change the viewing angle. Middle click
and drag zooms the 3D plot.
Note: If you would rather zoom with the right mouse, go to Tools->Preferences->Graphing and check the appropriate
box. However, the context menu (which normally takes a right click to access), is then mapped to the middle mouse
button.
More transformations for the 3D plot are available via the pan button; please see Pan for details.
10.16.2 Changing 3D Graph Properties
To access the graph properties, right click the graph (or middle click, if you have remapped the mouse buttons for
graphs), and select Properties as usual. The main changes that you will see are that there are three tabs for the axes,
so that you can set scale and properties on the X1, X2, and Y axes appropriately.
Controls throughout the graph properties that are not applicable for 3D graphs are either hidden from view or disabled.
The other dierence for 3D plots is within the Series section, where the controls have changed appropriately to deal
with a 3D entity instead of a 2D line. You can still choose line width and color, which determines the line properties
of the 3D object being drawn. The new Surface section allows you to set properties for your surface; the type can be
set to the following:
scatter
wireframe
triangulated wireframe
surface
triangulated surface
contour
lled contour
The resolution determines the size of the mesh used to reconstruct the graphical object; i.e., if the resolution is 50,
then a 50x50 mesh is created on which the 3D function is evaluated. The drawing expense rises dramatically with the
resolution, so it is best to set this parameter as low as possible and still have a desirable looking graph. For a nal
render to picture or printer, you can raise this parameter in order to achieve the highest quality at the expense of (very)
slow rendering. Note that resolution is ignored for irregular triangulated surfaces and wireframes; the points in the
dataset being plotted are used directly.
The Color mapping section determines the mapping between the z dimension (the dependent variable) and color
(often referred to as a pseudocolor map). This mapping can be selected in the rst pulldown; there are currently 130
10.16. 3D Graphing 83
CurveExpert Professional Documentation, Release 2.0.4
choices for a colormap to use. The min value and max value given are mapped to the left and right end of the selected
colormap, respectively. Any surface that is drawn in any lled manner (i.e. not wireframed) will use these color
mapping settings. The tick increment can either be automatically determined or specied; the tick increment aects
how many ticks are drawn in the colorbar.
10.17 Keyboard Shortcuts for Graphs
Keyboard shortcuts can be used when a graph, or the notebook tab associated with the graph, has keyboard focus.
Keyboard
Shortcut
Action
a autoscale. Identical to clicking the autoscale button in the graph toolbar. See Graph Toolbar and
Autoscaling.
p toggle panning mode. Identical to clicking the pan button in the graph toolbar. See Graph Toolbar.
z toggle zooming mode. Identical to clicking the zoom button in the graph toolbar. See Graph
Toolbar.
r resize the graph frame interactively (pointer must be over the frame when r is pressed).
x Open context sensitive properties dialog. Identical to right click->Properties. See Changing
Graph Properties.
1-9 Pressing a number button (1-9) will open the graph properties dialog directly to the corresponding
series as listed in the legend.
Shift + 1-9 Pressing a number button (1-9) will open the Results Window (see Querying Result Details)
directly to the corresponding series as listed in the legend.
Ctrl+C if the pointer is over an image, annotation, or arrow, copy it; if over the graph, copy the graph to
the clipboard as an image. Identical to right click->Copy. See Graph Toolbar.
Ctrl+V paste a graph element (image, annotation, or arrow)
, move backward to the previous view. Identical to clicking the back button in the graph toolbar.
See Graph Toolbar.
. move forward to the next view. Identical to clicking the forward button in the graph toolbar. See
Graph Toolbar.
h return to the rst view. Identical to clicking the home button in the graph toolbar. See Graph
Toolbar.
n add a new annotation
r add a new arrow
10.18 Mathtext
You can use a subset of TeX markup anywhere that a graph uses text (for a label, title, legend, annotation, etc.)
by placing a bit of your text inside a pair of dollar signs ($). This capability allows you to typeset quite complex
mathematical expressions within any text label on any plot. Regular text and math text can be freely intermixed. For
example:
Surface Area $m^2$
renders as:
Surface Area m
2
84 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
Note: To make it easy to display monetary values such as $100.00, if a single dollar sign is present in the entire string,
it will be displayed as a dollar sign.
Greek letters and a large number of symbols are supported.
10.18.1 Subscripts and superscripts
To make subscripts and superscripts, use the _ and ^ symbols:
$\alpha_i > \beta_i$

i
>
i
Some symbols automatically put their sub/superscripts under and over the operator. For example, to write the sum of
x
i
from 0 to , you could do:
$\sum_{i=0}^\infty x_i$

i=0
x
i
10.18.2 Fractions, binomials and stacked numbers
Fractions, binomials and stacked numbers can be created with the \frac{}{}, \binom{}{} and \stackrel{}{}
commands, respectively:
$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$
produces
3
4
_
3
4
_
3
4
Fractions can be arbitrarily nested:
$\frac{5 - \frac{1}{x}}{4}$
produces
5
1
x
4
Note that special care needs to be taken to place parentheses and brackets around fractions. Doing things the obvious
way produces brackets that are too small:
$(\frac{5 - \frac{1}{x}}{4})$
(
5
1
x
4
)
The solution is to precede the bracket with \left and \right to inform the parser that those brackets encompass the
entire object:
10.18. Mathtext 85
CurveExpert Professional Documentation, Release 2.0.4
$\left(\frac{5 - \frac{1}{x}}{4}\right)$
_

_
5
1
x
4
_

_
10.18.3 Radicals
Radicals can be produced with the \sqrt[]{} command. For example:
$\sqrt{2}$

2
Any base can (optionally) be provided inside square brackets. Note that the base must be a simple expression, and
cannot contain layout commands such as fractions or sub/superscripts:
$\sqrt[3]{x}$
3

x
10.18.4 Inline Fonts
The default font is italics for mathematical symbols.
To change fonts, eg, to write sin in a Roman font, enclose the text in a font command:
$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$
s(t) = 7sin(2t)
More conveniently, many commonly used function names that are typeset in a Roman font have shortcuts. So the
expression above could be written as follows:
$s(t) = \mathcal{A}\sin(2 \omega t)$
s(t) = 7sin(2t)
Here s and t are variable in italics font (default), sin is in Roman font, and the amplitude A is in calligraphy
font. Note in the example above the calligraphy A is extremely close to the sin. You can use a spacing command to
add a little whitespace between them:
s(t) = \mathcal{A}\/\sin(2 \omega t)
s(t) = 7sin(2t)
The choices available with all fonts are:
86 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
Command Result
\mathrm{Roman} Roman
\mathit{Italic} Italic
\mathtt{Typewriter} Typewriter
\mathcal{CALLIGRAPHY} (7[[JgF7/1)
10.18.5 Global Fonts
In CurveExpert Professional, there are three choices for the global font to use for math symbols: Computer Modern,
STIXSerif, and STIXSans Serif. To select one of these fonts, choose Edit->Preferences->Graphing->Global mathtext
font.
The look of each font slightly dierent, with the Computer Modern font resembling the traditional TeX typsetting most
closely, STIX Serif meant to blend with Serif-style fonts (such as Times New Roman), and STIX Sans Serif being a
mathematical font without any serifs at all.
10.18.6 Accents
An accent command may precede any symbol to add an accent above it. There are long and short forms for some of
them.
Command Result
\acute a or \a a
\bar a a
\breve a a
\ddot a or \"a a
\dot a or \.a a
\grave a or \a ` a
\hat a or \^a a
\tilde a or \~a a
\vec a a
In addition, there are two special accents that automatically adjust to the width of the symbols below:
Command Result
\widehat{xyz} xyz
\widetilde{xyz} xyz
Care should be taken when putting accents on lower-case is and js. Note that in the following \imath is used to
avoid the extra dot over the i:
r"$\hat i\ \ \hat \imath$"

i
10.18.7 Symbols
Other symbols available in math typesetting are listed below.
Lower-case Greek
10.18. Mathtext 87
CurveExpert Professional Documentation, Release 2.0.4
\alpha \beta \chi \delta | \digamma
t \epsilon \eta \gamma \iota \kappa
\lambda \mu \nu \omega \phi
\pi \psi \rho \sigma \tau
\theta \upsilon \varepsilon \varkappa \varphi
c \varpi \varrho \varsigma \vartheta \xi
\zeta
Upper-case Greek
\Delta \Gamma \Lambda \Omega \Phi \Pi
\Psi \Sigma \Theta \Upsilon \Xi U \mho
\nabla
Hebrew
\aleph 2 \beth \daleth \gimel
Delimiters
{ / [ [ \Downarrow \Uparrow j \Vert \ \backslash
\downarrow ( \langle \lceil [ \lfloor c \llcorner . \lrcorner
) \rangle \rceil | \rfloor \ulcorner \uparrow \urcorner
\vert \{ j \| \} ] ] |
Big symbols
_
\bigcap
_
\bigcup
_
\bigodot

\bigoplus

\bigotimes
_
\biguplus
_
\bigvee
_
\bigwedge

\coprod
_
\int
_
\oint

\prod
_
\sum
Standard function names
Pr \Pr arccos \arccos arcsin \arcsin arctan \arctan
arg \arg cos \cos cosh \cosh cot \cot
coth \coth csc \csc deg \deg det \det
dim \dim exp \exp gcd \gcd hom \hom
inf \inf ker \ker lg \lg lim \lim
liminf \liminf limsup \limsup ln \ln log \log
max \max min \min sec \sec sin \sin
sinh \sinh sup \sup tan \tan tanh \tanh
Binary operation and relation symbols
88 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
= \Bumpeq n \Cap U \Cup
= \Doteq ~ \Join c \Subset
= \Supset \Vdash + \Vvdash
\approx > \approxeq \ast
~ \asymp 5 \backepsilon ~ \backsim
= \backsimeq \barwedge \because
( \between _\bigcirc V \bigtriangledown
. \bigtriangleup \blacktriangleleft > \blacktriangleright
\bot -< \bowtie c \boxdot
= \boxminus + \boxplus \boxtimes
\bullet = \bumpeq \cap
\cdot \circ = \circeq
:\coloneq \cong \cup
< \curlyeqprec > \curlyeqsucc \curlyvee
. \curlywedge \dag - \dashv
\ddag \diamond \div
\divideontimes = \doteq = \doteqdot
+ \dotplus 7 \doublebarwedge = \eqcirc
\eqcolon \eqsim > \eqslantgtr
< \eqslantless \equiv = \fallingdotseq
\frown \geq _ \geqq
> \geqslant >\gg \ggg
_ \gnapprox _ \gneqq \gnsim
_ \gtrapprox > \gtrdot \gtreqless
\gtreqqless \gtrless \gtrsim
\in \intercal \leftthreetimes
\leq _ \leqq < \leqslant
_ \lessapprox < \lessdot \lesseqgtr
\lesseqqgtr \lessgtr \lesssim
<\ll \lll _ \lnapprox
_ \lneqq \lnsim - \ltimes
\mid = \models \mp
= \nVDash r \nVdash ~ \napprox
\ncong = \ne = \neq
= \neq \nequiv \ngeq
\ngtr \ni \nleq
\nless ] \nmid \notin
\nparallel \nprec ~ \nsim
c \nsubset \nsubseteq > \nsucc
, \nsupset \nsupseteq < \ntriangleleft
10.18. Mathtext 89
CurveExpert Professional Documentation, Release 2.0.4
\ntrianglelefteq > \ntriangleright g \ntrianglerighteq
r \nvDash - \nvdash , \odot
, \ominus \oplus , \oslash
\otimes j \parallel \perp
\pitchfork \pm \prec
_ \precapprox < \preccurlyeq \preceq
_ \precnapprox \precnsim \precsim
\propto \rightthreetimes = \risingdotseq
\rtimes \sim = \simeq
{ \slash \smile \sqcap
| \sqcup c \sqsubset c \sqsubset
\sqsubseteq . \sqsupset . \sqsupset
\sqsupseteq - \star \subset
\subseteq _ \subseteqq \subsetneq
_ \subsetneqq > \succ _ \succapprox
> \succcurlyeq \succeq _ \succnapprox
\succnsim \succsim \supset
\supseteq _ \supseteqq \supsetneq
_ \supsetneqq \therefore \times
\top < \triangleleft \trianglelefteq
= \triangleq - \triangleright \trianglerighteq
\uplus | \vDash \varpropto
< \vartriangleleft > \vartriangleright - \vdash
\vee \ \veebar \wedge
\wr
Arrow symbols
\Downarrow \Leftarrow
\Leftrightarrow \Lleftarrow
= \Longleftarrow \Longleftrightarrow
=\Longrightarrow \Lsh
\Nearrow \Nwarrow
\Rightarrow \Rrightarrow
r \Rsh _\Searrow
\Swarrow \Uparrow
\Updownarrow \circlearrowleft
\circlearrowright .\curvearrowleft
r\curvearrowright -\dashleftarrow
\dashrightarrow \downarrow
\downdownarrows \downharpoonleft
\downharpoonright \hookleftarrow
\hookrightarrow \leadsto
\leftarrow \leftarrowtail
\leftharpoondown \leftharpoonup
\leftleftarrows \leftrightarrow
;\leftrightarrows =\leftrightharpoons
~\leftrightsquigarrow ~\leftsquigarrow
90 Chapter 10. Graphing
CurveExpert Professional Documentation, Release 2.0.4
\longleftarrow \longleftrightarrow
\longmapsto \longrightarrow
\looparrowleft +\looparrowright
\mapsto \multimap
=\nLeftarrow =\nLeftrightarrow
=\nRightarrow ,\nearrow
\nleftarrow \nleftrightarrow
\nrightarrow \nwarrow
\rightarrow \rightarrowtail
\rightharpoondown \rightharpoonup
,\rightleftarrows ,\rightleftarrows
=\rightleftharpoons =\rightleftharpoons
\rightrightarrows \rightrightarrows
~\rightsquigarrow \searrow
\swarrow \to
\twoheadleftarrow \twoheadrightarrow
\uparrow \updownarrow
\updownarrow \upharpoonleft
\upharpoonright |\upuparrows
Miscellaneous symbols
$ \$ \AA + \Finv
\Game 0 \Im | \P
T\Re \S \angle
\backprime +\bigstar \blacksquare
& \blacktriangle * \blacktriangledown \cdots
. \checkmark _\circledR _\circledS
\clubsuit [ \complement \copyright
.
.
. \ddots \diamondsuit \ell
\emptyset \eth \exists
| \flat \forall h \hbar
\heartsuit h \hslash

\iiint

\iint

\iint \imath
\infty j \jmath . . . \ldots
. \measuredangle \natural \neg
\nexists

\oiiint \partial
\prime \sharp \spadesuit
\sphericalangle \ss v \triangledown
\varnothing s \vartriangle
.
.
. \vdots
\wp \yen
10.18. Mathtext 91
CurveExpert Professional Documentation, Release 2.0.4
92 Chapter 10. Graphing
CHAPTER
ELEVEN
GRAPH THEME MANAGER
11.1 Introduction
Graph themes allow you to create a custom look for your graph, that can be reused on other graphs as appropriate.
This can save a lot of time when it comes to setting the properties for your graphs.
The graph themes manager can be accessed via Tools->Manage Graph Themes. The theme manager gives you the
ability to preview themes (by selecting them), delete themes (select and press the delete button, or right click and select
delete), or set a theme as default (right click a theme).
In the manager, you can also create new themes. Right click the graph and select Properties in order to modify the
properties of the sample graph, and when you achieve the look that you prefer, click the Save button. After clicking
Save, you can name your theme, and it will appear in the themes list to the left.
In the theme manager, there is a sample annotation, legend, arrow, and image. These items should be congured to
match the rest of the graph theme if desired; the properties of these four elements are saved with the theme, and are
used as default properties for any new elements created.
The theme manager is shown below.
93
CurveExpert Professional Documentation, Release 2.0.4
11.2 Series properties
11.2.1 What are slots?
CurveExpert Professional keeps track of the properties for each series in your plot by using the concept of slots.
Each displayed series obtains its properties from slots in the same order that your series appears in the legend. What
this means is that if you remove a series from a graph, its slot is vacated. The next time a series is added, the rst
vacated slot is automatically used to obtain the properties for that series.
When you edit properties for a series, you are really modifying the slot that the series resides. Reordering the series
by changing the legend order also reorders the slots.
If a series is added to a graph when all slots are already occupied, the properties assigned to that new series wraps
back to the front of the slots. For example, if there are three available slots and three series already displayed in the
graph, the next added series will take its properties from slot 1. The next added series will take its properties from slot
2, and so forth.
Obviously, the properties awarded to new series via slots can be modied via the regular Graph Properties dialog. The
slots only determine the initial properties for a newly added series.
11.2.2 Slots and themes
So, the graph theme saves the properties for each slot. The themes that ship with CurveExpert Professional all have a
set of built-in slots for an attractive default set of series properties.
The graph theme manager gives you a means for editing the slots. For your own custom theme, the rst parameter to
decide on is the number of slots. A small number of slots (say 3) is easier and faster to work with, but does certainly
94 Chapter 11. Graph Theme Manager
CurveExpert Professional Documentation, Release 2.0.4
mean that the slots will wrap more often as more series are added. Set the number of slots with the Number of slots
control at the top of the Graph Theme Manager.
The other controls at the top of the Graph Theme Manager are for display within the manager only, just to be able to
reasonably see the properties of each slot. The Show slots from/to control lters the lines that are shown on the graph
canvas, so that you dont have to see all of your n slots at the same time. Simply set the controls appropriately to view
the slots that you desire to work on.
The Show as continuous control changes each series from a discrete dataset to a continuous function. CurveExpert
Professional uses the same slots for both, but slightly modies the output from the slot to more desirably portray a
continuous entity. When a slots properties are awarded to a continuous function, the marker is automatically removed,
and the line style is changed to a visible style if it happens to be set to none. The particular line style selected is
determined by the just-disabled marker. If the marker was a square, the line style picked is dashed; if a triangle,
the line style picked is dot-dashed; otherwise, the line style is solid. This mapping allows the same slot to be used
reasonably regardless of whether or not the plotting entity is discrete or continuous.
Note: It is perfectly valid for a theme to contain a series property slot that is the same as the background color; this
can be seen by looking at the Elegant White theme; there is a series that has a white line and marker set, which is
very hard to see. This is done so that if the user does indeed change the background color to something else, the white
series is a valid one to use. CurveExpert Professional will automatically avoid slots that have these types of colors
(colors that match the background color of the graph) when awarding a new slot to a newly added series.
11.3 Graph elements
The properties of the rst annotation, rst arrow, and the legend are saved into a theme, and used when it is applied.
Therefore, it is recommended to congure the legend, annotation, and arrow on the displayed plot appropriately to
match with your desired color scheme.
11.4 What is contained in a graph theme?
So that the theme is not tied to a specic graph, the following items are not saved as a part of a theme:
title
axis labels
axis min, max, or increment
location of an arrow
location of an annotation
content of an annotation
All other parameters are saved, including the complete set of slots for all series on the graph.
11.3. Graph elements 95
CurveExpert Professional Documentation, Release 2.0.4
96 Chapter 11. Graph Theme Manager
CHAPTER
TWELVE
CREATING CUSTOM MODELS AND
FUNCTIONS
12.1 Introduction
CurveExpert Professional allows very powerful construction of custom models and custom functions. By way of re-
minder, a model in CurveExpert is used to calculate nonlinear regressions, and are dependent on both the indepedent
variables (x) and a vector of parameters (a). A function is a dependent on the independent variables only.
Creating your custom models/functions can be performed with the choices under the Tools menu; there are two classes
of interfaces: simple interface, and advanced interface. For most needs, the simple interface suces, as it allows the
user to express a model in a one-line expression form.
Note that you can create custom models and functions at any time; they are saved so that you can use them when you
compute nonlinear regressions or functions later, and they appear in the Custom part of the nonlinear regression
picker (or function picker) when you choose Calculate->Nonlinear Model Fit or Calculate->Function.
12.2 Custom Models
To create a custom model, select Tools->Custom Models. This will show the model manager, which allows you to
delete or save custom models.
97
CurveExpert Professional Documentation, Release 2.0.4
To get started, simply type the expression for your model into the Model Equation eld. Do not include y = as a
part of your equation; just the expression will suce.
As you type, CurveExpert Professional will guess how to render your equation, even converting Greek letters into
the appropriate representation. The Equation Preview (see Equation Display) shows how your equation will render
in CurveExpert. Note that its guess is not adjustable in the simple interface; if the rendering is undesirable, it can be
adjusted by editing latexequation attribute for the model directly by clicking the Edit Code (Advanced) button.
See Custom Models: Advanced Usage for more details.
Once your model is written the way that you like, simply hit the Save or Save As button, depending your intent. Give
your model a name, and your model will then appear in the list on the left, signifying that it is now available for use
within CurveExpert Professional, when you choose to compute nonlinear regressions.
12.2.1 Mathematical Operations
Obviously, the standard arithmetic operations are supported. Multiplication is performed with a *, division with /,
addition with +, and subtraction with -. Raising a quantity to a power is performed with either ^ or **, with the **
notation being preferred. Grouping is performed with parentheses ().
12.2.2 Reserved Words
In any model, the independent variable is always denoted by x. If you are writing a model that is a function of multiple
independent variables, these are denoted as x1, x2, x3, and so on. Each of these special variables are reserved words
and should not be used as a parameter name in your model.
All mathematical functions supported by CurveExpert Professional, such as sin, cos, tan, exp, etc., are also reserved
words. See Appendix A: Math Functions for a complete list of the mathematical functions supported.
Any other name that CurveExpert Pro sees in your model is treated as a parameter. This powerful feature lets you name
your parameters any name that you nd appropriate, such that the models syntax carries meaning. Thus, names such
as beta, my_long_parameter_name, and b are all legal parameter names. Note also that names are case sensitive;
the parameter a is distinct from the parameter A, for example.
98 Chapter 12. Creating Custom Models and Functions
CurveExpert Professional Documentation, Release 2.0.4
12.3 Custom Functions
Custom functions are exactly like custom models, but without any parameters; they are only dependent on the in-
dependent variable(s). As such, if you enter a custom function, CurveExpert will ag any unknown name in your
equation as an error. Also, custom functions have a default domain setting that can be set to assist the autoscaler, as
documented in Autoscaling. Otherwise, creating a custom function is exactly the same as creating a custom model,
which is documented above.
12.4 Custom Models: Advanced Usage
If your needs for a model are more complex than a one-line equation, CurveExpert Pro has the capability of allowing
you to program a model as complicated as you like. This capability is accessible via the Tools->Custom Models menu
choice; then, click Edit Code to directly access the code that implements the model.
Rather than trying to reinvent another language for the user to express a model in, CurveExpert uses Python as its base
model language. Thus, anything that can be done in Python can be done in your custom models. This gives the user
extreme exibility in the custom models, even to do things like download data from a web server that inuences how
the model is computed. Here, your creativity is the only limit.
Documenting the entire Python language and its capabilities are obviously outside the scope of this document; for this,
refer to http://docs.python.org/release/2.6.6. You do not, however, need to be procient in Python to be reasonably
productive directly editing a custom model. Just follow the examples given as a part of CurveExpert Pro, and for
further reference, look in the lib and libf directories in the core CurveExpert Pro distribution (where the program
les are located; see Where les are located). These directories contain all of the CurveExpert Pro built-in models and
built-in functions.
Note: Python uses indentation to identify code blocks (for example, the code that should execute when an if statement
is true). So, if you have an unexplainable syntax error in your model, make sure that your indentation is correct.
Upon selecting the Edit Code button, the dialog expands, and the coding window replaces the simpler interface
where you can just enter the equation directly (to return to the simpler one-line equation editing, just press Edit
Equation). The coding window has full syntax-highlighting capability, and you can use standard cut/paste shortcuts
ink the window in order to facilitate code construction.
12.3. Custom Functions 99
CurveExpert Professional Documentation, Release 2.0.4
Note: If you have an error in your custom model, it will have [ERROR] appended to its name for identication. To
correct it, simply select it and edit the code in the coding window.
Remember also that you can view the code for your simple models through this interface, to view what is going on
behind the scenes, as well as to adjust easy things like the latexequation, in case you want to change how your model
equation is rendered. In fact, when you create a model in the simple interface (one-line equation), CurveExpert Pro
just writes the Python code on your behalf.
As in regular Python, any characters following a # sign are a comment, and are highlighted in green in the coding
window.
Every model should have at least four items (name, nindvar, equation, evaluate), with the other two items
(latexequation and initialize) being optional.
12.4.1 name
This is a variable to dene the name of your model, which is the name used throughout CurveExpert Pro to refer to
it. The name of your model is also used to generate the lename in which it is saved, the full path of which is shown
above the coding window. The type of this variable is a string, and should be enclosed in quotes.
12.4.2 nindvar
This is a variable to dene the number of independent variables that this model expects. Most of the time, this value
will be 1, but can obviously be higher depending on how many independent variables you want your model to apply
to.
100 Chapter 12. Creating Custom Models and Functions
CurveExpert Professional Documentation, Release 2.0.4
12.4.3 equation
This is a variable that is a text representation of the equation. It is for information only, and is displayed by CurveExpert
Pro in dierent areas of the software.
12.4.4 latexequation
This is a variable that is a mathtext representation of the equation (see mathtext and Appendix B: Math Symbol Refer-
ence for how to write in mathtext). In short, this is a TeX-like version of your equation that will be used every time
rendering of your equation is required in CurveExpert Pro. This variable is optional, and if not present, CurveExpert
Pro will attempt to guess it by looking at the equation variable above.
12.4.5 evaluate(x,a,b,c,d,...)
This is the most important part of your model; evaluate() is a function that is called whenever your model is
evaluated with the independent variables and a set of parameters. It is this function that is called in the course of the
parameter optimization process, and it is called in order to draw your plot.
The evaluate function must take x as its rst argument. This x is the vector of independent variables, and can be
multiple columns if there is more than one independent variable. Following x is a comma separated list of parameters,
which can have any name. The job of the evaluation function is to take these pieces of data and compute an output
vector y, returning it as the result of the evaluation.
An example of an evaluate function is the following (with comments removed for brevity):
def evaluate(x,a,b,c):
return exp(a + b/x + c*log(x))
Any other Python function (denoted by the def keyword) other than evaluate and initialize are ignored. This
means that you can create your own Python functions and call them from your evaluate function as you wish.
12.4.6 initialize(x,y)
The initialize function is optional, but can greatly aid in the convergence of a models parameters in the process of
nonlinear regression. initialize() is a function that takes the independent variables as the rst argument, and the
dependent variables as the second (both of these quantities are based on the data currently held in the spreadsheet).
With this data, you can perform any analysis necessary to compute good initial guess parameters to start with. The
parameters can be returned as anything that can be translated into a Python array, but most commonly are returned
simply as a comma separated list.
Good examples of using initialize() can be found in CurveExpert Pros built-in models, by way of example (the
built-in models are located in the lib directory where the program les are; see Where les are located). A common
approach there is to transform the model into a linear one, solve a linear least squares system, and use the output from
that in order to initialization the nonlinear regression.
An example of an initialize function is the following (with comments removed for brevity):
def initialize(x,y):
try:
n = len(x)
A = ones((n,3))
A[:,1] = 1.0/x
A[:,2] = log(x)
B = log(y)*log(x)
soln,residues,rank,s = lstsq_solve(A,B)
12.4. Custom Models: Advanced Usage 101
CurveExpert Professional Documentation, Release 2.0.4
a,b,c = soln # use Pythons unpacking to extract a,b,c from the solution
except:
a,b,c = 1.0,1.0,1.0
return a,b,c
In this case, an attempt is made to transform the model into a linear least squares system and a solve of that system
is tried. If that fails (for example, if there is a zero in the data, the last two columns of A cannot be computed), the
solution is just initialized to three ones.
12.5 Custom Functions: Advanced Usage
Again, custom functions are the same as custom models except that they have no free parameters. The evaluate()
function takes only x as an argument, and there is no need for an initialize() function. The advanced interface for
editing and creating custom functions is otherwise exactly the same as the one for custom models described above. An
example evaluate function is below:
def evaluate(x):
return exp(x)*sin(x)
For 3D and higher functions, like custom models above, x is a multicolumn vector. To extract out each column for
convenience, an example is given below:
def evaluate(x):
x1 = x[:,0]
x2 = x[:,1]
return x1*sin(x2)
102 Chapter 12. Creating Custom Models and Functions
CHAPTER
THIRTEEN
PLUGINS
Note: Plugins are only active in a licensed version of CurveExpert Professional, or while CurveExpert Professional
is within its trial period.
13.1 What is a plugin?
A plugin is a tool that can be used to automate tasks within CurveExpert Professional. It is a Python script with a few
specic functions (the most important one is the run() function, which is executed whenever the plugin is run from
within CurveExpert Professional), and in these functions, you can perform whatever task needs to be accomplished.
Some common Python modules are already available (such as numpy, scipy, wxPython, and obviously all of the
standard modules that ship with Python) for your use, or you can import the api module (see Appendix E: Plugin
API) in order to control CurveExpert Professionals behavior, such as calculating a particular result that you desire. In
addition, you can import any Python modules that you have locally installed.
Plugins are extremely exible; one can perform practically any task with them. For example, one could easily write a
plugin that downloads data from a remote web server, performs a nonlinear regression on it, and writes out the result
of that nonlinear regression.
13.2 Running a Plugin
Once a plugin is installed, it can be executed by selecting it from the Plugins menu, or by double clicking it in the
Plugins pane. Running the plugin calls its run() function. If there is no Plugins menu, this means that there are no
plugins currently enabled; the menu will automatically appear as soon as runnable plugins are present. See Managing
Plugins for how to enable and/or install a plugin.
13.3 Managing Plugins
To access the plugins manager, select Tools->Manage Plugins. This displays the dialog below:
103
CurveExpert Professional Documentation, Release 2.0.4
All plugins that are installed are listed here; out of the set of installed plugins, enabled plugins are shown in color
(disabled plugins are dimmed).
13.3.1 Enabling/disabling a plugin
To enable or disable a plugin, right click the desired plugin, and select Enable or Disable as appropriate. Disabling
a plugin cause it to be dimmed in the manager, and will not appear in the Plugins menu or in the Plugins pane in
CurveExpert Professional.
13.3.2 Creating a new plugin
Create a new plugin by clicking the New button at the bottom of the manager, and give the new plugin a name. This
will create a skeleton plugin, with the necessary functions and attributes already present, for you to begin to work with.
To edit your new plugin, either double click it in the manager, or right click it and select Edit.
104 Chapter 13. Plugins
CurveExpert Professional Documentation, Release 2.0.4
13.3.3 Cloning a plugin
Sometimes, its easiest to start from an existing example. To clone any plugin, right click it and select Clone. This
will create another copy of a plugin. To edit your newly cloned plugin, either double click it in the manager, or right
click it and select Edit.
13.3.4 Installing a plugin
If your plugin le was created outside of CurveExpert Professional, or sent to you by a colleague, it must be installed
before use. Click Install from within the manager, browse for the plugin le (either .py or.pyc), and open it. This will
install the plugin, and it will be available just like any other. Installing essentially copies the plugin le from its current
location to $HOME/.curveexpert/plugins.
13.3.5 Uninstalling a plugin
To get rid of a plugin entirely (when you know that you dont want it any more; otherwise, just disable it), right click
the desired plugin and select Uninstall. Uninstalling deletes the plugin le from $HOME/.curveexpert/plugins (or
$HOME/.curveexpert/plugins-disabled).
13.4 Writing/Editing Plugins
To edit a plugin, either double click it in the manager, or right click it and select Edit. This will display a Python code
editor as follows:
13.4. Writing/Editing Plugins 105
CurveExpert Professional Documentation, Release 2.0.4
It should be noted that the CurveExpert Professional API module is always automatically imported for you, and is
available directly in the api namespace. Documentation for all available API calls is given in Appendix E: Plugin
API. Importing of other desired Python modules is easy, using the standard Python import statement.
At any point during the editing, the Check Syntax button can be clicked, which performs a test-import of the plugin.
If there is an error, the oending line and traceback is shown at the bottom of the dialog. The editor also will not allow
the plugin to be saved until it has gone through a syntax check, once editing of the plugin is detected.
For complicated plugins, it is probably more desireable to perform the development in a real development tool, such
as Eclipse or Netbeans. In this case, simply edit the plugin le and save it somewhere on disk; then install the plugin
as documented above.
Your plugin may contain any number of functions (dened by the def keyword); however, there are several special
functions that are reserved for a special purpose. These functions are run, initialize, and the set of hook functions
documented below. Further, there are several module-global attributes that hold special meaning for a plugin; name,
version, description, and author.
13.4.1 The run() function
Every plugin must have a run() function; this is the function that is executed any time the user picks your plugin
from the Plugins menu.
The run() function can optionally have arguments. Arguments that are mandatory have no default value, and argu-
ments that are optional do (see the Plugin with Arguments example plugin). If your run() function has arguments,
the following dialog will open when the plugin is run:
106 Chapter 13. Plugins
CurveExpert Professional Documentation, Release 2.0.4
The user is given an opportunity to ll in the arguments, and your script is free to use these arguments in any way
appropriate. Note that regardless of the type of your arguments given in your run() function, all arguments are
passed to your script as strings. Thus, you (as the plugin writer) are responsible for checking the arguments for
validity and converting them to the correct type before using them.
13.4.2 The initialize function
The initialize() function is called whenever the plugin is added to the Plugins menu. This is a good place to
perform one-time initialization of data that might be needed later for the run() function. Note that the initialize()
function can be called multiple times in one session, if the user enables/disables the plugin (upon each enabling, the
initialize() function is called). This function takes no arguments.
If there is no initialization needed, this function may be omitted from your plugin.
13.4.3 Metadata
There are four attributes that every plugin should have: name, version, description, and author. The most
important of these is name, which obviously denes the name of the plugin. This name is the one that appears in
the Plugins menu that the user interacts with. The other attributes are informational metadata that is displayed in the
Plugins manager only.
13.4.4 Hook functions
Plugins can respond to several high-level events that occur during the execution of CurveExpert Professional. To
respond to an event, all you have to do is make sure that you have a function present in your plugin that services the
event. These functions have specied names, as documented below.
13.4. Writing/Editing Plugins 107
CurveExpert Professional Documentation, Release 2.0.4
on_writefile(file_name, userdata)
The on_writefile hook is called any time that a CXP le is being written. This hook gives the plugin author an
opportunity to store information persistently in a CXP le. An example follows:
def on_writefile(file_name, userdata):
api.message("A file is being written: %s"%file_name)
userdata[my_special_plugin] = [1,2,3,4,5]
The userdata parameter is a dictionary that the plugin author can add information to, and the information added to
this dictionary is stored in a CXP le. Note that this dictionary can be used by other plugins as well, so it is highly
recommended to store all plugin-specic information under a unique key that is specic to the plugin.
The only requirement for items placed in the userdata dictionary is that they are picklable.
on_readfile(file_name, userdata)
The on_readfile hook is called any time that a CXP le is read. This hook gives the plugin author an opportunity to
read any of the plugin-specic data stored in the on_writele hook. An example follows:
def on_readfile(file_name, userdata):
api.message("A file is being read: %s"%file_name)
something_i_saved = userdata[my_special_plugin]
The userdata parameter is a dictionary that the plugin author can read information from, that was saved via the plugin
in the on_writele hook.
on_datachanged()
The on_datachanged hook is called any time that the dataset is changed. An example follows:
def on_datachanged():
api.message("Detected a change in the data.")
on_resultsadded(list_of_result_objects)
The on_resultsadded hook is called any time that results are added. The hook should take a single argument, which
is the list of added results. An example follows:
def on_resultsadded(list_of_results):
for result in list_of_results:
do_something(result)
13.5 Examples
Example plugins are given in the resources/default_les/plugins directory of the CurveExpert Professional distribution.
These plugins are installed automatically by default, but are initially disabled. To see these examples, open the Plugins
manager, and double click one of them. These examples will get you started with the concept of writing plugins for
CurveExpert Professional. Remember that anything that you want can be done in a plugin, because they are essentially
Python codes that can be as complex as need be to accomplish a task.
108 Chapter 13. Plugins
CurveExpert Professional Documentation, Release 2.0.4
13.6 Miscellaneous
At the time of this writing, the version of embedded Python with CurveExpert Professional is version 2.6.6. As such,
the Python language features oered by this application are identical to this Python version.
It can be convenient for dierent plugins to share the same code. To support this, you have three choices:
place the code that you want to share in a Python le, and put the le in $HOME/.curveexpert/plugins-common.
This path is always searched when importing Python modules within plugins.
place the code that you want to share in a folder/directory of your choice, and set the environment variable
AUX_MODULE_PATH to this directory before running CurveExpert Professional.
place the code that you want to share in a folder/directory of your choice, and set the environment variable
PYTHONPATH to this directory before running CurveExpert Professional.
Note that both of the environment variables PYTHONPATH and AUX_MODULE_PATH can be set to multiple paths,
and all of these paths will be searched. Under Windows, separate each path with a semicolon; otherwise separate with
a colon. For example, under Linux, you might do (depending on your shell):
% export AUX_MODULE_PATH=/my/first/path:/my/second/path
13.6. Miscellaneous 109
CurveExpert Professional Documentation, Release 2.0.4
110 Chapter 13. Plugins
CHAPTER
FOURTEEN
EQUATION DISPLAY
In various dialogs throughout CurveExpert Professional, the equation for a model or function is displayed. This
equation is the latexequation attribute of the model, which can be set explicitly via Custom Models: Advanced
Usage. The contents of this attribute is mathtext that describes how the equation should be rendered. An example of
an equation display is below:
The equation display has a couple of small, convenient features. If the mouse is right-clicked on the display, you will
be given the option to copy the image onto the clipboard (so that you can use this in some other application). You can
also zoom in or out on the equation, in order to make it temporarily larger or smaller than its default size.
Note: When copying the equation, it is copied using a white background.
111
CurveExpert Professional Documentation, Release 2.0.4
112 Chapter 14. Equation Display
CHAPTER
FIFTEEN
WRITING DATA
15.1 Introduction
After performing some analysis, a typical task is to write data, in some form, to disk for later retrieval. CurveExpert
Professional supports several ways to extract data and graphs to a le or the clipboard.
15.2 Writing a CurveExpert Professional (CXP) le
If you want to save all of your data, results, graphs, and notes to disk, you can choose File->Save or File->Save As in
order to write a CXP le to disk. These les can be read in later using File->Open, obviously. CXP les are portable
across platforms (Windows, Mac, Linux) and save all possible information about your current session.
Also, if a particular model or function is saved as a result in a CXP le and it is not present on the system reading
the le, the model/function will automatically be created (on the system reading the le) on your behalf. This newly
created model/function will then be available for use in the Imported family, and will appear appropriately in the
Nonlinear model or function pickers.
15.3 Exporting a dataset to text le
To save your dataset into a text le, choose File->Export. The dataset will be exported using the default delimiter
chosen in Edit->Preferences->General->Default delimiter.
15.4 Writing a graph to a picture le
To save a particular graph to a le, right click it and select Save. Any graph can be saved wherever it appears via this
procedure. Alternatively, click the Save icon in the graph toolbar (if present). See Saving graphs for more details on
supported le formats.
The same graph can be copied to the clipboard by right clicking and selecting Copy.
15.5 Printing
All graphs in the Graphs and Data pane can be printed by choosing File->Print or File->Print Preview. To print an
individual graph, right click it and select Print or Print Preview.
113
CurveExpert Professional Documentation, Release 2.0.4
If the margins or paper orientation is not correct, you can set these in the File->Page Setup dialog.
114 Chapter 15. Writing Data
CHAPTER
SIXTEEN
APPLICATION PREFERENCES
16.1 Introduction
Application preferences can be changed by choosing Edit->Preferences from the menu.
16.2 General Preferences
General settings apply to general items of interest in CurveExpert Professional.
115
CurveExpert Professional Documentation, Release 2.0.4
16.2.1 Show Tips at Startup
When the software starts, a helpful tip can be shown. However, if you nd this either unhelpful or annoying, it may be
turned o (or back on) by selecting this checkbox.
16.2.2 Automatically send issue reports
CurveExpert Professional has the ability to automatically send an issue report should something go wrong with the
software. The objective of doing is to nd and correct problems in the most timely manner possible.
An issue report, when and if one is sent, contains no personally identifying information or any of your data, and the
report itself is submitted anonymously. However, if you would like to opt-out of this behavior, uncheck this box.
16.2.3 Spreadsheet Formatting
The spreadsheet formatting setting allows you to set your preference for how data is displayed, by default, in the
spreadsheet. The data may be displayed in a xed point, scientic, or engineering format, with a precision (number
of digits after the decimal) as specied in the with precision eld. This default number formatting can always be
overridden on a per-cell basis by selecting the cells in the spreadsheet, right clicking, and selecting Format Numbers
as documented in Number Formatting.
The engineering format is the same as scientic, except that the exponent is always a multiple of three.
16.2.4 Report Formatting
CurveExpert Professional displays formatted reports for things such as the result details and comparing regressions.
When displaying numerical data in these reports, a particular formatting must be used for this data. The style can be
chosen in this application preference.
The data may be displayed in a xed point, scientic, or engineering format, with a precision (number of digits after
the decimal) as specied in the with precision eld.
The engineering format is the same as scientic, except that the exponent is always a multiple of three.
Note that this option is just a default, and you will be given the chance to change the formatting when the report is
generated.
16.2.5 Default condence level
In result details and in displaying condence/prediction bands, a certain condence level is needed. The default
condence level set in the preferences here is the starting level set throughout the application in these situations. You
will be given the opportunity to change the condence level on a result-by-result basis.
16.2.6 Excel style cursor movement in spreadsheet
By default, both the TAB and ENTER keys are treated as carraige returns in CurveExpert Professional. In other words,
the cursor is moved to the left until it bumps into the right side of the dataset, in which case the cursor is moved to the
beginning of the next row.
If you would rather that the cursor go right on a TAB (which is the same as the default TAB behavior), and down on
an ENTER, select this box. Note that CurveExpert Professional will still keep your cursor within the bounds of the
dataset.
116 Chapter 16. Application Preferences
CurveExpert Professional Documentation, Release 2.0.4
16.2.7 Sort Data On File Import
Normally, CurveExpert Professional reads your data directly from le, accounts for the settings in the File Import
window while importing, and places it in the spreadsheet. If you would also like to automatically sort the data against
the rst column, check this box.
This capability is most useful if you frequently use splines to t data; the data must be sorted for a spline to compute
correctly.
16.2.8 Live Model Evaluation
In the result details window, an evaluator follows the location of your mouse to inform you of the x/y location of the
mouse, the model/function evaluated at the pointed-to x coordinate, and the rst derivative of the model/function. If
this is not desired or is too slow, uncheck this box.
There also an intermediate state for this checkbox; if set to intermediate, the live evaluator will activate when the left
mouse button is pressed only (by default).
16.2.9 Automatically Update Results
If you have already calculated results and then change the data, the results become invalid (see Working with Results).
This state is indicated by a yellow caution badge placed on the results in the Results pane. To update these results,
you can select some (or all), right click, and select Update. To automatically update results without having to do it
yourself, check this box. As soon as a change in the data is detected, all results will be recomputed.
16.2.10 Allow Multiple Result Windows
Allow the opening of multiple result windows at one time, instead of allowing only one. While convenient, it can lead
to a window management problem if you open too many at once.
Note: This feature is disabled on OSX (Mac) platforms.
16.2.11 Default delimiter
In several places in the software, a delimiter is used to separate items in the same row. For example, in copying data
to the clipoboard, or in generating a table, a delimiter between data items must be selected. If you have a favorite
delimiter, set it here.
16.2.12 Data le location
Default directory where data les are stored. Initially, the data le location is set to $DOCUMENTS/CurveExpert
Professional, and some example data and example documents are placed there at install time.
16.2. General Preferences 117
CurveExpert Professional Documentation, Release 2.0.4
16.3 Regression Preferences
16.3.1 Ask for initial guesses when necessary
At times, when calculating a list of nonlinear regressions at once, the calculation of the initial guess will fail for some
(for various numerical reasons; a simple example is when the natural log is taken in the process of calculating the
initial conditions, and there is a zero or negative in the dataset). When this happens, CurveExpert Professional will
prompt you to ask if you want to attempt initial guesses manually, and give a list of the ts that failed in this manner.
If you want CurveExpert Professional to just treat initial guess failures as general model failures, uncheck this box.
16.3.2 Tolerances
The tolerances determine when CurveExpert Professional will stop calculating a given model; in any nonlinear regres-
sion, the solution is an iterative process in which the model parameters are adjusted in order to reach the best possible
set. The iteration will terminate when either the overall change in the residual is below the given tolerance, or when
the change in the parameters is below the given tolerance. The residual is dened as
T =

_
N

i
_
y
i
f (x
i
; a)
_
118 Chapter 16. Application Preferences
CurveExpert Professional Documentation, Release 2.0.4
16.3.3 Maximum Iterations
The iteration described in Tolerances above can also be terminated when the number of iterations reaches a certain
threshhold. That threshhold is specied in this eld.
16.3.4 Max number of cores to utilize
CurveExpert Professional can make use of multiple cores on your system when computing batches of nonlinear re-
gressions at a time. The number of cores to utilize can be specied here.
Note: If you only compute one nonlinear regression at a time, and not batches of them, it is best to just leave the
multicore setting at zero.
Note: A multicore setting of zero is dierent than one. Zero signies that computations take place in the same
process as the GUI, and one means that there is one worker process present (which consumes memory) in which the
computations are performed.
16.4 Graphing Preferences
16.4. Graphing Preferences 119
CurveExpert Professional Documentation, Release 2.0.4
16.4.1 Max display points
Sets the maximum number of points, per series, to display when drawing a discrete dataset on a graph. If the dataset
has more points than this, it will be thinned to this number of points. The thinning is based on an appropriate stride to
use in order to reduce the total number of points drawn to below the threshhold given here. This option is in place to
prevent extremely slow graph redraws due to attempting to draw an excessive number of points.
This option aects discrete datasets only; not continuous functions. For continuous functions, the Resolution param-
eter, in the Series Page of the Graph Properties dialog (see Changing Graph Properties), is the way to control the
sampling of the function that is used for drawing.
16.4.2 Autoscale when model/function added
When a model or function is added to a graph (via a Send to Plot command or a drag and drop), CurveExpert Profes-
sional can automatically autoscale the graph. In this case, you can set the preference to Never or Always. If the
autoscale lock has been set for a graph (see Graph Toolbar), the graph will not be autoscaled regardless of this setting;
in other words, the graphs autoscale lock takes precedence over this preference.
16.4.3 Autoscale when data changed
In order to keep the data in view at all times in all graphs, CurveExpert Professional can automatically autoscale the
graphs when the underlying dataset changes. The disadvantage of doing this is that, for large datasets, the redraw can
be slow. Also, if you have specied your own limits to axes in the graphs, they would be lost if the data changes. If the
autoscale lock has been set for a graph (see Graph Toolbar), the graph will not be autoscaled regardless of this setting;
in other words, the graphs autoscale lock takes precedence over this preference.
To control when autoscaling takes place, select either Never or Always.
16.4.4 Autoscale when model/function removed
When a model or function is removed from a graph (either by removing the result from your document altogether, or
by right clicking a result on a plot and selecting Remove), CurveExpert Professional can automatically autoscale the
graph. In this case, you can set the preference to Never or Always. If the autoscale lock has been set for a graph
(see Graph Toolbar), the graph will not be autoscaled regardless of this setting; in other words, the graphs autoscale
lock takes precedence over this preference.
16.4.5 Middle mouse button for graph properties
Normally, the right mouse button is used to access the context menu on graphs. However, for mouse rotation of 3D
graphs, it is sometimes more intuitive to use the right button for that purpose. So, you can set the middle mouse to be
the graph context menu activator if desired.
For 2D plots, this setting has no eect. The graph context menu can always be accessed with either a middle or right
click of the mouse.
16.4.6 Highlight pickable objects
As you move the mouse over a curve or data, it will highlight, signifying that you can click it to modify its properties.
Also, it signies that, on right-click, you can access the details for that series. However, the redrawing necessary for
this feature can make the graph response sluggish. So, deactivate this feature if you dont need to see the highlighting
or access details directly from the graph.
120 Chapter 16. Application Preferences
CurveExpert Professional Documentation, Release 2.0.4
16.4.7 Continuous redraw during pan
During a pan, all continuous series must be regenerated on-the-y if this feature is turned on. This can be expensive,
so if it is OK not to see the curve dynamically update during a pan, turn this checkbox o. The series will then only
be regenerated each time the mouse button is released during a panning operation.
As a reminder, this setting does not aect discrete datasets on the graph; only results that are continuous.
16.4.8 Automatically plot top # results
When computing batches of nonlinear regressions at once, if all of them were plotted on the Top Results graph, it
would be quite messy. Here, you can decide how many of the results will be plotted on the graph for each batch that
you compute. The default behavior is to take the best three ts for every batch that you compute. Other results that you
want to visualize can always be added by right clicking them and selecting Send to Plot, or by dragging and dropping
the result to the plot.
16.4.9 Preserve aspect ratio when printing
Normally, any graph is t to the page when it is printed. If you would like to preserve the aspect ratio of your graph
when printing, check this box. In other words, if you have a graph that is long and skinny, to keep it long and skinny
when printed, check this box.
16.4.10 Global mathtext font
The font used to render equations (see mathtext) through the application can be set to Computer Modern, STIX Serif,
or STIX Sans-serif. Computer Modern looks very much like TeX equations. STIX Serif looks slightly dierent, and is
meant to blend with surrounding text that is serifed (such as Times Roman). STIX Sans-serif is obviously a non-serifed
font, meant to blend with surrounding text that is nonserifed (such as Helvetica or Arial).
16.4.11 Default graph theme
A graph theme is the look of the graph, and new themes can be constructed either with the graph theme manager
(Tools->Manage Graph Themes) or by saving a theme directly from a graph by right-clicking and selecting Save
Theme. Every graph has a default theme, and you can set what that default theme is here. This way, all plots will be
constructed with the look that you desire.
16.4. Graphing Preferences 121
CurveExpert Professional Documentation, Release 2.0.4
16.5 Logging Preferences
16.5.1 Log detail
CurveExpert Professional keeps a log in $HOME/.curveexpert/logs (see Log Viewer) ; the log detail setting determines
the detail of messages that are stored in the log. The default setting is info, which logs all messages that appear in
the message window, as well as internal information generated by the application. To have less information logged,
move the log detail setting to warning, error, or critical. To log more (for example, if trying to sort out a software
problem), move the log detail setting to debug.
Note that the logs are easily viewable by selecting Tools->Log Viewer in the main menu.
16.5.2 Number of log rotations
When the log reaches a maximum size (congurable below), it will be rotated. This means that if the log le in
question is main.log, it will be renamed to main.log.1, and all of the other previously rotated log les will be renamed
from main.log.1 to main.log.2, and so on. The number of log rotations determines how many of these les you would
like to keep. A number of log rotations of three means that you plan to keep main.log, main.log.1, main.log.2, and
main.log.3.
122 Chapter 16. Application Preferences
CurveExpert Professional Documentation, Release 2.0.4
16.5.3 Maximum log le size
Choose the largest le size (in megabytes) that any log le will be allowed to reach before rotation. Note that the log
les for multicore workers will be limited to one-fourth of this number. The maximum size on disk that can be taken
by the collection log les is therefore
space(MB) = s
max
(n
rotations
+ 1) + s
max
(n
rotations
+ 1)n
workers
{4
With the default settings of a 2MB log size and 3 rotations, the maximum amount of disk space consumed by the logs
is then 16MB, assuming a quad core machine in which four worker processes are utilized.
16.6 Localization Preferences
The localization preferences are documented in the Localization chapter, in the Conguring CurveExpert Professional
to match your workow section.
16.6. Localization Preferences 123
CurveExpert Professional Documentation, Release 2.0.4
16.7 Advanced Preferences
16.7.1 Number of undo levels
Any undo mechanism consumes some memory to save the previous state of the application; the number of undo levels
setting allows you to customize how many previous states are saved that you can undo to. The parts of CurveExpert
Professional that support Undo operations are the graphs, data spreadsheet, notes, and messages.
16.7.2 Cache location
The location of a cache that CurveExpert Professional uses. It is not changeable, but it can be cleared if need be. This
cache operates very similarly to a web browsers cache. Clearing it will not aect the correct operation of the program,
but will force the regeneration of the information that was cached, slowing performance temporarily.
16.7.3 Always refresh graph themes
If set, this option will merge the graph themes from those available with the software (called the stock themes), to
the users private theme directory ($HOME/.curveexpert/graph_themes). This happens whenever CurveExpert Profes-
sional starts. The purpose of keeping this option selected is that, when CurveExpert Professional is updated/reinstalled,
the user will not get any new themes or updated themes that are shipped with the software. In most cases, merging the
stock themes alongside your custom themes in $HOME/.curveexpert/graph_themes is the desired behavior.
124 Chapter 16. Application Preferences
CurveExpert Professional Documentation, Release 2.0.4
It should be noted, however, that if you have deleted any of the stock themes, they will reappear. Also, if you have
saved modied themes with the same name as the stock themes (which is not recommended), those themes will be
overwritten.
If the behavior noted above is not desirable, uncheck this option. It should be remembered, though, that if left unset,
the themes will not be updated when any new version of CurveExpert Professional is installed; the themes in the
$HOME/.curveexpert/graph_themes folder will be left untouched.
16.7.4 Proxy settings
CurveExpert Professional uses Internet access to begin your trial period (see Installation and Activation), check for
latest versions, upload issue reports (if enabled, see Automatically send issue reports), and upload logs (see Log
Viewer). If you are using a nonauthenticating proxy or no proxy at all, you can leave Use authenticating proxy for
Internet access unchecked, as your proxy settings will be automatically detected.
However, if you are behind a proxy that requires authentication, please ll in the host, port, username, and password
for access through the proxy.
16.7. Advanced Preferences 125
CurveExpert Professional Documentation, Release 2.0.4
126 Chapter 16. Application Preferences
CHAPTER
SEVENTEEN
LOCALIZATION
17.1 Executive Summary
If you live in a locale that uses dots for decimals (such as the US or UK) and you never (or very rarely) read les that
use European-style commas-for-decimals, the issues in this chapter are of no interest to you.
If you live in a locale that uses commas for decimals, and you want to see commas throughout the application,
select Use region settings in the application preferences. Further, if you need to read les that use the dot-decimal
notation most often, select English for File I/O numeric format.
If you live in a locale that uses commas for decimals, and you do not want to see commas throughout the
application, unselect Use region settings in the application preferences. Further, if you need to read les that use the
comma-decimal notation most often, select European for File I/O numeric format. Also, if you want to be able to
cut/paste to/from Excel, which obeys locale settings, select European for Clipboard I/O numeric format.
17.2 Conguring CurveExpert Professional to match your workow
17.2.1 Use region settings
The main switch is in Edit->Preferences->Localization->Use region settings. If this is checked, CurveExpert Pro-
fessional uses the region settings as given by the operating system. Any display of a number uses your localized
representation, which means that if you live in a locale that uses commas for decimals, all numbers that appear in
the spreadsheet, results, etc. use commas. Copying to clipboard uses commas, pasting from clipboard expects com-
mas, writing to les (le export, tables) uses commas, the reading from les expects commas. In other words, the
application respects the locale completely.
If Use region settings is left unchecked, the C locale is used, which always uses dots for decimals. You are still free
to modify the File I/O and Clipboard I/O settings below to match your workow.
17.2.2 File I/O numeric format
The Edit->Preferences->Localization->File I/O numeric format choice allows you to override the application-wide
locale setting for le input/output, to explicitly dene the numeric format for reading and writing les. This aects the
le import dialog as well as File->Export, and the table generator in the result details window. With this setting, for
example, users that utilize commas for decimals in CurveExpert Professional can choose to read and write les using
dots for decimals. And vice versa.
127
CurveExpert Professional Documentation, Release 2.0.4
Note: In the le import dialog (see Raw le import), there is still a chance to change the numeric format before
reading the le. This setting simply sets the default numeric format in that dialog appropriately.
17.2.3 Clipboard I/O numeric format
The Edit->Preferences->Localization->Clipboard I/O numeric format choice allows you to override the application-
wide locale setting for clipboard input/output, to explicitly dene the numeric format for copying and pasting. This
aects the copy/paste in the spreadsheet, as well as copying numeric data out any window that might oer it. With
this setting, for example, users that utilize commas for decimals in CurveExpert Professional can choose to copy and
paste data to/from the clipboard using dots for decimals. And vice versa.
17.2.4 File Import: numeric format
In the le import dialog (File->Open), there is a switch to explicitly pick the numerical formatting (English or Euro-
pean style) before reading the le. This gives the user the opportunity, on a le-by-le basis, to specify the numerical
format. See Raw le import.
17.3 File overrides
If your le contains the following within the rst ten lines of the le:
#DataFileProperties: locale=EN
or:
#DataFileProperties: locale=EURO
this signals to the CurveExpert Professional le importing mechanism that the the le uses English or European
numerical formatting (as appropriate), and the default there (see Raw le import) will be set appropriately. The user
may still override the default, however, but in most cases this would be a bad idea, because the le itself is stating what
the correct locale is.
So, you can use this capability in your own data les if you like. All of the sample data les shipped with CurveExpert
Professional contain this line, so that the samples work straightforwardly regardless of the applications current region
settings. This small addition to a text datale lets the le itself express its own numerical formatting.
17.4 CurveExpert Professional les
CurveExpert Professional les (.cxp) are not aected by region settings; therefore, they are portable across localities
as well as being portable across platforms (Windows, Mac, Linux).
17.5 NIST verication les
The data les associated with the NIST datasets are explicitly US-locale, and are treated as such when they are read in
as a result of Tools->Run NIST Validation performed within CurveExpert Professional (see Validation). However, if
you read these les in yourself, note that you MUST select an English numerical formatting in the le import dialog,
if it is not already set.
128 Chapter 17. Localization
CHAPTER
EIGHTEEN
VALIDATION
18.1 Introduction
CurveExpert Professional is validated against the Statistical Reference Datasets Project of the Na-
tional Institute of Standards and Technology. These datasets can be downloaded directly at
http://www.itl.nist.gov/div898/strd/general/dataarchive.html, but are also included verbatim in the CurveExpert
Pro distribution for you to use yourself. The datasets validated against are all of the sets in the Linear Regression
and Nonlinear Regression categories.
18.2 Running the Suite
You can validate CurveExpert Professional against these datasets simply by choosing Tools->Run NIST Validation.
All validation cases, with all starts, will be run. The NIST test suite provides dierent starts (i.e., initial guesses)
for each nonlinear regression validation. CurveExpert Professional covers all of these starts in the test suite, and the
results are output to the message window.
Some competing packages do not include all starts in their validation sets, but CurveExpert Pro shows the results of
all of them. At the time of this writing, there is one failure (dataset BoxBOD, Start #1), where, for the given start, the
initial correction to parameter
2
causes underow in the model, and from this there is no recovery.
18.3 Performing validations yourself
If you would like to perform validations against the test data yourself, all data les are contained in the exam-
ple_data/NIST folder in the initial data directory (see Where les are located). Or, you can always download the les
from NIST at the link above.
Note: The NIST datasets all list the dependent variable (usually y) before the independent variable (usually x). So,
when you read the les, select Rotate Columns in the le import dialog, or alternatively, rotate the columns after you
read in the dataset.
All nonlinear regression validation runs are performed in the automated suite with rtol=ptol=1.0e-14, and max-
iter=1000.
129
CurveExpert Professional Documentation, Release 2.0.4
130 Chapter 18. Validation
CHAPTER
NINETEEN
MISCELLANEOUS
19.1 Log Viewer
To viewthe log les, select Tools->ViewLogs fromthe main menu. All logs are stored in the $HOME/.curveexpert/logs
directory, and roll according to the preferences that you have set in Edit->Preferences->Logging (see Logging Prefer-
ences). So, you can easily view logs for previous sessions of CurveExpert Professional with this tool.
To copy a portion of the log, select the desired portion, and press the Copy button. Likewise, to upload a portion of the
log to the CurveExpert Professional server (http://www.curveexpert.net), press the Upload button. Uploading of a log
is typically used in conjunction with reporting or tracing a software issue. If no part of the log is selected, the entire
log will be copied to clipboard or uploaded, as appropriate.
There is one log le per process that CurveExpert Professional runs. If you are using multicore capability, there will
be several log les (named worker.n, where n is a number from 0 to the number of helper processes minus one) in
addition to the main log le. These worker log les document the actions that each worker has performed, and can be
copied or uploaded in identical fashion to the main log.
See Logging Preferences for more detail on conguring the logging options.
131
CurveExpert Professional Documentation, Release 2.0.4
19.2 Running Multiple Instances
Running multiple instances of CurveExpert Professional is supported; the only side eect is that, because all instances
share the same log les, logging might not function properly.
19.3 Where les are located
CurveExpert Professional places les in several locations on disk; the locations are documented below.
19.3.1 Program Files
The default locations are listed below, assuming that the default is accepted during the installation process. If you have
changed the location of the program les, obviously they will be placed where you specied.
Platform Program Files Location
Windows (64 bit) c:\Program Files (x86)\CurveExpert Professional
Windows (32 bit) c:\Program Files\CurveExpert Professional
Mac (OSX) /Applications/CurveExpertPro.app
Linux (installed as user) $HOME/CurveExpertPro
Linux (installed as root) /usr/local/CurveExpertPro
132 Chapter 19. Miscellaneous
CurveExpert Professional Documentation, Release 2.0.4
19.3.2 Application Settings
Platform Application Settings Location
Windows in registry: HKEY_CURRENT_USER\Software\CurveExpert Professional
Mac (OSX) $HOME/Library/Preferences/CurveExpert Professional Preferences
Linux $HOME/.CurveExpert Professional
19.3.3 Working/Cache Area
An area is reserved for various caches and items that are needed for normal application operation. This area is used
for the cache, logs, storage of graph themes, and storage of custom user models/functions.
Platform Working/Cache Area Location
Windows $HOME\.curveexpert
Mac (OSX) $HOME/.curveexpert
Linux $HOME/.curveexpert
19.3.4 CurveExpert Pro Data Files
The data les directory can be customized using Edit->Preferences->General, but the default locations are below.
This directory is also where the example data that ships with CurveExpert resides.
Platform Documents Location
Windows $MYDOCUMENTS\CurveExpert Professional
Mac (OSX) $HOME/Documents/CurveExpert Professional
Linux $HOME/Documents/CurveExpert Professional
19.3. Where les are located 133
CurveExpert Professional Documentation, Release 2.0.4
134 Chapter 19. Miscellaneous
CHAPTER
TWENTY
END USER LICENSE AGREEMENT
IMPORTANT READ CAREFULLY: This End-User License Agreement (EULA) is a legal agreement between
you (either an individual or single entity) and Mr. Daniel Hyams of 1698 Chadwick Court, Hixson, TN 37343(Mr.
Hyams) for the software product CurveExpert Professional, which will be designated by the term Software Prod-
uct. The Software Product consists computer software and accompanying electronic documentation. By installing,
copying, or otherwise using the Software Product, you agree to be bound by the terms of this EULA. If you do not
agree to the terms of this EULA, do not install or use the Software Product.
1. Grant of License. Mr. Hyams grants to you as an individual, a personal, nonexclusive license to make and use
copies of the Software Product. Copies must be made only for backup or archival purposes.
2. Shareware version. You are hereby granted a non-exclusive license to use the Software Product for an evalu-
ation period of 30 days, after which you must pay the registration fee to continue using the Software Product.
However, use of the Software Product during the 30-day evaluation period is free of charge. Unregistered use of
the Software Product after the 30-day evaluation period is in violation of Federal copyright laws and the terms
of this EULA. Violators will be prosecuted to the maximum extent under the law. You may make exact copies
and distribute the shareware version of the Software Product and its documentation so long as there is no charge
applied to distribution of these unmodied copies of the Software Product. You are specically prohibited from
charging or requesting donations for ANY and ALL copies of this Software Product or its documentation. You
are prohibited from distributing the Software Product or any portion of the Software Product or its documenta-
tion as part of another product (commercial or otherwise) without PRIOR expressed written consent from Mr.
Hyams.
3. Registered Version If you have registered the Software Product with Mr. Hyams (meaning to remit payment for
purchase of the software), the 30-day evaluation period in Section 2 is waived. Mr. Hyams agrees to provide you
with valid license key for the Software Product, copied onto media deemed suitable, within 30 days of receipt
of payment.
4. Reverse engineering. You may not reverse engineer, decompile, or disassemble the Software Product.
5. Upgrades. All subsequent versions of the software product fall under the terms of this EULA. Upgrades are
designated as software packages of the same name but with an incremented version number.
6. Copyright. All title and copyrights in and to the Software Product are owned by Mr. Hyams. The Software
Product is protected by copyright laws and international treaty provisions.
7. Warranty Disclaimer. The Software Product and the accompanying les are sold as is without warranty
of any kind. All warranties, either express or implied, including, but not limited to, implied warranties of
merchantability and tness for a particular purpose, are expressly and specically disclaimed.
8. Liability. Neither Mr. Hyams or anyone else who has been involved in the creation, production, or delivery
of this Software Product shall be liable for any direct, indirect, consequential, special, incidental, or similar
damages arising out of the use or inability to use such software even if Mr. Hyams has been advised of the
possibility of such damages or claims. In no event shall Mr. Hyamss liability for any damages ever exceed the
135
CurveExpert Professional Documentation, Release 2.0.4
price paid for the license to the Software Product, regardless of the form of the claim. The individual using the
Software Product bears all risk as to the quality and performance of the Software Product.
9. Governing Law. This agreement shall be governed by the laws of the State of Tennessee and shall inure to
the benet of Mr. Hyams, his heirs, successors, and assigns. Any action or proceeding brought by either
party against the other arising out of or relating to this agreement shall be brought only in a state or federal
court of competent jurisdiction located in Chattanooga, Tennessee. The parties hereby consent to in personam
jurisdiction of said courts.
136 Chapter 20. End User License Agreement
CHAPTER
TWENTYONE
THIRD-PARTY LICENSING
CurveExpert Professional owes its existence to several excellent open source packages. This section is in the docu-
mentation in order to comply with licensing requirements of these packages.
21.1 Python
PSF LICENSE AGREEMENT FOR PYTHON 2.6.6
1. This LICENSE AGREEMENT is between the Python Software Foundation (PSF), and the Individual or
Organization (Licensee) accessing and otherwise using Python 2.6.6 software in source or binary form and its
associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare deriva-
tive works, distribute, and otherwise use Python 2.6.6 alone or in any derivative version, provided, however,
that PSFs License Agreement and PSFs notice of copyright, i.e., Copyright 2001-2010 Python Software
Foundation; All Rights Reserved are retained in Python 2.6.6 alone or in any derivative version prepared by
Licensee.
3. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.6.6 or any part thereof,
and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to
include in any such work a brief summary of the changes made to Python 2.6.6.
4. PSF is making Python 2.6.6 available to Licensee on an AS IS basis. PSF MAKES NO REPRESENTA-
TIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION,
PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABIL-
ITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.6.6 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.6.6 FOR ANY
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING,
DISTRIBUTING, OR OTHERWISE USING PYTHON 2.6.6, OR ANY DERIVATIVE THEREOF, EVEN IF
ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint
venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks
or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python 2.6.6, Licensee agrees to be bound by the terms and conditions
of this License Agreement.
137
CurveExpert Professional Documentation, Release 2.0.4
21.2 WxWidgets and WxPython
21.2.1 Preamble
The licensing of the wxWidgets library is intended to protect the wxWidgets library, its developers, and its users, so
that the considerable investment it represents is not abused.
Under the terms of the wxWindows licence, you as a user are not obliged to distribute wxWidgets source code with
your products, if you distribute these products in binary form. However, you are prevented from restricting use of the
library in source code form, or denying others the rights to use or distribute wxWidgets library source code in the way
intended.
The wxWindows licence establishes the copyright for the code and related material, and it gives you legal permission
to copy, distribute and/or modify the library. It also asserts that no warranty is given by the authors for this or derived
code.
The core distribution of the wxWidgets library contains les under two dierent licences:
Most les are distributed under the GNU Library General Public Licence, version 2, with the special exception
that you may create and distribute object code versions built from the source code or modied versions of it
(even if these modied versions include code under a dierent licence), and distribute such binaries under your
own terms.
Most core wxWidgets manuals are made available under the wxWidgets Free Documentation Licence, which
allows you to distribute modied versions of the manuals, such as versions documenting any modications made
by you in your version of the library. However, you may not restrict any third party from reincorporating your
changes into the original manuals.
Other relevant les:
licence.txt: a statement that the wxWidgets library is covered by the GNU Library General Public Licence, with
an exception notice for binary distribution.
licendoc.txt: the wxWidgets Documentation Licence.
lgpl.txt: the text of the GNU Library General Public Licence.
gpl.txt: the text of the GNU General Public Licence, which is referenced by the LGPL.
21.2.2 wxWindows Library License, Version 3.1
Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al
Everyone is permitted to copy and distribute verbatim copies of this licence document, but changing it is
not allowed.
WXWINDOWS LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library
General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or
(at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Library General Public Licence for more details.
138 Chapter 21. Third-Party Licensing
CurveExpert Professional Documentation, Release 2.0.4
You should have received a copy of the GNU Library General Public Licence along with this software,
usually in a le named COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give permission for additional uses of the
text contained in this release of the library as licenced under the wxWindows Library Licence, applying
either version 3.1 of the Licence, or (at your option) any later version of the Licence as published by the
copyright holders of version 3.1 of the Licence document.
2. The exception is that you may use, copy, link, modify and distribute under your own terms, binary
object code versions of works based on the Library.
3. If you copy code from les distributed under the terms of the GNU General Public Licence or the GNU
Library General Public Licence into a copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as to the status of such modied
les, you must delete this exception notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modications of your own for this library, it is your choice whether to permit this exception
to apply to your modications. If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
21.3 Numpy
Copyright (c) 2005-2009, NumPy Developers. All rights reserved.
Redistribution and use in source and binary forms, with or without modication, are permitted provided that the
following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the fol-
lowing disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the NumPy Developers nor the names of any contributors may be used to endorse or
promote products derived from this software without specic prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, IN-
CIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, ORPROFITS; ORBUSI-
NESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CON-
TRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAM-
AGE.
21.4 Scipy
Copyright (c) 2001, 2002 Enthought, Inc. All rights reserved.
Copyright (c) 2003-2009 SciPy Developers. All rights reserved.
21.3. Numpy 139
CurveExpert Professional Documentation, Release 2.0.4
Redistribution and use in source and binary forms, with or without modication, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the follow-
ing disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the Enthought nor the names of its contributors may be used to endorse or promote products
derived from this software without specic prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCURE-
MENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTER-
RUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21.5 Matplotlib
Copyright (c) 2002-2007 John D. Hunter; All Rights Reserved
LICENSE AGREEMENT FOR MATPLOTLIB 0.91
1. This LICENSE AGREEMENT is between John D. Hunter (JDH), and the Individual or Organization (Licensee)
accessing and otherwise using matplotlib software in source or binary form and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, JDH hereby grants Licensee a nonexclusive, royalty-
free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, dis-
tribute, and otherwise use matplotlib 0.91 alone or in any derivative version, provided, however, that JDHs License
Agreement and JDHs notice of copyright, i.e., Copyright (c) 2002-2007 John D. Hunter; All Rights Reserved are
retained in matplotlib 0.91 alone or in any derivative version prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on or incorporates matplotlib 0.91 or any part thereof,
and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include
in any such work a brief summary of the changes made to matplotlib 0.91.
4. JDH is making matplotlib 0.91 available to Licensee on an AS IS basis. JDH MAKES NO REPRESENTATIONS
OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES
NOANDDISCLAIMS ANYREPRESENTATIONORWARRANTYOF MERCHANTABILITYORFITNESS FOR
ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.91 WILL NOT INFRINGE ANY THIRD
PARTY RIGHTS.
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB 0.91 FOR ANY
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DIS-
TRIBUTING, OR OTHERWISE USING MATPLOTLIB 0.91, OR ANY DERIVATIVE THEREOF, EVEN IF AD-
VISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint
venture between JDH and Licensee. This License Agreement does not grant permission to use JDH trademarks or
trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
140 Chapter 21. Third-Party Licensing
CurveExpert Professional Documentation, Release 2.0.4
8. By copying, installing or otherwise using matplotlib 0.91, Licensee agrees to be bound by the terms and conditions
of this License Agreement.
21.6 xlrd
CurveExpert Professional utilizes Excel reading capabilities from the xlrd library. This product includes software
developed by Roman V. Kiseliov <[email protected]>.
Portions copyright (C) 2007, Stephen John Machin, Lingfo Pty Ltd All rights reserved.
Redistribution and use in source and binary forms, with or without modication, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
3. None of the names of Stephen John Machin, Lingfo Pty Ltd and any contributors may be used to endorse or promote
products derived from this software without specic prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, IN-
CIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, ORPROFITS; ORBUSI-
NESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CON-
TRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAM-
AGE.
Copyright (C) 2005 Roman V. Kiseliov All rights reserved.
Redistribution and use in source and binary forms, with or without modication, are permitted provided
that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following
acknowledgment: This product includes software developed by
Roman V. Kiseliov <[email protected]>.
4. Redistributions of any form whatsoever must retain the following acknowledgment: This product
includes software developed by
Roman V. Kiseliov <[email protected]>.
THIS SOFTWARE IS PROVIDED BY Roman V. Kiseliov AS IS AND ANY EXPRESSED OR IM-
PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL Roman V. Kiseliov OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN-
DIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUD-
ING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
21.6. xlrd 141
CurveExpert Professional Documentation, Release 2.0.4
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN-
CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21.7 BioPython
CurveExpert Professional utilizes the Lowess algorithm originating from the Biopython package.
Biopython License Agreement
Permission to use, copy, modify, and distribute this software and its documentation with or without modications and
for any purpose and without fee is hereby granted, provided that any copyright notices appear in all copies and that
both those copyright notices and this permission notice appear in supporting documentation, and that the names of
the contributors or copyright holders not be used in advertising or publicity pertaining to distribution of the software
without specic prior permission.
THE CONTRIBUTORS AND COPYRIGHT HOLDERS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULT-
ING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
MANCE OF THIS SOFTWARE.
21.8 winpaths
CurveExpert Professional utilizes a single function from winpaths in order to nd the My Documents directory
under Windows. The required MIT license follows:
The MIT License
Copyright (c) 2010
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen-
tation les (the Software), to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PAR-
TICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT-
WARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21.9 Python Imaging Library (PIL)
The Python Imaging Library (PIL) is
142 Chapter 21. Third-Party Licensing
CurveExpert Professional Documentation, Release 2.0.4
Copyright 1997-2011 by Secret Labs AB Copyright 1995-2011 by Fredrik Lundh
By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read,
understood, and will comply with the following terms and conditions:
Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and
without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copy-
right notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or
the author not be used in advertising or publicity pertaining to distribution of the software without specic, written
prior permission.
SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFT-
WARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUEN-
TIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROF-
ITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21.10 Icons and Artwork
Some icons are attributed to http://www.fatcow.com/free-icons/. Also, Tango icons http://tango.freedesktop.org/ are
used in this project.
21.11 JPEG library
This software is based in part on the work of the Independent JPEG Group.
21.12 prettyPhoto
The CurveExpert Professional web site at http://www.curveexpert.net and the CurveExpert Professional documenta-
tion both make use of prettyPhoto (version 3.0.1), a lightbox clone for jQuery. The author of this package is Stephane
Caron at http://www.no-margin-for-errors.com. This package is available for use under the Creative Commons license,
which can be viewed at http://creativecommons.org/licenses/by/2.5/.
21.10. Icons and Artwork 143
CurveExpert Professional Documentation, Release 2.0.4
144 Chapter 21. Third-Party Licensing
CHAPTER
TWENTYTWO
APPENDIX A: MATH FUNCTIONS
This section documents the math functions that are available for use in CurveExpert Professional custom models,
functions, and data transformations.
All functions below, unless otherwise stated, work on either scalars (a single number) or an array (a vector). If an array
is passed to any of these functions, the function is applied elementwise to each member of the array.
22.1 Constants
22.1.1 pi
The mathematical constant 3.14159....
22.1.2 exp1
The mathematical constant 2.71828.....
22.2 Transcendental Functions
22.2.1 acos(x)
Trigonometric inverse cosine. The inverse of cos so that, if y = cos(x), then x = acos(y). The domain is [-1, 1].
acos is a multivalued function: for each x there are innitely many numbers z such that cos(z) = x. The convention is
to return the angle z whose real part lies in [0, pi].
The inverse cos is also known as arccos or cos^-1.
22.2.2 acosh(x)
Inverse hyperbolic cosine.
acosh is a multivalued function: for each x there are innitely many numbers z such that cosh(z) = x. The convention
is to return the z whose imaginary part lies in [-pi, pi] and the real part in [0, inf].
145
CurveExpert Professional Documentation, Release 2.0.4
22.2.3 asin(x)
Inverse sine. The inverse sine of each element in x, in radians and in the closed interval [-pi/2, pi/2].
arcsin is a multivalued function: for each x there are innitely many numbers z such that sin(z) = x. The convention
is to return the angle z whose real part lies in [-pi/2, pi/2].
The inverse sine is also known as arcsin or sin^{-1}.
22.2.4 asinh(x)
Inverse hyperbolic sine.
arcsinh is a multivalued function: for each x there are innitely many numbers z such that sinh(z) = x. The convention
is to return the z whose imaginary part lies in [-pi/2, pi/2].
The inverse hyperbolic sine is also known as arcsinh or sinh^-1.
22.2.5 atan(x)
Trigonometric inverse tangent. The inverse of tan, so that if y = tan(x) then x = atan(y).
atan is a multi-valued function: for each x there are innitely many numbers z such that tan(z) = x. The convention is
to return the angle z whose real part lies in [-pi/2, pi/2].
The inverse tangent is also known as arctan or tan^{-1}.
22.2.6 atan2(y,x)
Arc tangent of y/x choosing the quadrant correctly.
The quadrant (i.e., branch) is chosen so that arctan2(y, x) is the signed angle in radians between the ray ending
at the origin and passing through the point (1,0), and the ray ending at the origin and passing through the point (x2,
x1). By IEEE convention, this function is dened for x = +/-0 and for either or both of y and x = +/-inf (see Notes for
specic values).
Returns angle in radians, in the range [-pi, pi].
22.2.7 atanh(x)
Inverse hyperbolic tangent.
arctanh is a multivalued function: for each x there are innitely many numbers z such that tanh(z) = x. The convention
is to return the z whose imaginary part lies in [-pi/2, pi/2].
The inverse hyperbolic tangent is also known as arctanh or tanh^-1.
22.2.8 cos(x)
Trigonometric cosine.
22.2.9 cosh(x)
Hyperbolic cosine. Equivalent to 1/2 * (exp(x) + exp(-x)).
146 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.2.10 erf(x)
Error function of x dened as
erf(x) =
2

_
x
0
e
t
2
dt
22.2.11 erfc(x)
Returns
erfc(x) = 1 erf(x) =
2

_

x
e
t
2
dt
22.2.12 exp(x)
Calculate the exponential.
The irrational number e is also known as Eulers number. It is approximately 2.718281, and is the base of the natural
logarithm, ln (this means that, if x = ln y = log
e
y, then e
x
= y. For real input, exp(x) is always positive.
22.2.13 ln(x)
Natural logarithm (synonym for log). The natural logarithm ln is the inverse of the exponential function, so that
ln(exp(x)) = x. The natural logarithm is logarithm in base e.
22.2.14 log(x)
Natural logarithm. The natural logarithm log is the inverse of the exponential function, so that log(exp(x)) = x. The
natural logarithm is logarithm in base e.
22.2.15 log10(x)
Return the base 10 logarithm. NaNs is returned if x is negative.
22.2.16 sin(x)
Trigonometric sine.
22.2.17 sinh(x)
Hyperbolic sine, element-wise. Equivalent to 1/2 * (exp(x) - exp(-x)).
22.2.18 sqrt(x)
Return the positive square-root. Returns NaN if x is negative.
22.2. Transcendental Functions 147
CurveExpert Professional Documentation, Release 2.0.4
22.2.19 tan(x)
Compute tangent. Equivalent to sin(x)/cos(x).
22.2.20 tanh(x)
Compute hyperbolic tangent. Equivalent to sinh(x)/cosh(x).
22.3 Bessel Functions
22.3.1 bessel_j0(x)
The Bessel function of order 0 at x.
22.3.2 bessel_j1(x)
The Bessel function of order 1 at x.
22.3.3 bessel_jn(n,x)
Bessel function of integer or real order n.
22.3.4 bessel_y0(x)
The Bessel function of the second kind of order 0 at x.
22.3.5 bessel_y1(x)
The Bessel function of the second kind of order 1 at x.
22.3.6 bessel_yn(n,x)
Bessel function of the second kind of integer or real order n at x.
22.3.7 bessel_i0(x)
Modied Bessel function of the rst kind, order 0.
22.3.8 bessel_i1(x)
Modied Bessel function of order 1 at x.
148 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.3.9 bessel_k0(x)
Modied Bessel function of the second kind (sometimes called the third kind) of order 0 at x.
22.3.10 bessel_k1(x)
Modied Bessel function of the second kind (sometimes called the third kind) of order 1 at x.
22.3.11 bessel_kn(n,x)
Modied Bessel function of the second kind (sometimes called the third kind) for integer or real order n at x.
22.3.12 bessel_i0e(x)
Exponentially scaled modied Bessel function of order 0 at x. bessel_i0e(x) = exp(-|x|) * bessel_i0(x).
22.3.13 bessel_i1e(x)
Exponentially scaled modied Bessel function of order 0 at x. bessel_i1e(x) = exp(-|x|) * bessel_i1(x).
22.3.14 bessel_k0e(x)
Exponentially scaled modied Bessel function of the second kind (sometimes called the third kind) of order 0 at x.
bessel_k0e(x) = exp(x) * bessel_k0(x).
22.3.15 bessel_k1e(x)
Exponentially scaled modied Bessel function of the second kind (sometimes called the third kind) of order 1 at x.
bessel_k1e(x) = exp(x) * bessel_k1(x).
22.3.16 bessel_jvp(n,x,i)
Return the ith derivative of bessel_jn(n,x).
22.3.17 bessel_yvp(n,x,i)
Return the nth derivative of bessel_yn(n,x).
22.3.18 bessel_kvp(n,x,i)
Return the nth derivative of bessel_kn(n,x).
22.3.19 bessel_ivp(n,x,i)
Return the nth derivative of bessel_in(n,x).
22.3. Bessel Functions 149
CurveExpert Professional Documentation, Release 2.0.4
22.4 Comparison Functions
22.4.1 maximum(a,b)
Element-wise maximum of array elements; compares two arrays and returns a new array containing the elementwise
maxima. If one of the elements is a NaN, that element is returned.
22.4.2 minimum(a,b)
Element-wise minimum of array elements; compares two arrays and returns a new array containing the elementwise
minima. If one of the elements is a NaN, that element is returned.
22.4.3 max(array)
Return the maximum of an array (returns a scalar). Optionally, the keyword axis can be given to specify, for a 2D
dataset, if the max should be taken down the columns (axis=0) or across the rows(axis=1).
22.4.4 min(array)
Return the minimum of an array (returns a scalar). Optionally, the keyword axis can be given to specify, for a 2D
dataset, if the min should be taken down the columns (axis=0) or across the rows(axis=1).
22.5 Miscellaneous Functions
22.5.1 abs(x)
Calculate the absolute value.
22.5.2 ceil(x)
Returns the ceiling of the input. The ceil of the scalar x is the smallest integer i, such that i >= x.
22.5.3 copysign(x1,x2)
Change the sign of x1 to that of x2.
22.5.4 degrees(x)
Convert angles from radians to degrees.
22.5.5 factorial(n)
Take the factorial of an integer n.
150 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.5.6 oor(x)
Return the oor of the input. The oor of the scalar x is the largest integer i, such that i <= x.
Some spreadsheet programs calculate the oor-towards-zero, in other words floor(-2.5) == -2. Here, however,
we use the a denition of oor such that oor(-2.5) == -3.
22.5.7 fmod(x1,x2)
Return the remainder of division. Returns the remainder of the division of x1 by x2.
The result of the modulo operation for negative dividend and divisors is bound by conventions. In fmod, the sign of
the remainder is the sign of the dividend. In remainder, the sign of the divisor does not aect the sign of the result.
22.5.8 hypot(x1,x2)
Given the legs of a right triangle, return its hypotenuse. Equivalent to sqrt(x1**2 + x2**2).
22.5.9 isinf(x)
Test for positive or negative innity.
22.5.10 isnan(x)
Test for Not a Number (NaN).
22.5.11 legendre(n,x)
Legendre function of order n evaluated at x. Orthogonal over [1,1] with weighting function 1.
22.5.12 lstsq_solve(A,B)
Solve a least squares problem, where A is a rectangular matrix. Returns a tuple of four quantities: x (the least squares
solution), residuals (array ncol long), rank (integer indicating the eective rank of A), and s (the singular values of a).
Common usage is as follows:
(soln,resid,rank,s) = solve_lstsq(A,B)
Can throw an exception if the computation is too ill-conditioned.
22.5.13 sh_legendre(n,x)
Shifted Legendre function of order n evaluated at x. Orthogonal over [0,1] with weighting function 1.
22.5.14 radians(x)
Convert angles from degrees to radians.
22.5. Miscellaneous Functions 151
CurveExpert Professional Documentation, Release 2.0.4
22.5.15 round(a,number_of_decimals)
Round an array to a given number of decimals. number_of_decimals is an integer denoting the number of decimal
places to retain.
22.5.16 special_beta(p,q)
Returns
(p, q) = (p)(q){(p + q)
22.5.17 special_lambda(nu,x)
Returns

(x) =
J

(x)
_
1
2
x
_

The Bessel function used here is the same as special_jn(n,x).


22.5.18 special_gamma(x)
Gamma function. The gamma function is often referred to as the generalized factorial since x*gamma(x) =
gamma(x+1) and gamma(n+1) = n! for natural number n.
Note that the domain is limited to [1.0e-6,10].
22.5.19 trunc(x)
Return the truncated value of the input. The truncated value of the scalar x is the nearest integer i which is closer to
zero than x is. In short, the fractional part of the signed number x is discarded.
22.6 Array Specic Functions
22.6.1 append(array)
Append values to the end of an array.
22.6.2 array(object)
Create an array from an array_like object, like a Python list or another array.
22.6.3 asarray(object)
Convert the input to an array. a is an array_like object, like a Python list.
152 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.6.4 arange(start,stop,step)
Return evenly spaced values within a given interval.
Values are generated within the half-open interval [start, stop) (in other words, the interval including start but
excluding stop).
22.6.5 average(a)
Compute the arithmetic average (identical to the mean) of an array (returns a scalar). Optionally, the keyword axis
can be given to specify, for a 2D dataset, if the average should be taken down the columns (axis=0) or across the
rows(axis=1).
x =
_
n
i=1
x
i
n
22.6.6 column_stack((a,b,c,d,...))
Stack 1D arrays as columns into a 2D array.
22.6.7 copy(object)
Return an array copy of the given object.
22.6.8 concatenate((a1,a2,a3,...))
Join a sequence of arrays together.
22.6.9 dot(a,b)
Dot product of two arrays a and b (returns a scalar)
22.6.10 empty(shape)
Return a new array of given shape, without initializing entries. If the new array should be one dimensional, just an
integer will suce for the shape. If the new array should be multidimensional, then my_array = empty((n,3)) is an
appropriate example.
22.6.11 eye(n)
Return a 2-D array with ones on the diagonal and zeros elsewhere.
22.6.12 iplr(a)
Flip (reverse) an array in the left/right direction (columnwise).
22.6. Array Specic Functions 153
CurveExpert Professional Documentation, Release 2.0.4
22.6.13 ipud(a)
Flip (reverse) an array in the up/down direction (rowwise).
22.6.14 hstack((a,b,c,d,....))
Stack arrays in sequence horizontally (columnwise)
22.6.15 identity(n)
Return the identity array. The identity array is a square array with ones on the main diagonal.
22.6.16 linspace(start,stop,n)
Return evenly spaced numbers over a specied interval.
Returns n evenly spaced samples, calculated over the interval [start, stop ].
22.6.17 mean(a)
Compute the arithmetic mean (identical to the average) of an array (returns a scalar). Optionally, the keyword axis
can be given to specify, for a 2D dataset, if the mean should be taken down the columns (axis=0) or across the
rows(axis=1).
x =
_
n
i=1
x
i
n
22.6.18 median(a)
Compute the median of an array along the specied column. Returns the median of the array elements. Optionally,
the keyword axis can be given to specify, for a 2D dataset, if the median should be taken down the columns (axis=0)
or across the rows(axis=1).
Given a vector V of length N, the median of V is the middle value of a sorted copy of V, V_sorted - i.e.,
V_sorted[(N-1)/2], when N is odd. When N is even, it is the average of the two middle values of V_sorted.
22.6.19 nonzero(a)
Returns as an integer array, the indices of the elements are are nonzero. This can be used for indexing into another
array.
22.6.20 ones(shape)
Return a new array of given shape, lled with ones. For example, my_array = ones(n) If the new array should be one
dimensional, just an integer will suce for the shape. If the new array should be multidimensional, then my_array =
ones((n,3)) is an appropriate example.
154 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.6.21 ones_like(a)
Returns an array of ones with the same dimension as the given array.
22.6.22 roll(a)
Roll array elements rowwise; rows that roll beyond the last position are reintroduced at the rst.
22.6.23 rand(nrow,ncol)
Returns an array of the given dimension (nrow x ncol) and ll it with random samples from a uniform distribution over
[0,1).
22.6.24 sort(a)
Return an ascending sorted copy of the array.
22.6.25 standarddev(a)
Return the standard deviation of an array. Optionally, the keyword axis can be given to specify, for a 2D dataset, if
the standard deviation should be taken down the columns (axis=0) or across the rows(axis=1). Also optionally, the
keyword ddof can be given to determine the divisor used in the calculations. By default, ddof is 1.
=

_
1
n DOF
n

i=1
(x
i
x)
2
22.6.26 unique(a)
Find the unique elements of an array; returns the sorted unique elements of an array. Works on only 1D arrays; the
array will be attened if it is not already 1D.
22.6.27 variance(a)
Return the variance of the array. Optionally, the keyword axis can be given to specify, for a 2D dataset, if the variance
should be taken down the columns (axis=0) or across the rows(axis=1).
22.6.28 vstack((a,b,c,d,....))
Stack arrays in sequence vertically (rowwise).
22.6.29 zeros(shape)
Return a new array of given shape, lled with zeros. For example, my_array = zeros(n). If the new array should be
one dimensional, just an integer will suce for the shape. If the new array should be multidimensional, then my_array
= zeros((n,3)) is an appropriate example.
22.6. Array Specic Functions 155
CurveExpert Professional Documentation, Release 2.0.4
22.6.30 zeros_like(other_array)
Return an array of zeros with the same dimension as a given array. For example, my_array = zeros_like(x)
22.7 Logical Functions
22.7.1 array_and(b1,b2)
Applies the logical and operator, elementwise, to two boolean arrays b1 and b2. Returns another boolean array.
22.7.2 array_or(b1,b2)
Applies the logical or operator, elementwise, to two boolean arrays b1 and b2. Returns another boolean array.
22.7.3 array_xor(b1,b2)
Applies the logical xor operator, elementwise, to two boolean arrays b1 and b2. Returns another boolean array.
22.7.4 array_not(b1)
Applies the logical not operator, elementwise, to a boolean array b1. Returns another boolean array.
22.7.5 array_gt(x1,x2)
Returns a boolean array that tests x1 > x2 elementwise.
22.7.6 array_lt(x1,x2)
Returns a boolean array that tests x1 < x2 elementwise.
22.7.7 array_le(x1,x2)
Returns a boolean array that tests x1 <= x2 elementwise.
22.7.8 array_ge(x1,x2)
Returns a boolean array that tests x1 >= x2 elementwise.
22.7.9 array_eq(x1,x2)
Returns a boolean array that tests x1 == x2 elementwise.
156 Chapter 22. Appendix A: Math Functions
CurveExpert Professional Documentation, Release 2.0.4
22.7.10 array_neq(x1,x2)
Returns a boolean array that tests x1 != x2 elementwise.
22.7.11 array_almost_eq(x1,x2, rtol, atol)
Tests two arrays x1 and x2, elementwise, to see if they are nearly equal within the tolerances specied in rtol and
atol. Returns a boolean array. rtol is a relative tolerance, and atol is an absolute tolerance. To determine closeness,
the relative dierence rtol*abs(b) and the absolute dierence atol are added together to compare against the absolute
dierence between the elements of a and b.
22.7. Logical Functions 157
CurveExpert Professional Documentation, Release 2.0.4
158 Chapter 22. Appendix A: Math Functions
CHAPTER
TWENTYTHREE
APPENDIX B: MATH SYMBOL
REFERENCE
23.1 Subscripts and superscripts
Command Result
$alpha_i > beta_i$
i
>
i
$alpha^2 > beta_i^a$
2
>
a
i
23.2 Fractions, binomials and stacked numbers
$\frac{3}{4}$
3
4
$\binom{3}{4}$
_
3
4
_
$\stackrel{3}{4}$
3
4
$\frac{5 - \frac{1}{x}}{4}$
5
1
x
4
159
CurveExpert Professional Documentation, Release 2.0.4
23.3 Using parenthesis properly
$(\frac{5 - \frac{1}{x}}{4})$
(
5
1
x
4
)
Notice how the parenthesis do not properly wrap the object inside. To address this, use the \left and \right qualiers in
front of your parenthesis.
$\left(\frac{5 - \frac{1}{x}}{4}\right)$
_

_
5
1
x
4
_

_
23.4 Radicals
$\sqrt{2}$

2
$\sqrt[3]{x}$
3

x
23.5 Accents
Command Result
\acute a or \a a
\bar a a
\breve a a
\ddot a or \"a a
\dot a or \.a a
\grave a or \a ` a
\hat a or \^a a
\tilde a or \~a a
\vec a a
\widehat{xyz} xyz
\widetilde{xyz} xyz
160 Chapter 23. Appendix B: Math Symbol Reference
CurveExpert Professional Documentation, Release 2.0.4
23.6 Symbols
Lower-case Greek
\alpha \beta \chi \delta | \digamma
t \epsilon \eta \gamma \iota \kappa
\lambda \mu \nu \omega \phi
\pi \psi \rho \sigma \tau
\theta \upsilon \varepsilon \varkappa \varphi
c \varpi \varrho \varsigma \vartheta \xi
\zeta
Upper-case Greek
\Delta \Gamma \Lambda \Omega \Phi \Pi
\Psi \Sigma \Theta \Upsilon \Xi U \mho
\nabla
Hebrew
\aleph 2 \beth \daleth \gimel
Delimiters
{ / [ [ \Downarrow \Uparrow j \Vert \ \backslash
\downarrow ( \langle \lceil [ \lfloor c \llcorner . \lrcorner
) \rangle \rceil | \rfloor \ulcorner \uparrow \urcorner
\vert \{ j \| \} ] ] |
Big symbols
_
\bigcap
_
\bigcup
_
\bigodot

\bigoplus

\bigotimes
_
\biguplus
_
\bigvee
_
\bigwedge

\coprod
_
\int
_
\oint

\prod
_
\sum
Standard function names
Pr \Pr arccos \arccos arcsin \arcsin arctan \arctan
arg \arg cos \cos cosh \cosh cot \cot
coth \coth csc \csc deg \deg det \det
dim \dim exp \exp gcd \gcd hom \hom
inf \inf ker \ker lg \lg lim \lim
liminf \liminf limsup \limsup ln \ln log \log
max \max min \min sec \sec sin \sin
sinh \sinh sup \sup tan \tan tanh \tanh
Binary operation and relation symbols
23.6. Symbols 161
CurveExpert Professional Documentation, Release 2.0.4
= \Bumpeq n \Cap U \Cup
= \Doteq ~ \Join c \Subset
= \Supset \Vdash + \Vvdash
\approx > \approxeq \ast
~ \asymp 5 \backepsilon ~ \backsim
= \backsimeq \barwedge \because
( \between _\bigcirc V \bigtriangledown
. \bigtriangleup \blacktriangleleft > \blacktriangleright
\bot -< \bowtie c \boxdot
= \boxminus + \boxplus \boxtimes
\bullet = \bumpeq \cap
\cdot \circ = \circeq
:\coloneq \cong \cup
< \curlyeqprec > \curlyeqsucc \curlyvee
. \curlywedge \dag - \dashv
\ddag \diamond \div
\divideontimes = \doteq = \doteqdot
+ \dotplus 7 \doublebarwedge = \eqcirc
\eqcolon \eqsim > \eqslantgtr
< \eqslantless \equiv = \fallingdotseq
\frown \geq _ \geqq
> \geqslant >\gg \ggg
_ \gnapprox _ \gneqq \gnsim
_ \gtrapprox > \gtrdot \gtreqless
\gtreqqless \gtrless \gtrsim
\in \intercal \leftthreetimes
\leq _ \leqq < \leqslant
_ \lessapprox < \lessdot \lesseqgtr
\lesseqqgtr \lessgtr \lesssim
<\ll \lll _ \lnapprox
_ \lneqq \lnsim - \ltimes
\mid = \models \mp
= \nVDash r \nVdash ~ \napprox
\ncong = \ne = \neq
= \neq \nequiv \ngeq
\ngtr \ni \nleq
\nless ] \nmid \notin
\nparallel \nprec ~ \nsim
c \nsubset \nsubseteq > \nsucc
, \nsupset \nsupseteq < \ntriangleleft
162 Chapter 23. Appendix B: Math Symbol Reference
CurveExpert Professional Documentation, Release 2.0.4
\ntrianglelefteq > \ntriangleright g \ntrianglerighteq
r \nvDash - \nvdash , \odot
, \ominus \oplus , \oslash
\otimes j \parallel \perp
\pitchfork \pm \prec
_ \precapprox < \preccurlyeq \preceq
_ \precnapprox \precnsim \precsim
\propto \rightthreetimes = \risingdotseq
\rtimes \sim = \simeq
{ \slash \smile \sqcap
| \sqcup c \sqsubset c \sqsubset
\sqsubseteq . \sqsupset . \sqsupset
\sqsupseteq - \star \subset
\subseteq _ \subseteqq \subsetneq
_ \subsetneqq > \succ _ \succapprox
> \succcurlyeq \succeq _ \succnapprox
\succnsim \succsim \supset
\supseteq _ \supseteqq \supsetneq
_ \supsetneqq \therefore \times
\top < \triangleleft \trianglelefteq
= \triangleq - \triangleright \trianglerighteq
\uplus | \vDash \varpropto
< \vartriangleleft > \vartriangleright - \vdash
\vee \ \veebar \wedge
\wr
Arrow symbols
\Downarrow \Leftarrow
\Leftrightarrow \Lleftarrow
= \Longleftarrow \Longleftrightarrow
=\Longrightarrow \Lsh
\Nearrow \Nwarrow
\Rightarrow \Rrightarrow
r \Rsh _\Searrow
\Swarrow \Uparrow
\Updownarrow \circlearrowleft
\circlearrowright .\curvearrowleft
r\curvearrowright -\dashleftarrow
\dashrightarrow \downarrow
\downdownarrows \downharpoonleft
\downharpoonright \hookleftarrow
\hookrightarrow \leadsto
\leftarrow \leftarrowtail
\leftharpoondown \leftharpoonup
\leftleftarrows \leftrightarrow
;\leftrightarrows =\leftrightharpoons
~\leftrightsquigarrow ~\leftsquigarrow
23.6. Symbols 163
CurveExpert Professional Documentation, Release 2.0.4
\longleftarrow \longleftrightarrow
\longmapsto \longrightarrow
\looparrowleft +\looparrowright
\mapsto \multimap
=\nLeftarrow =\nLeftrightarrow
=\nRightarrow ,\nearrow
\nleftarrow \nleftrightarrow
\nrightarrow \nwarrow
\rightarrow \rightarrowtail
\rightharpoondown \rightharpoonup
,\rightleftarrows ,\rightleftarrows
=\rightleftharpoons =\rightleftharpoons
\rightrightarrows \rightrightarrows
~\rightsquigarrow \searrow
\swarrow \to
\twoheadleftarrow \twoheadrightarrow
\uparrow \updownarrow
\updownarrow \upharpoonleft
\upharpoonright |\upuparrows
Miscellaneous symbols
$ \$ \AA + \Finv
\Game 0 \Im | \P
T\Re \S \angle
\backprime +\bigstar \blacksquare
& \blacktriangle * \blacktriangledown \cdots
. \checkmark _\circledR _\circledS
\clubsuit [ \complement \copyright
.
.
. \ddots \diamondsuit \ell
\emptyset \eth \exists
| \flat \forall h \hbar
\heartsuit h \hslash

\iiint

\iint

\iint \imath
\infty j \jmath . . . \ldots
. \measuredangle \natural \neg
\nexists

\oiiint \partial
\prime \sharp \spadesuit
\sphericalangle \ss v \triangledown
\varnothing s \vartriangle
.
.
. \vdots
\wp \yen
164 Chapter 23. Appendix B: Math Symbol Reference
CHAPTER
TWENTYFOUR
APPENDIX C: THEORY
24.1 Linear Regression
Models which consist of a linear combination of a particular set of functions X
k
are called linear models, and linear
regression can be used to minimize the dierence between the model and data. The general form of this kind of model
is
y(x) =

a
k
X
k
(x)
where X
k
(x) are xed functions of x that are called the basis functions, and a
k
are the free parameters. Note that linear
refers only to dependence of the model on the parameters a
k
; the functions X
k
(x) may be nonlinear. Minimization of
the above linear model is performed with respect to the merit function
S (a) =
n

i=1
_

_
y
i

np

k=1
a
k
X
k
(x
i
)
_

_
2
The minimum of the above equation occurs where the derivative of S with respect to the parameters disappears.
Substituting the linear model into this function, taking the rst derivative, and setting this equal to zero gives the
normal equations that can be solved directly for the parameters a
k
.
24.2 Nonlinear Regression
24.2.1 Introduction
This program uses the Levenberg-Marquardt method to solve nonlinear regressions. This method combines the
steepest-descent method and a Taylor series based method to obtain a fast, reliable technique for nonlinear opti-
mization. This statement will be repeated later, but can bear stating at the beginning of this discussion: neither of
the above optimization methods are ideal all of the time; the steepest descent method works best far away from the
minimum, and the Taylor series method works best close to the minimum. The Levenberg-Marquardt (LM) algorithm
allows for a smooth transition between these two methods as the iteration proceeds.
24.2.2 Development
In general, the data modeling equation (with any number of independent variables) can be written as follows:
y = y(x; a)
The above expression simply states that the dependent variable y can be expressed as a function of the independent
variables x and vector of parameters a of arbitrary length. Note that using the ML method, any nonlinear equation
165
CurveExpert Professional Documentation, Release 2.0.4
with an arbitrary number of parameters can be used as the data modeling equation. Then, the merit function we are
trying to minimize is

2
(a) =
n

i=1
_
y
i
y(x
i
; a)

i
_
2
where N is the number of data points, x
i
denotes the x data points, y
i
denotes the y data points,
i
is the standard
deviation (uncertainty) at point i, and y(x
i
; a) is an arbitrary nonlinear model evaluated at the ith data point. This merit
function simply measures the agreement between the data points and the parametric model; a smaller value for the
merit function denotes better agreement. Commonly, this merit function is called the chi-square.
Now, we will take a step back to provide a framework of optimization methods. From the area of pure optimization,
which will not be explained here, two basic ways of nding a function minimum are a Taylor series based method and
the steepest-descent method. The Taylor series method states that suciently close to the minimum, the function can
be approximated as a quadratic. Without detailed explanation of that method, a step from the current parameters a to
the best parameters amin can be written as
a
min
= a
cur
+ H
1
_

2
(a
cur
)
_
where H is the Hessian matrix (a matrix of second derivatives). If the approximation of the function as a quadratic is a
poor one, then we might instead use the steepest-descent method, where a step to the best parameters from the current
parameters is
a
min
= a
cur
c
2
(a
cur
)
This equation simply states that the next guess for the parameters is a step down the gradient of the merit function.
The constant c is forced to be small enough that a small step is taken and the gradient is accurate in the region that the
step is taken.
Since we know the chi-square function, we can directly dierentiate to obtain the gradient vector and the Hessian
matrix. Taking the partial derivatives of the merit function with respect to a gives

2
a
k
= 2
n

i=1
y
i
y(x
i
; a)

2
i
y(x
i
; a)
a
k
To obtain the Hessian matrix, take the gradient of the gradient above (so that we have a matrix of partial second
derivatives):

2
a
k
a
l
= 2
n

i=1
_

_
1

2
i
y(x
i
; a)
a
k
y(x
i
; a)
a
l

y
i
y(x
i
; a)

2
i

2
y(x
i
; a)
a
l
a
k
_

_
Now, for convenience, dene the gradient vector and the curvature matrix as
G
k
=
1
2

2
a
k
=
n

i=1
_

_
y
i
y(x
i
; a)

2
i
y(x
i
; a)
a
k
_

_
C
kl
=

2
a
k
a
l
=
n

i=1
_

_
1

2
i
y(x
i
; a)
a
k
y(x
i
; a)
a
l
_

_
[Note that the second derivative term in C will be ignored because of two reasons: it tends to be small because it is
multiplied by (y y
i
), and it tends to destabilize the algorithm for badly tting models or data sets contaminated with
outliers. This action in no way aects the minimum found by the algorithm; it only aects the route in getting there.]
So, the Taylor series method (inverse Hessian method) can be written as the following set of linear equations:
np

k=1
C
kl
a
l
= G
k
[1]
166 Chapter 24. Appendix C: Theory
CurveExpert Professional Documentation, Release 2.0.4
where NP is the number of parameters in the model that is being optimized. This linear matrix will be our workhorse
for this method after some modication; it can be solved for the increments da that, when added to the current approx-
imation for the parameters, gives the next approximation. Likewise, we can substitute our convenient denitions
into the steepest descent formula to obtain
a
l
= cG
l
[2]
Neither of the aforementioned optimization methods are ideal all of the time; the steepest descent method works best
far away fromthe minimum, and the Taylor series method works best close to the minimum. The Levenberg-Marquardt
(LM) algorithm allows for a smooth transition between these two methods as the iteration proceeds.
The rst issue in deriving the LM method is to attach some sort of scale to the constant c in the steepest-gradient
method (equation 2). Typically, there is no obvious way to determine this number, even within an order of magnitude.
However, in this case, we have access to the Hessian matrix; examining its members, we see that the scale on this
constant must be 1{C
ll
. But, that still may be too large, so lets divide that scale by a nondimensional factor (l) and
plan on setting this much larger than one so that the step will be reduced (for safety and stability).
The second issue to formulate the LM method is noting that the steepest-descent and Taylor series methods may be
combined if we dene a new matrix Mij by the following:
M
ii
= C
ii
(1 + ), i = j
M
i j
= C
i j
, i = j
This matrix combines equations [1] and [2] into a convenient and compact form. So nally, we have a means of
calculating the step da in the parameters by the following system of linear equations:
np

k=1
M
kl
a
l
= G
k
[3]
Note that when l is large, the matrix M is forced to be diagonally dominant; consequently, the above equation is
equivalent to the steepest descent method (equation 2). Conversely, when the parameter l goes to zero, the above
equation is equivalent to the Taylor series method (equation 1). So, we vary l to switch between the two methods,
continually calculating a parameter correction da that we apply to our most recent guess for the parameter vector.
24.2.3 Procedure
The steps that are taken in the LM algorithm are as follows:
1. Compute
2
(a)
2. Pick a conservative value for (0.001 in CurveExpert Professional)
3. Solve the linear equations (equation 3) for a
4. Evaluate
2
(a + a)
5. If
2
(a + a) >=
2
(a), increase by a factor (10 in CurveExpert Professional) and go back to step [3].
6. If
2
(a + a) <
2
(a), decrease by a factor (10 in CurveExpert Professional), correct the parameter vector by
a = a + a, and go back to step [3].
Iteration is stopped when
2
(a + a)
2
(a) < t. This tolerance t is the value specied by the user.
24.2. Nonlinear Regression 167
CurveExpert Professional Documentation, Release 2.0.4
168 Chapter 24. Appendix C: Theory
CHAPTER
TWENTYFIVE
APPENDIX D: REFERENCES
1. Bevington, Philip R., Data Reduction and Error Analysis for the Physical Sciences, 1969, McGraw-Hill, Inc.,
Library of Congress QA278. B48.
2. Cleveland, William S.: Robust locally weighted regression and smoothing scatterplots, Journal of the Ameri-
can Statistical Association, December 1979, volume 74, number 368, pp. 829-836.
3. Cleveland, William S., and Devlin, Susan J.: Locally weighted regression: An approach to regression analysis
by local tting, Journal of the American Statistical Association, September 1988, volume 83, number 403, pp.
596-610.
4. Daniel and Wood, Fitting Equations to Data, 1971. Wiley & Sons, New York. Library of Congress QA297.D35.
5. Neter, Wasserman, and Kutner, Applied Linear Regression Models, 2nd ed. 1989, Irwin Press, Boston, MA.
Library of Congress QA278.2 .N46.
6. Press, Flannery, Teukolsky, and Vetterling, Numerical Recipes in Pascal, 1989. Cambridge University Press,
New York. Library of Congress QA76.73 .P2N87. Seber and Wild, Nonlinear Regression, 1989. Wiley & Sons,
New York. Library of Congress QA278.2 .S425.
7. Ratkowsky, David A., Handbook of Nonlinear Regression Models. 1990. Marcel Dekker, Inc., New York.
Library of Congress QA278.2 .R369.
8. Ratkowsky, David A., Nonlinear Regression Modeling: A Unied Practical Approach. 1983. Marcel Dekker,
Inc., New York. Library of Congress QA278.2 .R37.
169
CurveExpert Professional Documentation, Release 2.0.4
170 Chapter 25. Appendix D: References
CHAPTER
TWENTYSIX
APPENDIX E: PLUGIN API
26.1 Basic API
api.MainWin()
Returns a handle to the main window. Can be useful if using graphical widgets from the plugin.
Return type wx.Window
api.calculate_function(abspath, relpath, data=None, add_to_ui=True)
Compute a function from the model given by the abspath/relpath pair, and with the given data. If data is not
given, the data currently in the CurveExpert Pro spreadsheet will be used.
Parameters
abspath (string) can be the strings $BUILTIN$, $USERDIR$, or a fully qualied
path the location of the function library.
relpath (string) libf/2D/Bessel/Bessel_j0.py, for example, which is the rest of the path
to the actual le that implements the function.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
api.calculate_linear_regression(degree, data=None, add_to_ui=True)
Compute a linear regression of the given degree, and with the given data. If data is not given, the data currently
in the CurveExpert Pro spreadsheet will be used.
Parameters
degree (integer) Degree of the polynomial to compute a linear regression for.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
The return value is a result object, which contains all of the relevant information about that result.
api.calculate_lowess_smoothing(data=None, add_to_ui=True)
Compute a Lowess smoothing with the given data. If data is not given, the data currently in the CurveExpert
Pro spreadsheet will be used.
Parameters
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
171
CurveExpert Professional Documentation, Release 2.0.4
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
The return value is a result object, which contains all of the relevant information about that result.
api.calculate_movingaverage(windowsize, windowtype=rect, windowpos=centered, windowqual=0,
data=None, add_to_ui=True)
Compute a moving average with the given parameters and with the given data. If data is not given, the data
currently in the CurveExpert Pro spreadsheet will be used.
Parameters
windowsize (integer) The total extent of the window, from left to right. The extent can be
given as a number of points or a distance along the x axis. See windowqual below.
windowqual (integer) If the windowsize is specied as a distance along the x axis, win-
dowqual should be set to 0. If the windowsize is given as a number of points, windowqual
should be set to 1.
windowtype (integer) The function that is used as the weighting function. Should be one
of the following: rect, bartlett, blackman, hamming, or hanning.
windowpos (integer) The position of the window in relation to zero (the centerpoint of
the averaging). Should be one of centered, leading, or lagging.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
The return value is a result object, which contains all of the relevant information about that result; returns None
on error.
api.calculate_nonlinear_regression(abspath, relpath, data=None, add_to_ui=True)
Compute a nonlinear regression from the model given by the abspath/relpath pair, and with the given data. If
data is not given, the data currently in the CurveExpert Pro spreadsheet will be used.
Parameters
abspath (string) can be the strings $BUILTIN$, $USERDIR$, or a fully qualied
path the location of the model library.
relpath (string) lib/2D/Sigmoidal Models/Weibull.py, for example, which is the rest of
the path to the actual le that implements the model.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
api.calculate_polynomial_spline(degree, data=None, add_to_ui=True)
Compute a polynomial spline of the given degree, and with the given data. If data is not given, the data currently
in the CurveExpert Pro spreadsheet will be used.
Parameters
degree (integer) Degree of the polynomials used for the splining.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
172 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
The return value is a result object, which contains all of the relevant information about that result.
api.calculate_tensionspline(tension, data=None, add_to_ui=True)
Compute a Tension smoothing with the given tension parameter and the given data. If data is not given, the data
currently in the CurveExpert Pro spreadsheet will be used.
Parameters
tension (oat) tension parameter for the spline.
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
add_to_ui (boolean) whether or not to add the result to the CurveExpert Pro result list.
Return type result object
The return value is a result object, which contains all of the relevant information about that result.
api.clear()
Clears all results and the spreadsheet. Functionally the same as the user selecting File->New.
Return type None
api.clear_message_window()
Clears all text from the message window
api.create_fontproperties(font=Arial, size=12, weight=normal, style=normal)
This API creates a FontProperties object for some particular use (for example, a font for the text in the graphs
add_annotation API).
To create a FontProperties object, simply do, for example:
fp = api.create_fontproperties(font=TheFontName,weight=normal,style=normal,size=12)
Parameters
font (string) The font given can be any font on your system that you desire to use. The
default is Arial.
size (integer) The size of the font, in points. The default is 12.
weight (string) The weight of the font; can be one of ultralight, light, normal,
regular, book, medium, roman, semibold, demibold, demi, bold, heavy,
extra bold, or black. The default is normal.
style (string) The style ofthe font; can be one of normal, italic, or oblique. The
default is normal.
api.curvefinder(data=None, nonlinreg_builtin=True, nonlinreg_custom=True, linear=True, poly=(4,
8), lowess=False, parent_window=None, progress_caption=, silent=False,
do_multicore=True)
Run a batch of regressions against a particular dataset.
Parameters
data (2D numpy array) numpy array, or None to use the data currently in the spreadsheet.
nonlinreg_builtin (boolean) Search through all built-in nonlinear regressions.
nonlinreg_custom (boolean) Search through all custom (user dened) nonlinear regres-
sions.
linear (boolean) Include a linear regression in the search (straight line, y=ax+b)
poly (boolean or 2-tuple, as appropriate) Search a range of polynomial regressions. If
polynomials are desired, this parameter should be set to a tuple indicating the min and max
degree of the polynomials to calculate. Otherwise False.
26.1. Basic API 173
CurveExpert Professional Documentation, Release 2.0.4
lowess Include a lowess smoothing in the search
parent_window (wxWindow object) If a progress dialog is desired, the parent_window
for the progress dialog is given here.
progress_caption (string) Title of the progress dialog that is shown.
silent (boolean) If set to True, will not print any intermediate information to the CurveEx-
pert Pro messages window.
do_multicore If set to True, multicore capability will be used if available.
Return type list of result objects, sorted in order of their score.
The return value is a list of result objects, which contains all of the relevant information about that result.
api.extract_from_excel(le_name, sheet_name, range_spec, stdcol=False)
Reads a data from an Excel le (xls or xlsx).
Parameters
le_name (string) le to read
sheet_name (string) the name of the sheet where the data resides.
range_spec (string) the range of cells in Excel where the data is located. For example,
A1:B10, or A1:B10,D1:D10.
stdcol (boolean) True if the last column of the data in the spreadsheet represents the
standard deviation column.
Return type numpy array
On error, this routine will return None.
api.get_all_graphs()
Returns a list of all graphs available (a list of Graph objects).
api.get_all_results()
Returns a list of all of the currently computed results; these are the same results as shown in the Results Pane.
Return type list of result objects
api.get_current_graph()
Returns a Graph object for the currently displayed graph. If there is no graph currently showing (e.g. the
spreadsheet page or notes page is active), this call will return None.
api.get_data()
Returns a reference to the dataset shown in the spreadsheet. One can both read and write to this dataset, but its
size should not be changed. If the dataset is changed (written to), the API refresh_spreadsheet() must be called
once all desired data has been modied.
Return type numpy array
api.get_main_window()
Returns a handle to the main window. Can be useful if using graphical widgets from the plugin.
Return type wx.Window
api.get_spreadsheet_selection()
Gets the currently selected rectangle in the spreadsheet. If there is no selection, all four members of the tuple
will be -1. Note that the numbers are all zero based, so a top left of 0,0 means row 1, column 1.
Return type tuple (top,left,bottom,right)
174 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
api.import_from_clipboard()
Reads data from the clipboard, importing it with default settings.
Return type None.
api.import_from_file(fname)
Identical to read_le().
api.message(msg, importance=0)
Print a message to the CurveExpert Pro message pane.
Parameters
msg (string) string that contains the text to send to the message pane
importance (integer) the importance level of the string. Can be set to 0, 1, or 2. Currently,
an importance of 0 prints in black, 1 in red, and 2 in blue.
Return type None
api.messages(msgs, importance=0)
Print a batch of messages to the CurveExpert Pro message pane.
Parameters
msg (list of strings) list of strings that contains the text to send to the message pane
importance (integer) the importance level of the string. Can be set to 0, 1, or 2. Currently,
an importance of 0 prints in black, 1 in red, and 2 in blue.
Return type None
api.new_graph(name=None, style=None)
Creates a new graph and makes it current. Returns a Graph object.
Parameters
name (string) name of the plot; used for the notebook tab that the graph appears in.
style (integer) The style of the plot. XY, 3D, or polar. If not given, an XY plot is created.
api.quit()
Shut down CurveExpert Pro.
Return type None
api.read_file(fname)
Reads a le from disk. The le can be either a cxp le or a text/data le. If a text/data le, it will be imported
with default settings. The data read is placed in the CurveExpert Pro spreadsheet; if the data is needed for
manipulation in the plugin, see get_data().
Parameters fname (string) le to read
Return type None
api.refresh_spreadsheet()
If the data is changed (via calling get_data() and modifying the data), the plugin should call re-
fresh_spreadsheet() in order to notify CurveExpert Pro about the change.
Return type None
api.remove_graph(graph)
Removes a graph from the stack of graphs.
Parameters graph a Graph object that is the one to remove.
26.1. Basic API 175
CurveExpert Professional Documentation, Release 2.0.4
api.reset_with_data(data, stddev=False)
Reinitializes the CurveExpert application with a new dataset. Functionally the same as reading a data le, except
that the dataset can be generated inside of a plugin by the user. As such, all current results will be lost.
Parameters
data (numpy array) array of data, which must have at least two columns.
stddev (bool) ag to state whether or not the last columns is standard deviation data (False
by default)
api.result_picker()
Shows a dialog box from which a result can be selected.
Return type list of selected result objects.
api.set_current_graph(graph)
Causes a graph be made current; i.e.; made visible in the notebook.
Parameters graph a Graph object that is the one to make current (bring to the front).
api.set_data(data)
Sets a new dataset into the CurveExpert application with a new dataset. The new dataset must have the same
number of columns as the current dataset for this call to succeed.
Returns zero on success, nonzero on error.
Parameters data (numpy array) array of data, which must have the same number of columns as
the current dataset
Return type integer
api.text_to_clipboard(txt)
Copy any text string that you have to the clipboard.
Parameters txt (string) string that contains the text to copy to the clipboard
Return type None
api.update_ui()
Allows the user interface to update itself. Useful for ushing text out to the messages window after calls to
api.message.
Return type None
26.2 Result Object
class Result.Result(name=Unnamed, kind=Regression, family=NoFamily, id=0)
The Result object holds all information concerning any result calculated in CurveExpert/GraphExpert Profes-
sional. As such, there are some elds that are not applicable for all results. As a user of the API, you will not be
creating result objects directly, but you will receive them as a return value of the result calculation APIs, such
as calculate_nonlinear_regression.
name
The name of the result
kind
The kind of the result. Currently, can be Regression, Interpolation, or Smoothing
family
The family of the result. For example, Sigmoidal Models.
176 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
spec
The specication of the result, which is a dotted string used to uniquely identify the result. For example,
regression.nonlinear.Exponential Models.Reciprocal Logarithm
nindvar
The number of independent variables that the result is applicable for.
nparam
The number of parameters. For example, for a regression model a*x^2 + b*x + c, nparam is 3.
param
The optimized values of the parameters.
param_names
A list of the parameter names, in the same order as the value listed in the param attribute.
valid
Flag to denote whether or not the result is clean; meaning that the data has not change since the result has
been computed.
score
The score compute for this result, usually shown in the Score column in the Results pane.
corr_coeff
The coecient of determination, if applicable.
real_corr_coeff
The correlation coecient, if applicable.
covariance_matrix
The covariance matrix of the result as a 2D array, if applicable.
log
A list of informational strings generated during the calculation of the result that can be useful in some
circumstances.
errlog
A list of strings generated during the calculation of the result that, if present, indicate that something has
gone awry with the results calculation.
covariance_matrix
The covariance matrix of the result as a 2D array, if applicable.
status
Flag to denote the status of the result, as far as its success or failure during computation.
status = -1: uninitialized
status = 0: computed and valid
status = 1: unable to compute (i.e. not enough data points for the model)
status = 2: unable to get an initial guess
status = 3: diverged
status = 4: did not converge; use results with caution.
eval_function(x, *params)
evaluates the result using the independent variable(s) and the set of parameters given in the argument
list. Note that functions have no parameters. x can be either a single oating point number, or a numpy
array. It must have the appropriate number of columns that matches the number of independent variables
appropriate for the result.
26.2. Result Object 177
CurveExpert Professional Documentation, Release 2.0.4
Parameters
x (oat or array) independent variable with which to evaluate the result
params (oat) argument list for parameters
Return type the result evaluation. The type and dimension matches the type passed for x.
For example, to evaluate a model that has three parameters,
r.eval_function(x,a,b,c)
where a, b, and c are the values of the three parameters. To evaluate a result with its current set of
parameters,
r.eval_function(x,*r.param)
arclength(a, b)
Find the arclength of a result from limits a to b. Supports only functions with one independent variable. If
b < a, returns the negative of the arclength.
Parameters
a (oat) starting point for the arclength calculation
b (oat) ending point for the arclength calculation
Return type the arclength from a to b (oat)
differentiate(x)
Dierentiate a result at x. Supports only functions with one independent variable.
Parameters x (oat or numpy array) location at which to dierentiate
Return type the result of the dierentiation, as the same type as x.
integrate(a, b)
Integrate a result from limits a to b. Supports only functions with one independent variable.
Parameters
a (oat) lower limit of the integration
b (oat) upper limit of the integration
Return type the result of the integration (oat)
inverse_eval(y, x0)
Find x at which a result is equal to y. Supports only functions with one independent variable.
Parameters
y (oat) location at which to nd the corresponding x.
x0 (oat) initial guess for the corresponding x.
Return type the result of the inverse evaluation (oat)
Note that this function can raise a RuntimeError exception error if the algorithm does not converge.
report(condence=95, delimiter= )
Generates a text report for the result, returning that text report as a single string.
Parameters condence (integer) In cases where the condence level is required (for example,
computing the uncertainty in a parameter of a nonlinear regression)
Return type string
178 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
Example usage (if r is a result object):
txt = r.report()
26.3 Graph Object
class UGraph.Graph(g)
The Graph object holds information about a graph and has methods that can be used to manipulate that graph.
name
The name of the graph
style
The style of the graph
style = 1: XY plot
style = 3: 3D plot
style = 4: polar plot
add_annotation(s, pos=None, **kwargs)
Adds an annotation to the plot.
Parameters
s (string) the text for the annotation
pos (tuple of two oats) the position of the annotation (a tuple). If not given, the annota-
tion is positioned at graph coordinate location 0.5,0.5 (the center of the graph).
The add_annotation function can take keyword arguments to modify the properties of the annotation as
follows. Any unknown keyword arguments are ignored.
Parameters
coord_system (integer) 0 = gure coordinates, 1 = data coordinates. Default is gure
coordinates.
font (FontProperties object) A font properties object. Default is Arial, normal weight,
normal style, and 12 point.
font_color (string) The color of the annotation text, which is a string in the following
format: #FFAABB. The default color is black #000000.
multi_alignment A string describing the horizontal alignment (justication) of the text
within the box. Can be center, left, or right. Default is center.
rotation (integer) An integer giving the amount of text rotation, in degrees. Can range
from -360 to +360.
linespacing (oat) A oating point number describing the amount of space to take per
line; must be greater then 0.0. Default is 1.2, which very closely resembles single-spaced
lines.
alpha (oat) alpha transparency of the annotation text. This is a oating point number
ranging from 0.0 (fully transparent) to 1.0 (full opaque). Default is 1.0.
box_show (bool) whether or not to show the box around the text.
26.3. Graph Object 179
CurveExpert Professional Documentation, Release 2.0.4
box_style (string) the style of the box. Can be square, real_square, ellipse, cir-
cle, diamond, round, round4, sawtooth, roundtooth, rarrow, larrow, tri-
angle, parallelogram-right, parallelogram-left, trapezoid, or itrapezoid. The de-
fault is square.
box_t_to_text (bool) whether or not to t the box to the size of the text. If False, the
parameter box_size is used as the size of the box.
box_size (tuple of two oats) the size of the box, given in the same coordinate system as
the annotations coord_system. Ignored if box_t_to_text is True.
box_llcolor (string) the color of the ll inside the box, which is a string in the following
format: #FFAABB. The default color is black #000000.
box_edgecolor (string) the color of the edge of the box, which is a string in the following
format: #FFAABB. The default color is black #000000.
box_alpha (oat) the transparency setting of the box (which includes its edge). This is
a oating point number ranging from 0.0 (fully transparent) to 1.0 (full opaque). Default
is 1.0.
boxframe_width (integer) an integer describing the width of the box edge. The default
is 1.
box_shadow (bool) whether or not to draw a shadow behind the box.
arrow_show (bool) whether or not to show an arrow in conjunction with the annotation.
The arrow always points from the center of the annotation to the point given by (arrow_x,
arrow_y). Default: False
arrow_coord_system 0 = gure coordinates, 1 = data coordinates. Default is data
coordinates.
arrow_x (oat) The x location of where the arrow should point to, in the coordinate
system given by arrow_coord_system.
arrow_y (oat) The y location of where the arrow should point to, in the coordinate
system given by arrow_coord_system.
arrow_alpha (oat) the transparency setting of the arrow . This is a oating point
number ranging from 0.0 (fully transparent) to 1.0 (full opaque). Default is 1.0.
arrow_color (string) the color of the arrow, which is a string in the following format:
#FFAABB. The default color is black #000000.
arrow_width an integer describing the width of the arrow edge. The default is 1.
arrow_style (string) a string indicating the style of the arrow. Can be line, thick,
wedge, or fancy. The default is line.
arrow_head (string) a string indicating the style of the arrows head. Can be -, ->,
<-, <->, -|>, <|-, <|-|>, -[, ]-, ]-[, or |-|. Note that not every arrow
head style is compatible with the arrow style. See the CurveExpert Pro GUI for valid
combinations. The default is -|>.
arrow_connection_style (string) a string indicating the style of the connection line be-
tween the annotation and the pointed-to-point. Can be one of straight, xy, or arc.
The default is straight. Note that not every arrow connection style is compatible with
the arrow style. See the CurveExpert Pro GUI for valid combinations.
add_arrow(startpos, endpos, **kwargs)
Adds an arrow to the plot.
180 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
Parameters
startpos (tuple of two oats) start position of the arrow, in graph coordinates.
endpos (tuple of two oats) end position of the arrow, in graph coordinates Should be a
tuple.
coord_system (integer) 0 = gure coordinates, 1 = data coordinates. Default is gure
coordinates.
alpha (oat) alpha transparency of the arrow. This is a oating point number ranging
from 0.0 (fully transparent) to 1.0 (full opaque). Default is 1.0.
color (string) The color of the arrows edge, which is a string in the following format:
#FFAABB. The default color is black #000000.
llcolor (string) The color of the arrows ll, which is a string in the following format:
#FFAABB. The default color is black #000000.
width (integer) an integer describing the width of the arrows line. The default is 1.
style (string) a string indicating the style of the arrow. Can be line, thick, wedge,
or fancy. The default is line.
head (string) a string indicating the style of the arrows head. Can be -, ->, <-,
<->, -|>, <|-, <|-|>, -[, ]-, ]-[, or |-|. Note that not every arrow head style
is compatible with the arrow style. See the CurveExpert Pro GUI for valid combinations.
The default is -|>.
connection_style (string) a string indicating the style of the connection line between
start and end point of the arrow. Can be one of straight, xy, or arc. The default is
straight. Note that not every arrow connection style is compatible with the arrow style.
See the CurveExpert Pro GUI for valid combinations.
shape_scaling (oat) A oating point number that determines the fatness of the arrow
shape. Lower scalings lead to thinner arrow bodies (in cases where the arrow body is a
shape, and not just a line), and smaller arrow heads. Higher scalings conversely lead to
thicker arrow bodies and correspondingly larger arrow heads.
add_result(r)
Adds a computed result to the graph.
Parameters r the result object to add.
Note that adding a result to a graph means that the result must be managed by the application. If it is not,
it automatically becomes managed.
apply_theme(theme_name)
applies a particular theme to the graph. The theme must be present on the system.
Parameters theme_name (string) A string that gives the name of the theme to apply. Exam-
ple: Blackness
autoscale()
autoscales the graph
clear()
clears all series o of the graph and resets the scaling to its default state.
Return type True if successful, False if not.
draw_circle(xy, radius, coord_system=0, redraw=True, **kwargs)
Draws a circle on the plot, with center xy and the given radius.
26.3. Graph Object 181
CurveExpert Professional Documentation, Release 2.0.4
At this time, the circle is not persistent, which means that it is not saved along with the graph to le. If a
document is read from disk, the circle will not be present; the plugin must be rerun in order to redraw the
circle.
Parameters
xy (a tuple containing two oats) location of the centerpoint.
radius (oat) the radius of the circle
The draw_circle function can take keyword arguments to modify the properties of the circle as follows.
Any unknown keyword arguments are ignored.
Parameters
coord_system (integer) 0 = gure coordinates, 1 = data coordinates. Default is gure
coordinates.
redraw (boolean) whether or not to redraw the gure after adding the artist to it. Useful
when adding many artists at a time, to reduce screen icker.
edgecolor color of the edge, given as a hex code, as in #00FF00. Common color
names may also be given; for example, red.
llcolor (string) color of the ll inside the circle, given as a hex code, as in #00FF00.
Common color names may also be given; for example, red. Can be None for no ll.
linewidth (integer) width of the line in points (1/72 of an inch)
linestyle (string) style of the line. Can be one of solid,dashed,dash_dot,dotted, or
None, which means not to draw the line.
alpha (oat) transparency of the circle. Can be 0.0 to 1.0, with zero being transparent,
and 1 being opaque.
Return type an artist that represents the circle.
An artist can always be removed from the graph by calling its remove() method.
draw_line(xarray, yarray, redraw=True, coord_system=0, **kwargs)
Draws a (potentially) multisegmented line on the plot.
At this time, the line is not persistent, which means that it is not saved along with the graph to le. If a
document is read from disk, the line will not be present; the plugin must be rerun in order to redraw the
line.
Parameters
xarray (any iterable object returning oats) sequence of points for the x coordinates
yarray (any iterable object returning oats) sequence of points for the y coordinates
The draw_line function can take keyword arguments to modify the properties of the line as follows. Any
unknown keyword arguments are ignored.
Parameters
coord_system (integer) 0 = gure coordinates, 1 = data coordinates. Default is gure
coordinates.
redraw (boolean) whether or not to redraw the gure after adding the artist to it. Useful
when adding many artists at a time, to reduce screen icker.
color (string) color of the line, given as a hex code, as in #00FF00. Common color
names may also be given; for example, red.
182 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
linewidth (integer) width of the line in points (1/72 of an inch)
linestyle (string) style of the line. Can be one of solid,dashed,dash_dot,dotted, or
None, which means not to draw the line.
alpha (oat) transparency of the line. Can be 0.0 to 1.0, with zero being transparent, and
1 being opaque.
marker (string) marker for each node of the line. Can be any one of [o | D | h | H
| _ | | None | | None | 8 | p | , | + | . | s | * | d | 1 | 3 | 4 | 2 | v |
< | > | ^ | | | x |
markeredgecolor (string) color of the marker edge, given as a hex code, as in
#00FF00. Common color names may also be given; for example, red. Can be None
for no marker edge.
markerllcolor (string) color of the marker ll, given as a hex code, as in #00FF00.
Common color names may also be given; for example, red. Can be None for no ll.
markeredgewidth (integer) width of the marker edge, given in points.
Return type an artist that represents the line.
An artist can always be removed from the graph by calling its remove() method.
draw_polygon(xarray, yarray, closed=True, coord_system=0, redraw=True, **kwargs)
Draws a polygon on the plot, with the points xy
At this time, the polygon is not persistent, which means that it is not saved along with the graph to le. If
a document is read from disk, the polygon will not be present; the plugin must be rerun in order to redraw
the polygon.
Parameters
xarray (any iterable object returning oats) sequence of points for the x coordinates
yarray (any iterable object returning oats) sequence of points for the y coordinates
closed (boolean) if True, the polygon will be closed so that the starting and ending points
are the same.
The draw_polygon function can take keyword arguments to modify the properties of the polygon as fol-
lows. Any unknown keyword arguments are ignored.
Parameters
coord_system (integer) 0 = gure coordinates, 1 = data coordinates. Default is gure
coordinates.
redraw (boolean) whether or not to redraw the gure after adding the artist to it. Useful
when adding many artists at a time, to reduce screen icker.
edgecolor (string) color of the edge, given as a hex code, as in #00FF00. Common
color names may also be given; for example, red.
llcolor (string) color of the ll inside the polygon, given as a hex code, as in #00FF00.
Common color names may also be given; for example, red. Can be None for no ll.
linewidth (integer) width of the line in points (1/72 of an inch)
linestyle (string) style of the line. Can be one of solid,dashed,dash_dot,dotted, or
None, which means not to draw the line.
alpha (oat) transparency of the polygon. Can be 0.0 to 1.0, with zero being transparent,
and 1 being opaque.
26.3. Graph Object 183
CurveExpert Professional Documentation, Release 2.0.4
Return type an artist that represents the polygon.
An artist can always be removed from the graph by calling its remove() method.
get_all_results()
Gets a list of all results plotted on a graph.
Return type a list of Result objects.
get_properties()
gets the full property object for the graph. All properties are here, but are not documented, unfortunately. If
there is some property of the graph that you would like to change that is not accessible through the regular
APIs, contact the author. Alternatively, use Pythons introspection capability to look into the properties
object.
get_title()
gets the title of the graph
Return type the title of the graph (string)
hardcopy(interactive=False)
prints the graph to the printer.
Parameters interactive (bool) If set to True, the user will be presented with a dialog to select
the printer. Otherwise, the printout goes directly to the default printer.
redraw()
Redraws the graph.
remove_result(r)
Removes a computed result from a graph.
Parameters r the result object to remove.
save_as(lename)
saves the graph as an external image or vector format le (PNG, JPG, TIFF, BMP, SVG, etc.). The format
is deduced from the name of the le.
Parameters lename (string) The name of the le to save.
set_axis_extents(axis, extents)
sets the extent of a particular axis.
Parameters
axis (string) which axis to set. Can be x1, x2, or y. For convenience, x can be
used in place of x1, and z may be used in the place of y.
extents (tuple of two oats) the min and max of the axis extent. Should be a tuple of two
oating point numbers.
Return type True if successful, False if not.
set_axis_label(axis, label)
sets the axis label
Parameters
axis (string) which axis to label. Can be x1, x2, or y. For convenience, x can be
used in place of x1, and z may be used in the place of y.
label (string) a text string to change the label to; mathtext in the string is also valid.
Return type True if successful, False if not.
184 Chapter 26. Appendix E: Plugin API
CurveExpert Professional Documentation, Release 2.0.4
set_properties(p)
sets the full property object for the graph. This sets all properties.
Parameters p a full graph property object
set_title(title)
changes the title of the graph
Parameters title (string) text string to change the title to; mathtext in the string is also valid.
Return type True if successful, False if not.
title
gets the title of the graph
Return type the title of the graph (string)
26.3. Graph Object 185
CurveExpert Professional Documentation, Release 2.0.4
186 Chapter 26. Appendix E: Plugin API
CHAPTER
TWENTYSEVEN
INDICES AND TABLES
genindex
search
187
CurveExpert Professional Documentation, Release 2.0.4
188 Chapter 27. Indices and tables
PYTHON MODULE INDEX
a
api, 171
r
Result, 176
u
UGraph, 179
189
CurveExpert Professional Documentation, Release 2.0.4
190 Python Module Index
INDEX
Symbols
3D graphing, 82
3d plot, 55
A
activate, 5
add_annotation() (UGraph.Graph method), 179
add_arrow() (UGraph.Graph method), 180
add_result() (UGraph.Graph method), 181
administrator, 3
advanced, 99, 102
AIC, 52
Akaike Information Criterion test, 52
analyze, 50
annotation, 58, 60, 69
API, 169
api (module), 171
apply_theme() (UGraph.Graph method), 181
arclength() (Result.Result method), 178
arrow, 58
aspect, 121
autoannotate, 60, 66
autoll, 21
automated install, 3
automatically plot, 121
automatically update results, 117
autoscale, 58, 60, 119
autoscale lock, 58
autoscale() (UGraph.Graph method), 181
average, 25
axis properties, 61
B
background, 74
badges, 44
bessel functions, 148
BMP, 58
bug, 116
built-in math functions, 145
C
cache, 124
calculate, 34
calculate_function() (in module api), 171
calculate_linear_regression() (in module api), 171
calculate_lowess_smoothing() (in module api), 171
calculate_movingaverage() (in module api), 172
calculate_nonlinear_regression() (in module api), 172
calculate_polynomial_spline() (in module api), 172
calculate_tensionspline() (in module api), 173
calculation, 29, 31, 38, 44
circle, 58
clamp, 28
clear() (in module api), 173
clear() (UGraph.Graph method), 181
clear_message_window() (in module api), 173
clipboard, 125
cloning graphs, 13
color coding, 43
column labels, 22
comma as decimal, 125
comment, 21
compare, 52
comparing regressions, 52
compute moving average, 37
condence bands, 53, 63
condence bounds, 60
condence level, 116
constants, 145
contour, 81, 83
contour plot, 81
convergence, 48
copy, 27, 60
copy underlying data, 60
copying graphs, 13, 80
cores, 119
corr_coe (Result.Result attribute), 177
covariance_matrix (Result.Result attribute), 177
create_fontproperties() (in module api), 173
crop, 28
cubic splines, 33
cursor, 26, 116
curve data, 60
curve t, 34, 165
191
CurveExpert Professional Documentation, Release 2.0.4
CurveExpert Pro les, 22, 113
CurveExpert Professional les, 128
curvender, 39
curvender() (in module api), 173
custom, 35, 39, 95, 9799, 102
cut, 27
CXP le, 113
CXP les, 22, 128
D
data, 25, 28, 29
data column labels, 22
data le, 117
data le location, 117
data les, 19, 111, 125
data operations, 28
deleting results, 45
delimiter, 51, 117
details, 45
dierentiate() (Result.Result method), 178
drag and drop, 45
dragging, 60
draw_circle() (UGraph.Graph method), 181
draw_line() (UGraph.Graph method), 182
draw_polygon() (UGraph.Graph method), 183
E
element, 60
EMF, 79
EPS, 79
equation, 109
equation display, 109
equations, 157
errlog (Result.Result attribute), 177
EULA, 133
eval_function() (Result.Result method), 177
Excel, 116
export, 113
extensions, 169
extract_from_excel() (in module api), 174
F
F-test, 52
family (Result.Result attribute), 176
features, 1
le locations, 132
les, 117
lled contour, 83
font, 121
footer, 21
formatting, 27
functions, 38, 39, 95, 98, 102
functions, array, 152
functions, bessel, 148
functions, comparison, 149
functions, constants, 145
functions, logical, 156
functions, misc, 150
functions, transcendental, 145
G
generating a table, 51
get_all_graphs() (in module api), 174
get_all_results() (in module api), 174
get_all_results() (UGraph.Graph method), 184
get_current_graph() (in module api), 174
get_data() (in module api), 174
get_main_window() (in module api), 174
get_properties() (UGraph.Graph method), 184
get_spreadsheet_selection() (in module api), 174
get_title() (UGraph.Graph method), 184
getting started, 5
GIF, 58
Graph (class in UGraph), 179
graph properties, 61
graph properties 3D, 83
graph theme, 80
graph themes, 80, 91
graph toolbar, 57
graphing, 53
graphing in 3D, 82
graphs and data pane, 9, 13
guide, 5
H
hardcopy() (UGraph.Graph method), 184
header, 21
hiding panes, 10
highlight, 120
hotkeys, 84
I
image, 58, 60
import, 19
import_from_clipboard() (in module api), 174
import_from_le() (in module api), 175
initial guesses, 35, 118
inserting rows, 27
install, 3
integrate() (Result.Result method), 178
internet, 125
interpoation, 32
interpolation, 32
introduction, 1
inverse_eval() (Result.Result method), 178
issues, 116
192 Index
CurveExpert Professional Documentation, Release 2.0.4
J
JPEG, 79
JPG, 58
K
kind (Result.Result attribute), 176
L
legend, 60, 68
legend order, 69
legend properties, 68
Levenberg-Marquardt, 165
license, 4, 5, 133
licensing (third party), 136
line, 58
line data, 60
line properties, 63
linear regression, 33, 165
linear splines, 33
linux, 3
localization, 123, 125
locator, 60
log (Result.Result attribute), 177
log viewer, 131
logging, 122
logs, 131
Lowess smoothing, 36
M
mac, 3
MainWin() (in module api), 171
making a table, 51
marker properties, 63
math functions, 145
math symbols, 157
mathtext, 84, 109, 121, 157
mathtext reference, 84
maximize, 10
memory, 124
menu reference, 14
menus, 10
message() (in module api), 175
messages pane, 9, 13
messages() (in module api), 175
middle mouse button, 120
models, 34, 35, 95
mouse transformations, 83
moving average, 37
multicore, 14, 119
multiple instances, 132
N
name (Result.Result attribute), 176
name (UGraph.Graph attribute), 179
new_graph() (in module api), 175
nindvar (Result.Result attribute), 177
NIST, 128
nonlinear regression, 34, 165
nparam (Result.Result attribute), 177
numeric format, 125
O
online, 125
operating on data, 28
osx, 3
overall graph properties, 74
P
pan, 57, 120
panes, 9
param (Result.Result attribute), 177
param_names (Result.Result attribute), 177
parameter histories, 49
paste, 27
PDF, 79
pi, 145
pick, 60, 120
picture, 58
plot toolbar, 57
plugins, 102, 169
PNG, 58, 79
polar plot, 55
polynomial, 34
polynomial splines, 33
prediction bands, 53, 63
prediction bounds, 60
preview pane, 9, 13
print, 59
printing, 80, 113, 121
printing graphs, 80
proxy, 125
PS, 79
purchase, 5
Python, 99
Q
querying results, 45
quit() (in module api), 175
R
RAW, 79
read_le() (in module api), 175
reading data les, 19
real_corr_coe (Result.Result attribute), 177
rectangle, 58
redo, 27
redraw, 120
redraw() (UGraph.Graph method), 184
Index 193
CurveExpert Professional Documentation, Release 2.0.4
references, 167
refresh_spreadsheet() (in module api), 175
refreshing graph themes, 124
region settings, 125
remove_graph() (in module api), 175
remove_result() (UGraph.Graph method), 184
removing columns, 27
removing results, 45
removing rows, 27
report, 116
report() (Result.Result method), 178
reports, 116
reserved words, 98
reset_with_data() (in module api), 175
residual, 118
residuals, 47
restore, 10
Result (class in Result), 176
Result (module), 176
result badges, 44
result color coding, 43
result details, 45
result icons, 43
result pane, 9
result preview, 45
result_picker() (in module api), 176
results, 42, 117
results pane, 12
results update, 44
RGBA, 79
rotate, 28
runs test, 47
S
save graph, 59
save_as() (UGraph.Graph method), 184
saving data, 111
saving graph themes, 80
saving graphs, 79, 113
scale, 28
scatterplot, 83
score (Result.Result attribute), 177
series properties, 94
set_axis_extents() (UGraph.Graph method), 184
set_axis_label() (UGraph.Graph method), 184
set_current_graph() (in module api), 176
set_data() (in module api), 176
set_properties() (UGraph.Graph method), 184
set_title() (UGraph.Graph method), 185
shape, 58
shortcuts, 84
silent install, 3
simple, 97
slots, 94
smoothing, 36
sort, 28, 116
spec (Result.Result attribute), 176
splines, 32, 33
spreadsheet, 25, 116
square, 58
standard deviation, 25
standard math operations, 98
statistics, 25
status (Result.Result attribute), 177
status bar, 14
style (UGraph.Graph attribute), 179
subscript, 157
superscript, 157
surface, 83
surface properties, 63
SVG, 79
system administrator, 3
T
table, 51, 60
tension splines, 33
text_to_clipboard() (in module api), 176
themes, 80, 91, 121
themes, applying, 80
themes, copying, 80
themes, managing, 91
themes, pasting, 80
themes, refreshing, 124
themes, saving, 80
theory, 165
TIFF, 58, 79
tips, 115
title, 74
title (UGraph.Graph attribute), 185
tolerance, 32, 118
toolbar, 11, 57
toolbar reference, 11
transform, 29
translate, 28
trial, 4
triangle, 58
triangulated surface, 83
U
UGraph (module), 179
undo, 27, 124
update_ui() (in module api), 176
updating results, 44
user interface, 8
V
valid (Result.Result attribute), 177
validation, 128
194 Index
CurveExpert Professional Documentation, Release 2.0.4
verication, 128
viewing, 83
W
Wald-Wolfowitz, 47
window menu, 10
windows, 3, 38
wireframe, 83
writing data, 111
X
xy plot, 55
Z
zoom, 58
Index 195

You might also like