Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brukerconverter

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brukerconverter - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

17

bower.json
{
"name": "brukerconverter",
"version": "0.0.1",
"main": [
"dist/brukerconverter.js",
"dist/brukerconverter.min.js"
],
"version": "0.1.1",
"main": "build/brukerconverter.js",
"homepage": "https://github.com/cheminfo-js/brukerconverter",

@@ -13,3 +10,9 @@ "authors": [

"description": "Parse and convert Bruker raw data",
"main": "build/brukerconverter.js",
<<<<<<< HEAD
"main": [
"dist/brukerconverter.js",
"dist/brukerconverter.min.js"
]
=======
>>>>>>> origin/master
"moduleType": [

@@ -30,2 +33,2 @@ "amd",

]
}
}
{
"name": "brukerconverter",
"version": "0.1.0",
"version": "0.2.0",
"description": "Parse and convert Bruker raw data",
"main": "./src/index.js",
"main": "./src/brukerconverter.js",
"directories": {

@@ -12,3 +12,3 @@ "lib": "src",

"test": "mocha --require should --reporter mocha-better-spec-reporter --recursive -t 10000",
"build":"cheminfo build"
"build": "cheminfo build --no-uglify --root BrukerConverter"
},

@@ -29,3 +29,3 @@ "keywords": [

"should": "^8.2.2",
"cheminfo-tools":"1.3.4"
"cheminfo-tools": "1.3.4"
},

@@ -32,0 +32,0 @@ "dependencies": {

@@ -11,6 +11,2 @@ "use strict";

module.exports = {
convert: readZIP,
test: convert
};

@@ -174,10 +170,10 @@ function readZIP(zipFile, options) {

var toSave = {
DataType : "TYPE_NMR_SPECTRUM",
DataClass : "DATACLASS_XY",
FirstX : offset,
LastX : offset - SW_p / SF,
XUnits : "PPM",
YUnits : "Arbitrary",
X : new Array(td),
Y : new Array(td)
dataType : "NMR Spectrum",
dataTable : "(X++(R..R))",
firstX : offset,
lastX : offset - SW_p / SF,
xUnit : "PPM",
yUnit : "Arbitrary",
data:[{x:new Array(td),y:new Array(td)}]
};

@@ -188,4 +184,4 @@

for(var k = 0; k < td - 1; ++k) {
toSave.X[k] = x;
toSave.Y[k] = file.readInt32();
toSave.data[0].x[k] = x;
toSave.data[0].y[k] = file.readInt32();
x += SF;

@@ -195,4 +191,4 @@ }

for(k = td - 1; k > 0; --k) {
toSave.X[k] = x;
toSave.Y[k] = file.readInt32();
toSave.data[0].x[k] = x;
toSave.data[0].y[k] = file.readInt32();
x += SF;

@@ -240,12 +236,11 @@ }

var toSave = {
DataType : "TYPE_NMR_FID",
DataClass : "DATACLASS_XY",
NbPoints : td,
FirstX : 0,
LastX : AQ,
Nucleus : spectra.info["$NUC1"] ? spectra.info["$NUC1"] : undefined,
XUnits : "Hz",
YUnits : "Arbitrary",
X : new Array(td),
Y : new Array(td)
dataType : "NMR FID",
dataTable : "(X++(R..R))",
nbPoints : td,
firstX : 0,
lastX : AQ,
nucleus : spectra.info["$NUC1"] ? spectra.info["$NUC1"] : undefined,
xUnit : "Hz",
yUnit : "Arbitrary",
data:[{x:new Array(td),y:new Array(td)}]
};

@@ -258,14 +253,19 @@ spectra.spectra.push(toSave);

for(i = 0; file.available(8); ++i, x += DW) {
spectra.spectra[0].Y[i] = file.readInt32();
spectra.spectra[0].X[i] = x;
spectra.spectra[1].Y[i] = file.readInt32();
spectra.spectra[1].X[i] = x;
spectra.spectra[0].data[0].y[i] = file.readInt32();
spectra.spectra[0].data[0].x[i] = x;
spectra.spectra[1].data[0].y[i] = file.readInt32();
spectra.spectra[1].data[0].x[i] = x;
}
for(; i < td; ++i, x += DW) {
spectra.spectra[0].Y[i] = 0;
spectra.spectra[0].X[i] = x;
spectra.spectra[1].Y[i] = 0;
spectra.spectra[1].X[i] = x;
spectra.spectra[0].data[0].y[i] = 0;
spectra.spectra[0].data[0].x[i] = x;
spectra.spectra[1].data[0].y[i] = 0;
spectra.spectra[1].data[0].x[i] = x;
}
}
}
module.exports = {
convertZip: readZIP,
converFolder: convert
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc