Data Tool Help
The Data Tool is an Open Source Physics (OSP) application that enables users to analyze data organized into table columns and displayed in tabs. Data can be entered directly with the keyboard or imported from and exported to spreadsheets and many other applications via text files or the clipboard. Most common text-based data formats are supported.
Data Tool works with Windows, Mac or Linux OS as long as Java 1.5 or later is installed. Note: Mac users, please substitute "control-click" for "right-click" to access popup menus.
1. Entering and Importing Data
Entering data. Click the "New Column..." button and enter a name in the popup dialog to create a new table column. The first cell in the column is automatically selected for data entry--simply type in a value (numbers only) and hit the enter key to move to the next cell. New rows are added as needed. Values may be entered in decimal form or in scientific notation using the letter E to mean "ten to the power of." For example, the number 345.6 may be entered as 345.6, 3.456E2, or even 3456E-1.
Importing data. Data can be imported from files, by pasting from the clipboard, or by direct transfer from other OSP applications. To import data from a file, choose the "File|Open..." menu item and select the file using the file chooser. To import data via the clipboard, first copy the data from the source application (spreadsheet, Logger Pro, etc.) and then choose either the "Edit|Paste|New Tab" menu item to open the data in a new tab or "Edit|Paste|New Columns" menu item to add the data to an existing tab. To transfer data directly from other OSP applications (Tracker, etc.) choose the popup "Analyze..." or "Tools|Data Tool" menu item in that application.
2. Editing Data
Editing cell contents. Double-click a cell to edit its contents. The current contents (if any) are selected so that typing immediately begins a new value. While typing, the cell turns yellow to indicate the contents have changed. Hit the enter key to enter the new value and move to the next cell.
Sorting rows. Single-click a column header to sort the rows in ascending order of the values in that column. This is often useful for selecting a subset of cells whose values fall in a desired range. Single-click the row column header or double-click any column header to sort by row number.
Selecting cells. Data points can be selected, and selected points are highlighted, in both the table and plot. To select cells in the table, click a cell with the mouse, or drag to select multiple cells. Control-click to add or remove cells from the selection, or shift-click to select all cells between the previous and newly clicked cell. To select cells in the plot, drag the mouse to draw a rectangle and select the points inside. Control-drag to add points to the selection.
Selecting rows or columns. Double-click a row number or column header to select the whole row or column. Control-click to add or remove to the selection, or shift-click to select all rows or columns between the previous and newly clicked one. Double-click the row column header to select all cells.
Clearing the selection. Single-click any row number to clear the selection (i.e., deselect all cells). Note that clicking a column header does not clear the selection, but instead sorts the rows as described above.
Deleting cell contents. Hit the delete key to delete the contents of all selected cells.
Inserting cells. Right-click a cell or group of selected cells and choose the popup "Insert Cells" item to insert new empty cells. The existing (selected) cells are shifted down (i.e., to higher row numbers) to accomodate the inserted cells. Right-click selected row numbers and choose the appropriate popup item to insert new rows or to add an empty end row.
Copying and cutting cells. Right-click a cell or group of selected cells and choose the popup "Copy Cells" or "Cut Cells" item to copy or cut the selected cell values to the clipboard. Right-click selected row numbers or column headers and choose the appropriate popup item to copy or cut entire rows or columns. Note: cutting a cell or row is not the same as deleting its contents. When a cell is cut, it is removed completely from the table, and cells below it are shifted up (i.e., to lower row numbers).
Pasting cells. Right-click a cell or group of selected cells and choose the popup "Paste Cells" or "Paste Insert Cells" item to paste the clipboard contents. Pasting the cells replaces the current cell values, while paste-inserting inserts new cells and shifts the existing cells down (i.e., to higher row numbers). Right-click selected row numbers and choose the popup "Paste Insert Rows" item to paste-insert entire rows.
Renaming columns. To change the name of an existing column, right-click the column header and choose the popup "Rename Column..." item. Column names must be unique and can contain no spaces. An underscore in a name causes subsequent characters to be subscripted.
Undoing edits. Choose the "Edit|Undo" or "Edit|Redo" menu item to undo or redo edits. There is no limit to the number of edits that can be undone.
3. Plotting and Formatting Data
Defining plot axes. The leftmost column in the table defines the independent variable plotted along the horizontal axis. To change the independent variable, drag the header of any table column into this leftmost position. All other table columns are plotted along the vertical axis.
Setting column visibility and style. The visibility and style of the point markers and connecting lines associated with each table column are set in a column properties table displayed directly above the data itself. Select the appropriate checkboxes to draw markers and/or lines for the desired column. Click the "style" cell to display a dialog for setting the shape, size and color of the markers and lines.
Setting column number formats. The style dialog described above also provides a field for defining the number format for a column. Typical number formats include (a) "0" for whole numbers only, (b) "0.000" for decimal numbers rounded to three places, (c) "0.00E0" for scientific notation with two decimal places, and (d) blank for default formatting. Trailing characters may also be used to show units. The sample field in the style dialog shows the format applied to the number 12.34567.
Hiding the column properties table. To hide the column properties table, uncheck the "Column Properties" checkbox on the toolbar.
Scaling the plot axes. The plot axes autoscale by default. Right-click on the plot itself to zoom in or out or for other scale options. Drag the mouse before right-clicking to zoom to a desired region.
4. Statistical Data
Displaying the statistics table. Check the "Statistics" checkbox to display statistical data for all table columns. Statistical data include the minimum, maximum, mean, standard deviation, standard error and number of data points in the sample.
Selecting the sample data. Select a subset of cells in a column to restrict the statistical sample.
5. Fitting Mathematical Models to Data
Selecting the fit data. The leftmost two columns, identified by the yellow and green cells in the column properties table, define the fit data used by the curve fitter. To change the fit data, drag the header of the desired table columns into these positions. To further refine the curve fitting process, select a subset of points. Only the selected points are included in the fit.
Displaying the curve fitter. Select the "Curve Fits" checkbox to display the curve fitter. The curve fitter draws an analytical function (the fit function) on the plot and determines the rms deviation between the fit function values and the vertical fit data values (green column, selected rows). Typically, a fit is optimized by varying parameters of the function to minimize the rms deviation, which is displayed in a field near the bottom.
Selecting the fit function. Select a fit type from the dropdown list. The fit function equation is displayed in a field and the function parameter names and values are listed in a table.
Setting the fit color. The color of the fit line drawn on the plot is displayed on a small button to the right of the fit equation field. To change the fit color, click the button and choose a color from the color chooser.
Defining custom fit functions. Click the "Fit Builder" button to define a custom fit function using the fit builder. Define parameters for the function, change parameter and function names, and enter parameter and function expressions as desired. Complete help for the fit builder is available from within the fit builder itself.
Adjusting fit parameters. To vary a parameter, click in its value cell. Type in a new value, or use the up and down arrow buttons to increase or decrease the parameter value in increments equal to a fixed percent of its starting value. To change the increment size click the percent display and select from the popup choices.
Using autofit. Click the "Autofit" checkbox to automatically optimize the parameters. Note: for most custom functions, parameters must be manually set to reasonable starting values before autofitting.
6. Building Data Functions
Displaying the data builder. Click the "Data Builder" button to display the data builder. The data builder enables users to define new data columns that are functions of existing columns.
Defining data functions. Click the "Add" button in the "Data Functions" area to define a new data function. The data function column is immediately added to the table and becomes available for plotting, fitting, or as input to other data functions. Define parameters for the function, change parameter and function names, and enter parameter and function expressions as desired. Complete help for the data builder is available from within the data builder itself.
7. Saving and Exporting
Saving tabs. Choose the "File|Save Tab" or "File|Save Tab As..." menu item to save the currently selected tab as an xml file. Saving a tab includes not only all data columns, but also the column visibility and styles, custom data functions, fit functions and parameter values, etc.
Exporting data. Data can be exported to a file or to other applications via the clipboard. If any table cells are selected, only those cells will be included in the exported data. To export data to a file, choose the "File|Export Data..." menu item and save the file using the file chooser. To export data via the clipboard, copy the data using either the "Edit|Copy|Data" menu item or by right-clicking the table as described above, then paste into the target application (spreadsheet, etc.).
Exporting images. Choose the "Edit|Copy|Image" menu item to copy an image of the currently selected tab, then paste the image into a target application (word processor, etc). This is useful for lab notes or other documentation where the plot and/or fit results are needed.