Saving projects and exporting CSV

← Curve Digitizer: digitize curves from old datasheets

8. Project saving, reopening and JSON structure

Saving projects

Projects are saved as UTF-8 JSON. Save project writes to the current file; Save project as… chooses a new file.

The source image is not embedded into the JSON. The project stores a reference to it.

Stored information

  • project format and version;
  • source-image path;
  • source-image width and height;
  • X and Y axis configuration;
  • four calibration pixels;
  • all series and their metadata;
  • manual click for every point;
  • effective stored pixel for every point;
  • calibrated coordinates;
  • project notes;
  • point-number display state;
  • snap configuration.

Simplified point example

{
  "manual_click_pixel": {
    "x": 123.4,
    "y": 456.7
  },
  "pixel": {
    "x": 124.0,
    "y": 455.0
  },
  "calibrated": {
    "x": 172.9,
    "y": 24.4
  }
}

Absolute and relative paths

When saving, the application writes the absolute image path and, when possible, a path relative to the JSON file. On reopening it tries the relative path first, then the absolute path. If neither exists, it asks the user to locate the source image.

This makes it convenient to keep image and JSON together or inside a project directory that can be moved as a unit.

Recalculation on open

When a project is opened, calibrated values are recomputed from stored pixels using the current calibration. Stored pixel data remains the reproducible basis.

Image dimensions

Source-image dimensions are stored in JSON. The current version does not automatically reject a manually relocated replacement image with different dimensions. If the application asks you to locate the image, select the original source or a pixel-identical copy.

Project notes

The Project tab contains free-form notes suitable for datasheet provenance, page number, revision, calibration observations or other metadata.

Operational note: in the current version, simply typing into Notes does not immediately mark the project as modified. After editing notes, explicitly use Save project before closing even if the title bar does not show the modification asterisk.

Reproducibility

For scientific work, keep together:

  • the source scan or raster image;
  • the JSON project;
  • exported CSV files;
  • downstream fitting scripts and generated SPICE models.

9. CSV export

Export requirements

A valid calibration and at least one series are required. Before export, the application recalculates calibrated coordinates for all points.

Column configuration

File → Export CSV… provides:

X name
X unit
Y name
Y unit
Series parameter name
Series parameter unit

Units are labels only. No numerical conversion is performed. If calibration values are in mA, changing only the export label to A will not divide them by 1000.

Header generation

Name and unit are joined with an underscore, and whitespace is replaced by underscores.

X name: Va
X unit: V
Y name: Ia
Y unit: mA
Series parameter name: Vg
Series parameter unit: V

becomes:

Va_V,Vg_V,Ia_mA

Column order

  1. calibrated X;
  2. series parameter value;
  3. calibrated Y.

Example

Va_V,Vg_V,Ia_mA
100,-20,12.3
120,-20,18.1
150,-20,26.4
100,-15,22.8
120,-15,31.5

Included series

Export iterates through every project series and every point with valid calibrated coordinates. Hidden series are still exported because visibility is a Canvas-display setting only.

Parameter value

The parameter value is written exactly as stored in the series. For numerical analysis, use a simple machine-readable value such as -20 rather than text such as -20 V nominal.

Numeric representation

X and Y are written using a compact representation of up to about 12 significant digits. This avoids unnecessary precision loss during JSON-to-CSV conversion; real physical accuracy remains limited by the scan and manual point placement.

Downstream use

The CSV can be read by Python, NumPy, pandas, GNU Octave or other fitting tools. For SPICE-model construction from a curve family, the dataset can be grouped by parameter value and a common nonlinear model fitted across all series.

No automatic sorting

The application does not reorder points by X and does not convert units. CSV row order follows point order within each series and series order within the project. Perform any required sorting or normalization explicitly downstream.