Getting started: install and interface

← Curve Digitizer: digitize curves from old datasheets

1. Introduction and core concepts

Curve Digitizer is a lightweight desktop application for manually digitizing curves from raster plots, especially characteristic curves found in old electronic-component datasheets. It is written in Python 3 with Tkinter/Tcl-Tk and uses Pillow for image handling and NumPy for calibration mathematics.

The program is designed to turn a manual reading of a graph into a reproducible numerical dataset without altering the source image and without introducing interpolation or unsolicited automatic corrections. Its initial use case is digitizing curve families for later numerical fitting, model construction and SPICE simulation.

What it does

  • opens PNG, JPG/JPEG and TIFF images;
  • provides zoom, pan and fit-to-window;
  • shows source-image pixel coordinates under the cursor;
  • calibrates the plot using four points and a projective transform;
  • supports linear or logarithmic X and Y axes;
  • handles multiple point series on the same image;
  • stores the manual click, effective stored pixel and calibrated coordinates separately;
  • allows points to be moved or deleted and provides undo/redo;
  • offers optional local snapping to the darkest pixel;
  • saves projects as UTF-8 JSON and reopens them later;
  • exports calibrated data as CSV.

What it does not do

Curve Digitizer does not perform OCR, automatic curve recognition, smoothing, interpolation, fitting or automatic SPICE-model generation. Those operations belong in downstream tools. The digitizer preserves the points explicitly selected by the operator and does not invent intermediate samples.

Three different coordinate records

Each digitized point can contain three distinct coordinate representations:

  1. Manual click pixel: the exact position selected with the mouse.
  2. Stored pixel: the pixel actually used by the point. With snap disabled it matches the manual click; with snap enabled it may differ.
  3. Calibrated X/Y: physical values computed from the calibration, for example 180 V and 24.6 mA.

This separation preserves raw operator input. Even when snapping is used, the original manual click remains available in the project.

Source image

The original image is loaded and displayed but never overwritten. The program may create an in-memory grayscale copy for the snap algorithm, but that derived image is used only for local calculations and is not written back to the source file.

Curve families

Each series has a name and a parameter. For a vacuum tube, a family of Ia = f(Va) curves can use grid voltage Vg as the series parameter:

Series name: Vg_-20V
Parameter name: Vg
Parameter value: -20
Parameter unit: V

The same structure can be used for transistors, thyratrons, diodes, sensors and other plots in which several curves are distinguished by a parameter.

2. Installation, startup and interface

Requirements

The package requires Python 3, Tkinter/Tcl-Tk, Pillow and NumPy. The source uses modern Python syntax; Python 3.10 or later is an appropriate baseline.

The Python dependencies declared in requirements.txt are:

Pillow>=10.0
numpy>=1.24

Tkinter is normally provided by the operating system rather than installed through pip. On Debian-based systems, the usual package is:

sudo apt install python3-tk

Optional virtual environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Startup

Keep the three Python modules in the same directory and run:

python3 curve_digitizer.py

X11 forwarding

The GUI uses Tkinter and does not depend on Qt, Electron or a browser. It can therefore run on a remote Linux system and display through X11 forwarding when SSH and the X server are configured correctly:

ssh -X host-name
python3 curve_digitizer.py

Some environments may use trusted forwarding with ssh -Y. X11 setup itself depends on the remote host and local client.

Main window

The main window has two primary areas:

  • Central Canvas: displays the image and calibration/series markers.
  • Side panel: contains the Calibration, Series and Project tabs.

A status bar at the bottom shows cursor position in source-image pixels and, after valid calibration, the corresponding X and Y values.

File menu

  • Open image…: opens an image and starts a fresh project.
  • Open project…: opens an existing JSON project.
  • Save project: saves to the current project file.
  • Save project as…: saves under a new name.
  • Export CSV…: exports calibrated points.
  • Exit: closes the application and offers to save when the project is marked as modified.

Edit and View menus

Undo, Redo and Delete selected point are available under Edit. Fit image to window is available under View and changes only the display scale, not the source image.