reference
API Reference › Gamry DTA Files
labkit.dta.detectType
Identify the supported Gamry DTA data family in a file.
Syntax
[kind, status] = labkit.dta.detectType(filepath)Description
Reads enough of one DTA file to determine whether it contains EIS, cyclic-voltammetry/charge-time, or chrono data. Detection verifies usable curve columns rather than relying on the filename. A missing or unsupported file is reported in status instead of throwing a read error.
Inputs
filepath- Character vector or string scalar naming one DTA file.
Outputs
kind- String scalar: "chrono", "eis", "cvct", or "unknown".
status- Scalar structure describing detection. ok is true only for a recognized file; message is empty on success and explains failure otherwise; kind repeats the detected value; and filepath contains the normalized character-vector path.
Errors
Throws labkit:dta:InvalidFilepath when filepath is not a character vector or string scalar.
Example
[kind, status] = labkit.dta.detectType("experiment.DTA");
if status.ok
fprintf("Detected %s data.\n", kind)
else
warning("%s", status.message)
endRelated APIs
labkit.dta.loadFile— Read one supported Gamry DTA file.labkit.dta.findFiles— Find DTA files in a folder and its subfolders.labkit.dta.detectPulses— Locate cathodic and anodic pulse windows in chrono data.labkit.dta.getColumn— Extract a named column from a parsed DTA table.labkit.dta.getCurveXY— Extract paired X and Y data from a parsed CV/CT curve.labkit.dta.getMainCurve— Select the transient table containing T, Vf, and Im data.labkit.dta.getZCurve— Select the impedance table from parsed EIS data.labkit.dta.loadFiles— Read a list of Gamry DTA files.
Source
This page is generated from the MATLAB help text in +labkit/+dta/detectType.m.