Skip to content

Commit

Permalink
fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
wadjih-bencheikh18 committed Oct 25, 2021
1 parent 83c76aa commit 955d9fb
Show file tree
Hide file tree
Showing 10 changed files with 64,822 additions and 99 deletions.
130 changes: 44 additions & 86 deletions CHANGELOG.md

Large diffs are not rendered by default.

3,948 changes: 3,947 additions & 1 deletion examples/data.json

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions examples/example.js → examples/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { join } from 'path';

import { generateSpectrum } from 'spectrum-generator';

import { gsd, optimizePeaks } from '../src';
import { DataType, gsd, optimizePeaks } from '../src';

const peaks = [
{ x: -0.1, y: 0.2, width: 0.3 },
Expand All @@ -20,14 +20,18 @@ const peaks = [
const from = -1;
const to = 1;

const original = generateSpectrum(peaks, { from, to, nbPoints: 101 });
const original = generateSpectrum(peaks, {
from,
to,
nbPoints: 101,
});

let peakList = gsd(original, {
minMaxRatio: 0,
realTopDetection: false,
smoothY: false,
heightFactor: 1,
shape: { kind: 'gaussian' },
shape: { kind: 'gaussian', width: 0 },
});

let optimizedPeaks = optimizePeaks(original, peakList);
Expand Down Expand Up @@ -63,8 +67,8 @@ let reconstructed = generateSpectrum(optimizedPeaks, {
to,
nbPoints: 5001,
});
reconstructed.x = Array.from(reconstructed.x)
reconstructed.y = Array.from(reconstructed.y)
reconstructed.x = Array.from(reconstructed.x);
reconstructed.y = Array.from(reconstructed.y);

original.x = Array.from(original.x);
original.y = Array.from(original.y);
Expand Down
File renamed without changes.
377 changes: 376 additions & 1 deletion src/__tests__/data/C2.json

Large diffs are not rendered by default.

52,084 changes: 52,083 additions & 1 deletion src/__tests__/data/bigLowS2NSpectrum.json

Large diffs are not rendered by default.

1,273 changes: 1,272 additions & 1 deletion src/__tests__/data/broadNMR.json

Large diffs are not rendered by default.

6,499 changes: 6,498 additions & 1 deletion src/__tests__/data/ethylvinylether.json

Large diffs are not rendered by default.

559 changes: 557 additions & 2 deletions src/__tests__/data/infraRed.json

Large diffs are not rendered by default.

37 changes: 36 additions & 1 deletion src/__tests__/data/test.json
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
[[7,9,9.1,9.2,9.3,9.4,9.5,9.6,9.7,9.8,9.9,10,10.1,10.2,10.3,10.4,10.5,10.6,10.7,10.8,10.9,11,11.1,11.2,11.3,11.4,11.5,11.6,11.7,11.8,11.9,12,12.1,12.2,12.3,12.4,12.5,12.6,12.7,12.8,12.9,13,13.1,13.2,13.3,13.4,13.5,13.6,13.7,13.8,13.9,14,14.1,14.2,14.3,14.4,14.5,14.6,14.7,14.8,14.9,15,15.1,15.2,15.3,15.4,15.5,15.6,15.7,15.8,15.9,16,18],[0,1.3670611642005019e-12,7.018086806749659e-12,3.408530039598323e-11,1.566149139777829e-10,6.807955480447043e-10,2.799741264282628e-9,1.0892728768715286e-8,4.0093417978312345e-8,1.3961339042194703e-7,4.5993733696714487e-7,0.0000014334675420984624,0.000004226634174912734,0.000011790142647798723,0.00003111437370683429,0.00007768204955055934,0.00018348387377726662,0.0004100083945771263,0.0008667727242782787,0.001733546091298024,0.0032800711886719187,0.005871498495868112,0.009943347114095245,0.01593068598959557,0.0241465479122752,0.03462542672692695,0.046973848446379925,0.06028934116907687,0.07320700001112898,0.0841007412472281,0.09141030799602905,0.09400723223468063,0.09148237573734981,0.08425429229202339,0.0734587840992098,0.06065939675121234,0.04747989885270652,0.0352766117093386,0.024937897013924,0.016839966447159693,0.010931586752334044,0.0068875528273207405,0.004268351566479456,0.0026429525578170743,0.001658457916881255,0.001062033447037501,0.0006915187612199856,0.00045217216244198535,0.00029227323368097015,0.00018409073424885283,0.00011177068037381833,0.00006493783224280769,0.00003593624229100207,0.00001888916056485795,0.000009414867005196313,0.000004445430848023085,0.0000019873111386235026,8.408686570700081e-7,3.366812086048201e-7,1.2755306072424386e-7,4.5721144094463724e-8,1.5505362353033094e-8,4.974557268319468e-9,1.5100204968309241e-9,4.3363951518037203e-10,1.1781279472885229e-10,3.028124080443153e-11,7.363299670553255e-12,1.6939043561733317e-12,3.6865734785911304e-13,7.590572003661311e-14,1.4785762111538834e-14,0]]
[
[
7, 9, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10, 10.1, 10.2, 10.3,
10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
11.7, 11.8, 11.9, 12, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9,
13, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14, 14.1, 14.2,
14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15, 15.1, 15.2, 15.3, 15.4, 15.5,
15.6, 15.7, 15.8, 15.9, 16, 18
],
[
0, 1.3670611642005019e-12, 7.018086806749659e-12, 3.408530039598323e-11,
1.566149139777829e-10, 6.807955480447043e-10, 2.799741264282628e-9,
1.0892728768715286e-8, 4.0093417978312345e-8, 1.3961339042194703e-7,
4.5993733696714487e-7, 0.0000014334675420984624, 0.000004226634174912734,
0.000011790142647798723, 0.00003111437370683429, 0.00007768204955055934,
0.00018348387377726662, 0.0004100083945771263, 0.0008667727242782787,
0.001733546091298024, 0.0032800711886719187, 0.005871498495868112,
0.009943347114095245, 0.01593068598959557, 0.0241465479122752,
0.03462542672692695, 0.046973848446379925, 0.06028934116907687,
0.07320700001112898, 0.0841007412472281, 0.09141030799602905,
0.09400723223468063, 0.09148237573734981, 0.08425429229202339,
0.0734587840992098, 0.06065939675121234, 0.04747989885270652,
0.0352766117093386, 0.024937897013924, 0.016839966447159693,
0.010931586752334044, 0.0068875528273207405, 0.004268351566479456,
0.0026429525578170743, 0.001658457916881255, 0.001062033447037501,
0.0006915187612199856, 0.00045217216244198535, 0.00029227323368097015,
0.00018409073424885283, 0.00011177068037381833, 0.00006493783224280769,
0.00003593624229100207, 0.00001888916056485795, 0.000009414867005196313,
0.000004445430848023085, 0.0000019873111386235026, 8.408686570700081e-7,
3.366812086048201e-7, 1.2755306072424386e-7, 4.5721144094463724e-8,
1.5505362353033094e-8, 4.974557268319468e-9, 1.5100204968309241e-9,
4.3363951518037203e-10, 1.1781279472885229e-10, 3.028124080443153e-11,
7.363299670553255e-12, 1.6939043561733317e-12, 3.6865734785911304e-13,
7.590572003661311e-14, 1.4785762111538834e-14, 0
]
]

0 comments on commit 955d9fb

Please sign in to comment.