ElectroChemGraphViewer Code
Brought to you by:
pelya
Elchemgraphview is a small utility to view volt/amper graphs saved to .CRV files, and to mark peaks on these graphs as done by electochemical researches by hand. The "peak" on a graph is actually the difference between the graph itself and very rough approximation, specified by two segments at peak borders. Also it's possible to use two straight lines instead of a spline for rough approximation, as it's typically done by hand on a paper by researcher. Installation ============ If you're using Windows launch and install all packages from the "dist" folder: python numpy scipy matplotlib If you're using Linux you will most probably have these packages in a package manager. Usage ===== You may find a tutorial video here, with annotations: http://www.youtube.com/watch?v=BCwtnmMs9uQ Launch "main.py" - it will show file selection dialog, by default inside "data" folder. Select CRV file, if it contains several measurements (potentiostat cycles, where volts go from min to max several times) it will also ask you which measurement to use. You will be given a figure, with one full loop consisting of two curves. Below the main figure you'll have the figure where peaks will be shown. Also there will be a command window with buttons. The figure will consist of a points from CRV file or from Excel CSV file, plus a fine approximation for these points. You may change rough/fine level of that approximation by changing "Approximation" wheel on a command window - lower coefficient will give you finer approximation. You may switch between active curve with a "Curve 1/2" button on a command window. There are two edit modes: remove errors and mark peaks, you may switch between them on a command window. Remove errors: use this mode to remove points from figure which you don't want to participate in any calculations. Click and drag mouse over such points - they will be marked with yellow color. If you've marked some points by accident click them with right mouse button - they will be added back to figure. Mark peaks: use this mode to mark a peak. Click and drag mouse two times near peak boundaries. You will be shown a peak, with it's max point position, area and width at peak half-height. You will also see two kinds of rough approximation - the spline curve and two straight lines. Both approximations are defined by the line segments at the peak border (they will be marked with black), so length and position of these segments will impact the final figure heavily. If you want to remove peak click it with the right mouse button. You may enable smoothing the curve near the edges, where you are defining peak, so that some erroneous point at the edge that sticks out if your otherwise smooth data won't make your peak curve take an unreasonable shape. The peak at bottom figure is a difference between fine approximatino and rough approximation, you may switch calculation to use curve or straight lines for rough approximation by clicking "Linear/Curve approx" button on a command window. You also may export raw data from CRV to CSV file, to import it into Excel. All your edits are saved into file with the same name as .CRV, but with "CRV-cfg" extension. Clicking close button on a window will automatically save your work.