HVPlotter in Python

Published by

on

Over the last week, I have developed a program in Python for quickly plotting data made from the exported data from the jhv4 labview program. The program has the user select which file they want to make plots from, and then opens the attached window. The user will then select the x-variable and y-variable they want to plot. There is the option to have error bars for the x- and y-variables if the user selects which value they want to use as the error bars and then checks the box labeled either “x uncertainty bars” or “y uncertainty bars”. The user can use a custom title, x label, and y label for the plots. There is the ability for the user to manually use any scaling factor for x and y data. The number of samples per data point is default at 10 points, which is used for the error bars. The “Number of direction change in input voltage” refers to up ramping and downr amping the input voltage. If there is only one upramping and then down ramping then this will be set to 1, and if there is two upramps and downr amps then this will be set to 3, and so on. The program automatically detects where these changes occur in the data. To show the difference in these up ramps/down ramps, then they user must check the box labelled “Show difference between up and down ramps”. The hvd ratio and lvd ratio are automatically set to 1/890 and 1/3.37 respectively. Checking either of the boxes labelled “Take absolute value of y-values” or “Take absolute value of x-values” will take all absolute values. Checking the “Apply linear fit” box will apply a linear fit either to all the data or to each individual up/down ramp with the fit plotted in the same color as those data points and the equation of this printed in the terminal.

I have the program on my github: https://github.com/JakeHuneau/HVPlotter. There is also a file called requirements.txt which has a list of the Python packages required for this program to run. -JH

Discover more from SPINLAB @ MSU

Subscribe now to keep reading and get access to the full archive.

Continue reading