Software Review: ProFit 6

proFit is a general pourpose data analysis and graph plotting application designed specifically for MacOS X. It is not aimed to selected categories of scientists or to specific data analysis procedures; instead, it offers researchers a powerful set of tools to develop their analysis algorithms, automate analysis procedures and produce publication quality graphics. A brief review of what proFit does and does not is the aim of the following article. We shall focus on version 6.0.6, the latest available at the time of this writing.

Data Windows

In proFit, data are always stored in data windows. They resemble spreadsheet-type worksheets, since they are organized in rows and columns containing numerical or text or date data. Colums are identified by number, but they can also be given a title for easier human reading. Column resizing, inserting and deleting can be done easily with single mouse clicks, and the same holds for rows. Additionally, it's possible to define exactly how many rows and columns a data window must have.





Entering column titles is very easy, it just requires selecting the title cell and typing in, no need to open a specific "column properties" panel as in other data analysis applications. However, editing values in cells (title or data cells) is not really easy: once you select a cell, you cannot move the insertion point within the cells using the arrow keys, since they move the selection to the nearby cells; option-left or right arrow keys move the insertion point at the beginning or end of the selection, but that's all; you either have to replace the entire cell's content with the new one, or have your hard way to point with the mouse exactly where you want the insertion point to be in order to edit the cell's content.

This issue, that hopefully will be fixed in a future release, is hardly a problem if you manage data windows with automatic calculations or scripts. In fact, often you don't directly edit data; instead, you have raw data saved in text files (as the result of an experiment, for example), and import them in a data window. At this stage, you can specify what's the format of your data file(s) and preview the import results to check if you made any mistakes:





You can even assing names to specific sets of import rules, for recalling them easily and quickly at a later time. Overall the data import process is very practical and efficient, the only limit being that if you are importing numerous files with the same formatting you cannot set the data format just once and apply it to all of them; instead, you have to assing each file its data format; proFit remembers the last data format used, so it's just a matter of pushing enter many times, but you can quickly get bored. You can always find a workaround for this issue, that's defining a program for importing data with specific data formats. But we will discuss later on how programming works.

Once you have your data in your table, you usually apply some sort of analysis to them. For example columns can be added with formulae associated to them; the usual arithmetic operations can be done, but custom formulae can be defined involving any built-in function (e.g. trigonometric, hyperbolic, etc.) or any user-defined function. Integration and derivation of data columns with respect to another column of the same worksheet is also possible (no calculations are possible, with this tool, involving data spread on different data windows; they can be done with scripts, though). A nice menu also gives access to many physical constants for quickly pasting them into formulae. Formulae can be attached to columns, so that calculations are automatically performed when the data columns that constitute the data sources are modified, and the results are automatically updated. This is very useful, but you have to be careful: proFit does not prevent you (although it warns you) to make recursive calculations; if this occurs, never ending calculations require to force quit the application in order to regain control of proFit.





Other calculations can be applied on columns through the provided Calc menu; these include data reduction (keep/remove/average/smooth data every n rows), data sorting, table transposing, binning and gridding data, and numerical Fourier transforms.

For all those operations involving graphing and fitting, that we will discuss later, columns can be assigned a default x, y, z, Δx, Δy or Δz label, either through a contextal menu or by command-clicking on the column title.

The Preview Window

The quickest way to graphically look at data is to use the Preview window; it can be used as a regular window or a floating palette, and displays as blue squares the data contained in the default y column of the frontmost data window, plotted as a function of the its default x column. Data symbols become red when their cells are selected.





The Preview window has many advantages and some disadvantages. It's really easy to look at data with it, since you can change your view with the hand tool and zoom in and out the plot with the mouse. You can use as many markers as you like and directly read their coordinates and the difference between coordinates of different markers, and you can even select single data points (but not sets of data points) and move them around the plot (that's a nice way to improve experimental data quality, isn't it?). What you cannot do is to connect data points with line segments (you can plot a spline on the Preview window, but that's not the same, especially for multiple valued data as thermal or hysteresis loops or else), and plot more than one data column at a time; to be able to do this, you have to draw a real graph.

