Skip to content
joshkraan edited this page Jan 3, 2018 · 7 revisions

Basic Usage

To use this program, you must first have a CSV file with your data in it. See the File Formatting section for help creating this file.

Once you have created a CSV file, go to the "Data File" box, click Browse, and find your CSV data file. Your data should now show up in the "Data Table" box. Verify that your data is correct and check the "Header Row" box in the "Data File" section if your data has column headings. Once your data is good, click "Graph Data" in the "Data File" box.

In the Graph section, you should see a graph of your data. In the settings box change the graph title, axis titles, and axis units to your liking. For help with symbol formattings see the Symbol Usage section. Next, click "Calculate Fit", and fit lines and an equation box should appear on the graph. Once everything looks good, hit "Download" to download your graph.

File Formatting

A properly formatted CSV file for the program is easy to make and can be created in many different spreadsheet applications. Files should have four columns, the X value, the X uncertainty, the Y value, and the Y uncertainty, in that order. An example of a properly formatted file is shown below.

X Value X Uncertainty Y Value Y Uncertainty
1 0.5 1 0.5
2 0.5 2 0.5
3 0.5 3 0.5

Most spreadsheet software should be able to export to a CSV file format. The process will be described here with Google Sheets, a free and easy to use web-based spreadsheet program. Once the data is properly formatted in Google Sheets, select File > Download as > Comma-separated values, and a CSV file should be downloaded to your computer.

Downloading a CSV file from Github.

If column headers are used (as shown in the data table above), the "Header Row" option should be selected when uploading to the Linear Regression application.

Symbol Usage

This application uses latex2exp for symbol processing (for those with LaTeX experience see the latex2exp documentation.). This section will give some examples that are useful for physics.

Symbols and mathematics should be enclosed in dollar signs $$. Basic math is supported, such as +, -, /, however, multiplication should be written with a $\times$ symbol. For example, one could write $1 / 2 + 3 \times 4 - 5$. Both lowercase Greek letters ($\alpha$) and upper case Greek letters ($\Alpha$) are supported. Many other mathematical symbols are supported, such as roots $\sqrt[index]_{radicand}$, powers $x^{power}$, subscripts $x_{subscript}$, and symbols such as degrees $\degree$ or the plus/minus symbol $\pm$. For a full list of supported symbols see here.

For more information and examples, see the latex2exp documentation.

Clone this wiki locally