Loading data files
SweepMe! saves measurement data as tab-separated text files in UTF-8 encoding, one file per branch of the Sequencer (see Saving data). Each file has the following structure:
Time elapsed<TAB>Time stamp<TAB><Module label> <variable><TAB>... s<TAB><TAB><unit><TAB>... (empty line) <value><TAB><time stamp><TAB><value><TAB>...
- Line 1: column names, built from the module label and the variable name.
- Line 2: units.
- Line 3: empty.
- From line 4: data in scientific notation, e.g. 1.23456789e+00. The column "Time stamp" contains text in ISO 8601 format, e.g. 2026-10-21T10:15:03.123456.
- Arrays (1D data) are saved to separate files ending with _Data1D_<n>.txt. The main file then shows "--" in that cell.
From version 1.5.8.7, SweepMe! Pro can also export the data as Excel files (File → Options → Saving).
Origin
Drag and drop the saved data files into Origin and select the standard ASCII import. Long name and unit are filled automatically from the first two header lines. Make sure that the decimal separator is set to point in the options of Origin.
Python
pandas
The easiest way is the package pandas:
import pandas as pd
file = "Name of my data file.txt"
data = pd.read_csv(file, header=[0, 1], delimiter="\t", encoding="utf-8", na_values="--")
# the first two lines (names and units) are used as a two-level header
V = data[("SMU1 Voltage", "V")].to_numpy()
I = data[("SMU1 Current", "A")].to_numpy()
# Syntax: data[("<Module label> <variable>", "<unit>")]
See the documentation of read_csv for all options.
numpy
The data files can also be loaded using the package numpy. Skip the column "Time stamp" (index 1), because it contains text:
import numpy as np
data = np.genfromtxt("mydata.txt", usecols=(0, 2, 3), skip_header=3, delimiter="\t",
missing_values="--", filling_values=np.nan, encoding="utf-8")
# loads the first, third and fourth column, skips the 3 header lines
# and replaces missing values ("--") by nan (not a number)
If all selected columns contain only numbers, the faster function loadtxt can be used:
import numpy as np
data = np.loadtxt("mydata.txt", usecols=(0, 2, 3), skiprows=3, delimiter="\t", encoding="utf-8")
See the numpy documentation of genfromtxt and loadtxt for all options.