Live streams

Collector: battery cyclers and HDF5

Read Neware, BioLogic, Arbin, Maccor, Basytec and Digatron cycler files and HDF5 files from a watched folder.

Battery cyclers and HDF5

Battery cyclers write their own file formats, and most labs already export CSV or Excel from the cycler software. The file watcher (type: files) reads the native files of the common cyclers directly, so the folder the cycler writes to can be watched as it is. Every row keeps its own absolute time stamp: the cycler's test start time plus the elapsed time, or the time stamp the cycler records. Each file is read once, then moved to done; a file that cannot be read is moved to failed with the reason next to it.

Which cycler files are read

CyclerFileHow it is readExtra
Neware (BTS).nda, .ndaxNewareNDA library (BSD licence). The whole file is loaded into memory: a file above max_file_mb (default 500) goes to failed.cyclers
BioLogic (EC-Lab).mprBuilt-in reader. The test start comes from the file's "VMP LOG" module (see below).none
Arbin (MITS Pro).xlsx export, .csv exportThe Channel sheet of the MITS Pro export (Excel), or the CSV, with Test_Time and Date_Time columns.cyclers for Excel
Arbin.resIt is a Microsoft Access database. On Windows: the Microsoft Access Database Engine (matching the bitness of Python) and pyodbc. On Linux or macOS: mdb-export from the mdbtools package. Without either, the file fails with a message to export CSV or Excel from MITS Pro instead.cyclers
Maccor.txt or .csv exportTab-delimited export with the header lines ("Date of Test"). The native .raw is not read: export it from Maccor.none
Basytec.txt exportHeader lines starting with ~, columns such as Time[h], U[V], I[A].none
Digatron.txt or .csv exportColumn names and units recognised by name; the test start from a "Start time" line. Digatron exports vary by version: check one file.none
Anything else (Biologic .mpt, Landt, Novonix, PEC…)CSV exportAs a plain CSV file (see the file watcher).none
Shell
pip install "kymoscope-collector[cyclers]"   # Neware, Arbin Excel and Arbin .res (pyodbc on Windows)
pip install "kymoscope-collector[hdf5]"      # HDF5

Configuration

collector.yaml
streams:
  - name: Customer A
    mode: live                 # live | record (also kept in the cloud)
    sources:
      - name: Cell lab
        type: files
        path: D:/cycler/export          # the folder the cycler software (or you) drops files in
        format: biologic                # or neware, arbin, maccor, basytec, digatron, hdf5 (see format below)
        timezone: Europe/Madrid         # the cycler PC's zone, for files with zone-less times
        min_age_s: 600                  # longer than the logging interval if the folder holds runs still being written

      - name: Maccor exports
        type: files
        path: D:/maccor
        pattern: "*.txt"                # .txt is only picked up by default when format is set
        format: maccor

      - name: Test bench (HDF5)
        type: files
        path: D:/bench
        format: hdf5
        hdf5_group: /run                # every 1-D numeric dataset of the same length as the time dataset
        hdf5_time: time
        start_time: 2026-10-23T10:00:00 # only when the time is relative and the file has no start attribute

The stream declares this source at 1 Hz unless you set hz: on it to the samples a second it really hands on, for example hz: 1. If it hands on more, the collector log says so once: "source 'Cell lab' hands on about … samples a second but is declared at 1: set hz: N on it".

NameTypeDescription
formatauto neware biologic arbin maccor basytec digatron hdf5
Default: auto
With auto and no pattern, only .csv, .parquet, .tdms, .mf4 and .mdf files are picked up, so other files in the folder are left alone; a .csv is still recognised as a Maccor, Basytec, Digatron or Arbin export by its first lines. Set format to pick up the files of that cycler: neware .nda .ndax, biologic .mpr, arbin .res .xlsx .csv .txt, maccor, basytec and digatron .txt .csv, hdf5 .h5 .hdf5. Other files in the folder are then ignored. With auto, a pattern such as "*.mpr" also works: the reader is chosen by extension.
min_age_sseconds
Default: 10, or 120 for cycler files
A file is read once it has not changed for this long. The 120 s default applies to .mpr, .res and .nda files and to every file of a source with format set. See "Files still being written" below.
max_file_mbnumber
Default: 500
Files that must be loaded whole into memory (Neware .nda/.ndax) larger than this go to failed with the reason. Raise it if the computer has the memory; 0 means no limit.
date_orderdmy mdyHow to read slashed dates in text exports, such as 03/04/2026. Without it a date whose day and month can be swapped fails the file with a message, rather than being read in the wrong month; dates such as 23/10/2026 or 10/23/2026 are read either way.
start_timeISO timeThe test start, for files that only have elapsed time and no start date (BioLogic .mpr; HDF5 and text exports without one). Zone-less times are read in timezone. It also overrides the start found in the file.
timezonestringIANA zone name of the cycler computer, for times without a zone (Maccor, Basytec, Neware, Arbin and BioLogic files carry no zone). Default: the zone of the collector computer.
time_formatstringA strptime pattern (for example %d/%m/%Y %H:%M:%S) for text exports whose dates are in none of the usual layouts (slashed, dotted European, ISO).
time_columnstringThe time column of a text export or Excel file, when the automatic choice is wrong.