The Preview window also shines when data fitting procedures are involved, as we will see later on.

Graphs

Plotting graphs with proFit is a pleasure. The provided tools are powerful and easy to use, and the results quality is very high, adequate for publication on high quality scientific journals and magazines, and of course also for oral or poster presentations at conferences or seminars or lectures.

Basically, a Graph window is a representation of a piece of paper (of the size selected in the Print Preview dialog box) that can contain one or more graphs. Each of them can contain one or more curves (either data plots or functions). What is important about Graph windows is that they are supposed to be used for the production of final, high quality graphs; not for graphs that need to be edited, zoomed, moved, rotated, explored with markers etc. and that are so useful during the interpretation of experimental data. For this last pourpose the Preview windows is available, with all the limitations described earlier (e.g. no more than one data plot at a time). You can do most of these things also on Graph windows, but they are not as easy as you might expect: markers are not available (I developed a small program that tries to partially address this issue), and you cannot get the coordinate of a point of the graph by clicking at it; and you cannot zoom in or out the graph with the mouse, you have to edit its properties (accessible with a double click on the graph itself) and manually change the axes limits. But, always through the graph properties window, you can customize almost any aspect of the graph; from the axes (any number of axes per graph, located anywhere on the graph) to the labels (font, size, inclination, colour etc.); from the axes limits to the symbols and colours of the curves; from the frame to the grid; from the ticks to what appears in the legend, and so on.








From the graph properties window you can select the "current" graph, i.e. the one to which the next plotting operation will be directed. On creating a new plot through the Draw menu, in fact, you select the data window, its x and y column, lines, symbols and colours for the plot, and then assign it to the current graph (or create a new graph in the window containing the current graph or create an entirely new Graph window).





Once a curve has been attached to a graph, it becomes independent of its data window: if you change the data in the data window, the graph would not update itself unless explicitly told so. This mechanism has some advantages (you freeze how a graph looks like and you can create multiple graphs with the same data set but with different looks, or you can modify the data set but still preserve the graph with the older values), but is a source of some issues: if you have multiple data windows with the same name and with columns having the same titles, Graph windows can get confused when you plot curves coming from them in the same graph. This can be a very annoying issue, forcing you to carefully choose the data window names to avoid conflicts whenever you build multiple curves graphs. Also, since graphs only contain a sort of "virtual" link to the data windows that were their original source, when the data window is no longer available (e.g. you closed or destroyed it) the graph still contains its data, that can be re-tabulated in case they need additional processing. This way of operating is practical and efficient as long as you build final graphs for a publication, but can be a limitation or an annoying issue when working on data for understanding their properties and building the correct interpretation or physical model. A sort of hybrid between the Preview window and the Graph window is something proFit, in my opinion, definetly needs, although you quickly get the habit of working with proFit in its present form with much satisfaction; but as always with a Mac, it should be the software to adapt to the user needs and not the other way around.

Graph windows are not limited to graphs only: you can add to them geometrical shapes and labels and build simple diagrams; you can add to them bitmapped images and equations produced with LaTeX and transformed into pdfs (as shown above and below):





And you can add buttons, menus and text fields that will be useful when building interactive programs having a graphical interface.

Usual commands like grouping/ungrouping, aligning, flipping and rotating objects in the Graph window are available, and a coordinate window lets you move objects on the page with a great precision. Unfortunately, this coordinate window only gives coordinates of the objects on the page, and not coordinates of data points on the plot in its coordinate frame; for this pourpose, the Preview windows has to be used.

Projects?

