Parse raman WDF file.
$ npm i wdf-parser
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { parse } from 'wdf-parser';
const arrayBuffer = readFileSync(join(__dirname, 'spectra.wdf'));
const result = parse(arrayBuffer);
// result is an object containing everything that was parsed
- parse file header
- parse DATA block
- parse XLIST and YLIST block
- parse ORIGIN block
- parse MAPAREA
- test and write examples on this readme file
Some test files were taken from the a this Github repo.