Channels, units and step types

Channels are named alike for every cycler, so the same dashboard works for all of them: Voltage (V), Current (A), Capacity, Charge capacity and Discharge capacity (Ah), Energy, Charge energy and Discharge energy (Wh), Temperature or Temperature 1 (°C), Cycle and Step (numbers). Values in mA, mAh, mV or hours are converted. Other numeric columns keep their own name and unit. The step type of Neware (Step type: CC_Chg, CV_Chg, Rest…), Maccor (the State column: Charge, Discharge, Rest, Special) and BioLogic (Mode: CC, CV, Rest; Oxidation) is a channel with labels, shown by name.

HDF5 files

HDF5 (.h5, .hdf5) has no standard layout, so the mapping is configurable. Needs the hdf5 extra (h5py, BSD licence). Large files are fine.

NameTypeDescription
hdf5_grouppath
Default: /
The group that holds the datasets. Not searched recursively.
hdf5_timepathThe time dataset, relative to the group or absolute. Default: a dataset named time, timestamp, t or datetime.
hdf5_channelslistThe channel datasets (a list, or names separated by commas). Default: every 1-D numeric dataset of the same length as the time dataset. An explicit dataset of another length fails the file.
hdf5_time_units ms us ns min hThe unit of the time dataset. Default: its units attribute, else seconds (or, for an absolute time, told by its size: see below).
start_timeISO timeThe start of a relative time. Default: an attribute named start_time (also t0, start, Start Time, time_start) on the time dataset, the group or the file.

A time dataset whose first value (in its unit) is above 108 is taken as absolute Unix time; otherwise it is elapsed time from the start. When the dataset has no unit and hdf5_time_unit is not set, an absolute time is read as nanoseconds above 1017, microseconds above 1014, milliseconds above 1011, else seconds. Channels take their unit from a units or unit attribute, and are named after their dataset.

Writing a compatible file
import h5py, numpy as np
with h5py.File("run.h5", "w") as f:
    g = f.create_group("run")
    t = g.create_dataset("time", data=np.arange(0, 600, 0.1))   # seconds since the start
    t.attrs["units"] = "s"
    g.attrs["start_time"] = "2026-10-23T10:00:00Z"              # or set start_time in collector.yaml
    g.create_dataset("voltage", data=...).attrs["units"] = "V"
    g.create_dataset("current", data=...).attrs["units"] = "A"

Files still being written

EC-Lab (.mpr), MITS Pro (.res) and Neware software write to their file for the whole test, and may pause longer than min_age_s between records. A file read in such a pause is read only up to that point and is not read again. Watch a folder of finished files (copy or export each test there when it ends), or set min_age_s above the longest logging interval.

What has been checked

If something does not read

Message or symptomCause
"set the start_time option"The file has only elapsed time and no start date. Set start_time to the test start.
BioLogic times begin at midnightThe start time is read from the "VMP LOG" module of the .mpr. When it is not found there (some EC-Lab versions), only the date is known: times begin at midnight of that day and the collector logs a warning. Set start_time to the real start.
"can be read day first or month first"A slashed date such as 03/04/2026 in a text export. Set date_order to dmy or mdy.
"above max_file_mb"A Neware file too big to load whole. Raise max_file_mb if the computer has the memory, or export CSV from BTSDA.
"cannot read Arbin .res files here"No Access driver (Windows) or mdbtools (elsewhere). Install one, or export CSV/Excel from MITS Pro.
"unsupported BioLogic column id N"The .mpr contains a measurement not in the reader's column table. Export that run to text (.mpt) from EC-Lab and tell us the id.
"nda version N is not yet supported"A newer Neware software version. Update the cyclers extra, or export CSV from BTSDA.
"no column header found"A text export in a layout the presets do not know. Set format, or send us its header line (the column names only, no values).
Times are off by hoursSet timezone to the zone of the cycler computer.