Each window, either data or graph, can be saved to disk; the file format is proprietary (default extensions are .data for Data windows and .plot for Graph windows), but their content can be exported to text for Data windows or to any image format supported natively by MacOS X for Graph windows (i.e. jpg, gif, tiff, png, eps and pdf). The output quality of Graph windows is very very high, and eps or pdf graphs can be used in LaTeX documents or imported (or dragged and dropped) into Keynote presentations for example. They can be edited with applications like Adobe Illustrator since they preserve each and every detail of how they are constructed: symbols keep their individuality, labels can be edited, colours can be modified etc. But, as you already have noticed, each window has a life of its own. There is no idea of "projects" in proFit, as there's on other data analysis applications. That is, each window is a file, and each file only contains the data belonging to its window. If, as usually is, more windows belong to the same "project" (the same sample, the same family of samples, the same analysis procedure or whatever is convenient to you to organize your data), you have to keep them properly organized into folders (for example) in the Finder; proFit also lets you assign metadata to its files (author, keywords, project etc) that can be accessed and searched for with Tiger's Spotlight. On the one side this gives the user great flexibility: the same dataset or plot can belong to different "projects", and you don't need to always keep open all the windows of the same project; on the other side this gives some limitations, that we already discussed before: as an example, you cannot perform calculations in a data window using data stored in a different data window (unless you use scripts).

