Socket
Book a DemoInstallSign in
Socket

biologic-converter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

biologic-converter

Convert biologic file format

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

biologic-converter

NPM version build status Test coverage npm download

Convert BioLogic file format.

There are 3 possible extensions:

  • .mpr : Raw binary file containing the data
  • .mpt : .mpr into Text file
  • .mps : experiment Settings text file.

Other files: sometimes the data may be in a .txt file. This is very rare but if this is the case, report it and we will add support for these. Other files created by the software are ignored by the parser.

Installation

npm i biologic-converter

Usage

import { readFileSync as rfs } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';

// import the parser you need
import { parseMPR, /*parseMPT, parseMPS*/ } from 'biologic-converter';

// build the path
const __dirname = dirname(fileURLToPath(import.meta.url))
// get buffer
const mpr = rfs(join(__dirname, 'testDirectory/ca/ca.mpr'));
const result = parseMPR(mpr); //JSON-like object
console.log(result)
**Sample output**
{
  name: 'BIO-LOGIC MODULAR FILE',
  settings: {
    header: {
      shortName: 'VMP Set',
      longName: 'VMP settings',
      length: 6691,
      version: 0,
      date: '04/29/19'
    },
    variables: {
      technique: 'CA',
      comments: '',
      activeMaterialMass: 0.875,
      atX: 0,
      molecularWeight: 0.0010000000474974513,
      atomicWeight: 0.0010000000474974513,
      //...
      params: [Object]
    }
  },
  data: {
    header: {
      shortName: 'VMP data',
      longName: 'VMP data',
      length: 55923,
      version: 3,
      date: '04/29/19'
    },
    variables: {
      z: [Object],
      y: [Object],
      x: [Object],
      w: [Object],
      //...
    }
  },
  log: {
    header: {
      shortName: 'VMP LOG',
      longName: 'VMP LOG',
      length: 7742,
      version: 0,
      date: '05/01/19'
    },
    variables: {
      runOnChannel: [Object],
      eweControlRange: [Object],
      oleTimestamp: 43584.65494212963,
      //...
    }
  }
}

License

MIT

Test files from https://github.com/dgbowl/yadg

FAQs

Package last updated on 21 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts