reference
API Reference › Gamry DTA Files
labkit.dta.loadFolder
Read every DTA file below a folder.
Syntax
[items, report] = labkit.dta.loadFolder(rootDir)
[items, report] = labkit.dta.loadFolder(rootDir, expectedKind)
[items, report] = labkit.dta.loadFolder(rootDir, expectedKind, opts)Description
Recursively discovers .dta files with findFiles and passes the resulting list to loadFiles. Unsupported or unreadable files are recorded in report while readable items are retained.
Inputs
rootDir- Character vector or string scalar naming an existing folder.
expectedKind- "auto", "chrono", "eis", or "cvct", with the same normalization as loadFile. Default: "auto".
opts- Optional scalar structure forwarded to loadFiles and loadFile.
Options
pulseMode- Pulse-detection mode used for discovered chrono files. See detectPulses for the legal labels and normalization behavior.
pulseOptions- Scalar structure accepted by detectPulses. When both pulseOptions and pulseMode are present, pulseOptions takes precedence.
Outputs
items- Cell row vector of successfully loaded item structures.
report- loadFiles report with three additional discovery fields.
Output Fields
folder- Requested root folder as a character vector.
filepaths- Cell array of discovered DTA paths in traversal order.
nDiscovered- Number of discovered paths. This equals nRequested.
loaded- Cell array of paths that loaded successfully.
failed- Structure array describing failed inputs.
statuses- One loadFile status per discovered input.
nRequested- Number of discovered paths sent to loadFiles.
nLoaded- Number of successful items.
nFailed- Number of failed inputs.
Errors
Throws labkit:dta:InvalidFolder for an invalid rootDir and labkit:dta:InvalidKind for an unsupported expectedKind.
Typical Call
[items, report] = labkit.dta.loadFolder("experiment", "auto");
fprintf("Found %d DTA files; loaded %d.\n", ...
report.nDiscovered, report.nLoaded)Related APIs
labkit.dta.findFiles— Find DTA files in a folder and its subfolders.labkit.dta.loadFiles— Read a list of Gamry DTA files.labkit.dta.loadFile— Read one supported Gamry DTA file.labkit.dta.detectPulses— Locate cathodic and anodic pulse windows in chrono data.labkit.dta.detectType— Identify the supported Gamry DTA data family in a file.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.
Source
This page is generated from the MATLAB help text in +labkit/+dta/loadFolder.m.