This isn't neither a better or worse way of managing your data; it's simply a different way. If you have any experience with other data analysis applications (now I can say it: I'm constantly comparing proFit to Microcal Origin for Windows) it's a different way of working. You can do the same things (usually better with proFit, in my opinion), but you have to learn a different approach to how you keep your data organized and how you manage it. On the long run I strongly prefer how proFit works, but you may need to get accustomed to. It's also different from how for example gnuplot works, totally file-based and script-based. proFit lies in between, and I have to say I really like it for this.

Programming

And now let's go to it! This is what you were looking for, after all, even if you didn't know. Programming, or making scripts for proFit, is what doubles the value and the power of this application.

A Pascal-like language is used for programming proFit; the code editor has basic functionality like syntax colouring and menus for quickly accessing almost any language construct or proFit function. Pascal isn't much employed nowadays, but if you are familiar with C (or you are a long time Macintosh developer) you'll discover that it's only a matter of syntax, the basic features of the language being more or less the same.





Users can develop their own programs, that in my opinion can belong to one of these categories (or to more of them):

  • programs that perform calculations on data: these programs start from an already open Data window, or let the user open one or more of them, and add columns to them, create new Data windows, and perform any sort of calculation on them, producing the final results; these programs can access a wide variety of functions that reproduce all the commands that are available to users through menus, plus a lot more to manage and convert data and Data windows; these programs can access any Data window that's open at the moment of their execution (windows are identified by type, data or graph, and by ID, so some care has to be taken when programmatically switching between windows so to always be sure the program is accessing the right window), thus avoiding the limitation provided by formulae that apply only to the columns of a single Data window; these programs can prompt the user for choosing files, for choosing Data windows and columns, and for inserting all the data values necessary for performing calculations;

  • programs that build graphs with pre-defined formats: once you have your Data window ready, you usually produce graphs; sometimes, graphs are always constructed in the same way for certain types of data; the usual solution to this is to use templates, and you can do this with proFit too; but you can also develop a program that creates the graph for you (maybe even starting from a saved template), adds the necessary curves, performs all the editing the graph needs (fonts, labels, colours etc.) and presents you the final results that requires very few or no changes;
  • programs that let you interactively work on data or graph windows: these are programs that are attached to a Graph window that does not contain graphs at all, but buttons, text boxes, menus etc.; such a program responds to the events triggered by the user by clicking on buttons and menus and so on, and acts on Data or Graph windows correspondingly; this is a convenient way to implement features that one uses a lot and that are not part of the standard set of tools provided by proFit. Here's an example by me:


This classification of programs is an artifact, just a way I find convenient to present the capabilities of proFit; actually, no formal distinction is provided, and any program can do any of these things. More often than not you will find useful to develop a program that performs a simple and small task, and let it operate on a given Data or Graph window, or be called from within another program. Much of your data analysis will soon be delegated to custom programs running in proFit, instead of being performed more or less by hand.

If you feel more comfortable with AppleScript than with Pascal, you are lucky: proFit exposes to AppleScript all the commands and functions that are avaiable to its Pascal compiler; this also opens new interesting possibilities: imagine an AppleScript associated to a folder as a folder action; each time you add a file (for example a text file that's the output of a measurement instrument) to that folder, the AppleScript automatically starts data processing with proFit, produces all the necessary calculations, builds the proper graph, and prints it or sends it by e-mail to someone; all of this without any need of user interaction; quite impressive.

If you compare the provided set of tools of proFit with those provided by other data analysis applications you discover that apparently proFit lacks some functionality; this is true only if you think that the data analysis application must give you ready-to-use analysis procedures. proFit uses a different approach: since your needs may be different from those of other people, it gives you the tools to build powerful data anlysis procedures; these are exactly what you need, do exactly what you expect and want and you can share them with other proFit users. Again, it's simply a different approach; one I like a lot.

Functions and Fitting

Besides defining programs, users can also define custom functions; these can be anything they like, can be defined in intervals, and can have free coefficients (with given constraints) to be used as free parameters in fitting procedures.





Any x-y couple of data columns, maybe with given error columns, can be used for fitting procedures; these include linear, polynomial, robust, Monte Carlo and Levenberg-Marquardt algorythms, all af them discussed in detail in the user manual. The user chooses a built-in or a custom function, initialises the parameters and lets the fitting procedure go on until the chi squared reaches a sufficiently deep local minimum (or the global minimum). As all of you know, proper parameters initialisation can be a very time consuming task when non-linear fits are involved. proFit has a unique feature that greatly helps the user and saves a lot of time: the Preview window can display the fitting function plotted with making use of the current set of parameters; you can then choose what parameter to move, and use the mouse to manually adjust the fitting curve over the experimental points; the new values of the selected parameter are recalculated in real time; repeat this for every free parameter, and in a few moments you'll have an initialised set of parameters ready for the numerical fitting procedure. Impressive, again.

Fitting procedures are also available from within custom programs, and usually produce reliable results very quickly.

The User Manual, Help and Support

Any feature of proFit is nicely documented in a very well done user manual, available either as a pdf or as an html help file (viewable with Help Viewer of with your favourite web browser). The pdf user manual can be downloaded from proFit's web site for free, even if you don't own a license of the application. Features are described in detail, useful examples of programming are given, and every built-in numerical procedure is discussed in detail, so that the application never does anything you don't know how is supposed to work.

Besides this, a mailing list is available to proFit users, and quansoft's tech support people usually answer questions or fix bugs very quickly. For example, I once discovered a bug when developing a program and asked for help; in a few hours I had my program fixed, and in a few days there was an updated version of proFit available for download that addressed the bug. Very nice.

Final Considerations

proFit only costs 95 USD, a very small price compared to other popular data analysis applications either on the Mac or Windows platform, but it's really powerful and easy to use. A trial version is available, with limited number of simultaneously open windows and a "trial" label printed on every graph.

It's not yet a Universal Binary application, but works smoothly under Rosetta (taken from their web site, I never tested this). The 6.1 version, scheduled for later this year, will be Intel ready, and will offer a handful of user requested new features. Even if I don't have an Intel-based Mac yet, as a really satisfied proFit user I'm sure I will upgrade as soon as version 6.1 is available.

Marco Coïsson

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

About zooming graph windows

A few days after having written this review, I discovered (thanks to the proFit support) one of the best hidden secrets of proFit. If you hold down the command and option keys and click and drag on a graph window, you get the coordinates of the mouse pointer in the graph's reference frame. Similarly, if you hold down command-option-shift and click and drag, you draw a zoom rectangle on the graph: release the mouse button and the graph will be zoomed to contain the selected area; return to the original view with command-Z or with the provided menu command to view the entire graph area. So the most important of my concerns about proFit seems to have already been addressed!