Skip to content

cheminfo/wdf-parser

Repository files navigation

wdf-parser

NPM version build status Test coverage npm download

Parse raman WDF file.

Installation

$ npm i wdf-parser

Usage

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

Examples

Useful Links

ToDo

  • 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.

License

MIT