Avantes AvaSoft¶
Status: Supported (scoped) · Vendor: Avantes · Extensions: ASCII
.ttt,.trt,.tit,.tat,.IRR,.txt; legacy binary.TRM,.ABS,.ROH,.DRK,.REF; AvaSoft 8 binary.Raw8,.IRR8(and other*8suffixes)
AvaSoft is the acquisition software for Avantes fibre-optic spectrometers. It
writes both ASCII exports (recommended for interchange) and per-acquisition
binary files in two generations: the legacy AvaSoft 6/7 single-mode layout and
the AvaSoft 8 AVS82/AVS84 container. nirs4all-formats reads the ASCII exports
fully and decodes the binary layouts covered by committed fixtures.
Instruments & software¶
Produced by AvaSoft across the AvaSpec range. ASCII wave tables come from
AvaSoft 6/7 (Wave;... columns) and AvaSoft 8 text exports; binary files are the
native per-measurement records. Reference behaviour was compared against the
documented lightr parser layout and its formulas; lightr is GPL and remains
a conformance reference only — no runtime dependency is linked into the MIT core.
File structure¶
ASCII wave tables — a short metadata preamble, then a
Wave;...header row, an optional units row, and semicolon-delimited columns (axis first). The delimiter is auto-detected..IRRtwo-column whitespace files are parsed as a single irradiance trace.Legacy binary (AvaSoft 6/7) — a 400-byte header stored as little-endian
float32values:version_id(= 70) at byte 0, spectrometer id and user name as float32 ASCII code points, wavelength polynomial coefficientsa0..a4at byte 296,first_pixel/last_pixelat 316/320,measure_modeat 324, then the data at byte 400. The axis isa0 + a1·p + a2·p² + a3·p³ + a4·p⁴for pixel indexp. Processed modes (.TRM,.ABS) interleavescope, white, darktriples; raw modes (.ROH,.DRK,.REF) store one vector plus trailing acquisition values.AvaSoft 8 binary — a 5-byte magic (
AVS82/AVS84), a spectra count, then per-subfile headers carrying subfile length, measurement-mode byte, start/stop pixel, integration time/delay, averages, SPC date, comment, and four float32 payload vectors (xcoord, scope, dark, reference). The reader advances to the next subfile withstart + length + 10.
What nirs4all-formats extracts¶
Signals — one
SpectralRecordper file or AvaSoft 8 subfile, axis innm. Processed modes derive the primary signal: transmittance/reflectance(scope − dark)/(white − dark)·100, absorbance−log10((scope − dark)/(white − dark)). Raw and reference channels are exposed alongside (sample,white_reference,dark_reference,scope). ASCIIDark/Ref/Reference/Samplecolumns are typedraw_counts; processed columns keep their reflectance/transmittance/irradiance types.Metadata (harmonized top level) —
measurement_mode,point_count,first_pixel,last_pixel,integration_time_ms,averages_count,integration_delay; legacy addsdetector_temperature_candversion_id; AvaSoft 8 addsmagic,acquisition_start_date/acquisition_start_time(decoded from the packed SPC date) and, when populated,instrument_serial,operator,comment. Fixed-length C-string fields are cut at the first NUL.Raw vendor block —
metadata.avantespreserves byte-level provenance (spec_id,user_name, wavelength coefficients, raw measure-mode byte, decoded SPC date, smooth/trigger fields).Diagnostics — single-channel legacy raw modes carry
avantes_legacy_single_channel:<mode>:companion_files_required(consumers need the companion files to recompute processed signals). When the AvaSoft 8 extension implies a mode that contradicts the observedmeasure_modebyte, the record carriesavantes_avasoft8_extension_mode_mismatch:expected=…:observed=….
Variants & support status¶
Variant |
Status |
Notes |
|---|---|---|
AvaSoft 6/7 ASCII wave tables ( |
Supported |
Multi-column axis-first tables; per-column signal typing. |
Two-column irradiance ASCII ( |
Supported |
Single irradiance trace. |
AvaSoft 8 text export ( |
Supported |
Raw dark/reference/sample plus processed signal. |
Legacy binary |
Supported (scoped) |
Processed transmittance + channels, or single raw channel. |
Legacy binary |
Supported (scoped) |
Same layout/formula path; no committed fixture yet. |
AvaSoft 8 binary |
Partial |
One subfile per fixture; |
AvaSoft 8 |
Planned |
Recognised by magic but no committed fixtures yet. |
Limitations & known gaps¶
IRR8irradiance calibration is not applied: the primary signal is exposed asirradiancefor discoverability with theavantes_irr8_irradiance_calibration_not_appliedwarning, and the fourth payload vector is exposed asirradiance_calibration(signal typeunknown, values spanning ~1e10 down to ~1e0) rather than a misnamedwhite_reference.Many active AvaSoft 8 suffixes lack committed fixtures, and multi-subfile AVS8 containers are not yet exercised.
The remaining AVS8 acquisition fields are preserved raw but not fully normalized.
Reference readers¶
lightr (GPL) is the layout/formula reference for the binary paths, used only
in the isolated conformance lab. ASCII exports are equally readable with
pandas and R read.table; nirs4all-formats adds axis derivation, signal typing and
provenance. Subprocess conformance reports against lightr are planned once the
local R native chain is available.
Samples & validation¶
Binary fixtures under samples/avantes/ are golden-backed and probe-locked per
suffix: avantes2.TRM (1442 pts, 275.27→1100.13 nm, transmittance
11.840215→−127.179425), avantes_trans.TRM (1623 pts), avantes_reflect.ROH
(scope 805.0→774.3), 1305084U1.DRK/.REF, 1904090M1_0003.Raw8 (1019 pts,
AVS84, mode 0) and eg.IRR8 (1620 pts, AVS84, mode 4, calibration warning).
ASCII fixtures include avantes_export.ttt, avantes_export2.trt,
avantes_export_long.ttt, irr_820_1941.IRR and avasoft8.txt. AvaSoft 8 SPC
dates are unpacked into top-level acquisition_start_date/time metadata while
the raw integer and decoded components remain under metadata.avantes.