jcampconverter 8.2.2 → 8.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/lib/2d/add2D.d.ts +2 -0
  2. package/lib/2d/add2D.d.ts.map +1 -0
  3. package/lib/2d/add2D.js +17 -0
  4. package/lib/2d/add2D.js.map +1 -0
  5. package/lib/2d/convertTo3DZ.d.ts +11 -0
  6. package/lib/2d/convertTo3DZ.d.ts.map +1 -0
  7. package/lib/2d/convertTo3DZ.js +59 -0
  8. package/lib/2d/convertTo3DZ.js.map +1 -0
  9. package/lib/2d/generateContourLines.d.ts +8 -0
  10. package/lib/2d/generateContourLines.d.ts.map +1 -0
  11. package/lib/2d/generateContourLines.js +163 -0
  12. package/lib/2d/generateContourLines.js.map +1 -0
  13. package/lib/complexChromatogram.d.ts +4 -0
  14. package/lib/complexChromatogram.d.ts.map +1 -0
  15. package/lib/complexChromatogram.js +49 -0
  16. package/lib/complexChromatogram.js.map +1 -0
  17. package/lib/convert.d.ts +139 -0
  18. package/lib/convert.d.ts.map +1 -0
  19. package/lib/convert.js +383 -0
  20. package/lib/convert.js.map +1 -0
  21. package/lib/convertToFloatArray.d.ts +2 -0
  22. package/lib/convertToFloatArray.d.ts.map +1 -0
  23. package/lib/convertToFloatArray.js +11 -0
  24. package/lib/convertToFloatArray.js.map +1 -0
  25. package/lib/createTree.d.ts +29 -0
  26. package/lib/createTree.d.ts.map +1 -0
  27. package/lib/createTree.js +98 -0
  28. package/lib/createTree.js.map +1 -0
  29. package/lib/index.d.ts +3 -0
  30. package/lib/index.d.ts.map +1 -0
  31. package/lib/index.js +8 -1214
  32. package/lib/index.js.map +1 -0
  33. package/lib/parse/fastParseXYData.d.ts +2 -0
  34. package/lib/parse/fastParseXYData.d.ts.map +1 -0
  35. package/lib/parse/fastParseXYData.js +192 -0
  36. package/lib/parse/fastParseXYData.js.map +1 -0
  37. package/lib/parse/parsePeakTable.d.ts +2 -0
  38. package/lib/parse/parsePeakTable.d.ts.map +1 -0
  39. package/lib/parse/parsePeakTable.js +67 -0
  40. package/lib/parse/parsePeakTable.js.map +1 -0
  41. package/lib/parse/parseXYA.d.ts +2 -0
  42. package/lib/parse/parseXYA.d.ts.map +1 -0
  43. package/lib/parse/parseXYA.js +17 -0
  44. package/lib/parse/parseXYA.js.map +1 -0
  45. package/lib/postProcessing.d.ts +2 -0
  46. package/lib/postProcessing.d.ts.map +1 -0
  47. package/lib/postProcessing.js +50 -0
  48. package/lib/postProcessing.js.map +1 -0
  49. package/lib/postProcessingNMR.d.ts +2 -0
  50. package/lib/postProcessingNMR.d.ts.map +1 -0
  51. package/lib/postProcessingNMR.js +94 -0
  52. package/lib/postProcessingNMR.js.map +1 -0
  53. package/lib/prepareNtuplesDatatable.d.ts +2 -0
  54. package/lib/prepareNtuplesDatatable.d.ts.map +1 -0
  55. package/lib/prepareNtuplesDatatable.js +87 -0
  56. package/lib/prepareNtuplesDatatable.js.map +1 -0
  57. package/lib/prepareSpectrum.d.ts +2 -0
  58. package/lib/prepareSpectrum.d.ts.map +1 -0
  59. package/lib/prepareSpectrum.js +10 -0
  60. package/lib/prepareSpectrum.js.map +1 -0
  61. package/lib/profiling.d.ts +2 -0
  62. package/lib/profiling.d.ts.map +1 -0
  63. package/lib/profiling.js +12 -0
  64. package/lib/profiling.js.map +1 -0
  65. package/lib/simpleChromatogram.d.ts +2 -0
  66. package/lib/simpleChromatogram.d.ts.map +1 -0
  67. package/lib/simpleChromatogram.js +16 -0
  68. package/lib/simpleChromatogram.js.map +1 -0
  69. package/lib-esm/2d/add2D.d.ts +2 -0
  70. package/lib-esm/2d/add2D.d.ts.map +1 -0
  71. package/lib-esm/2d/add2D.js +11 -0
  72. package/lib-esm/2d/add2D.js.map +1 -0
  73. package/lib-esm/2d/convertTo3DZ.d.ts +11 -0
  74. package/lib-esm/2d/convertTo3DZ.d.ts.map +1 -0
  75. package/lib-esm/2d/convertTo3DZ.js +53 -0
  76. package/lib-esm/2d/convertTo3DZ.js.map +1 -0
  77. package/lib-esm/2d/generateContourLines.d.ts +8 -0
  78. package/lib-esm/2d/generateContourLines.d.ts.map +1 -0
  79. package/lib-esm/2d/generateContourLines.js +160 -0
  80. package/lib-esm/2d/generateContourLines.js.map +1 -0
  81. package/lib-esm/complexChromatogram.d.ts +4 -0
  82. package/lib-esm/complexChromatogram.d.ts.map +1 -0
  83. package/lib-esm/complexChromatogram.js +43 -0
  84. package/lib-esm/complexChromatogram.js.map +1 -0
  85. package/lib-esm/convert.d.ts +139 -0
  86. package/lib-esm/convert.d.ts.map +1 -0
  87. package/lib-esm/convert.js +376 -0
  88. package/lib-esm/convert.js.map +1 -0
  89. package/lib-esm/convertToFloatArray.d.ts +2 -0
  90. package/lib-esm/convertToFloatArray.d.ts.map +1 -0
  91. package/lib-esm/convertToFloatArray.js +8 -0
  92. package/lib-esm/convertToFloatArray.js.map +1 -0
  93. package/lib-esm/createTree.d.ts +29 -0
  94. package/lib-esm/createTree.d.ts.map +1 -0
  95. package/lib-esm/createTree.js +94 -0
  96. package/lib-esm/createTree.js.map +1 -0
  97. package/lib-esm/index.d.ts +3 -0
  98. package/lib-esm/index.d.ts.map +1 -0
  99. package/lib-esm/index.js +3 -0
  100. package/lib-esm/index.js.map +1 -0
  101. package/lib-esm/parse/fastParseXYData.d.ts +2 -0
  102. package/lib-esm/parse/fastParseXYData.d.ts.map +1 -0
  103. package/lib-esm/parse/fastParseXYData.js +189 -0
  104. package/lib-esm/parse/fastParseXYData.js.map +1 -0
  105. package/lib-esm/parse/parsePeakTable.d.ts +2 -0
  106. package/lib-esm/parse/parsePeakTable.d.ts.map +1 -0
  107. package/lib-esm/parse/parsePeakTable.js +64 -0
  108. package/lib-esm/parse/parsePeakTable.js.map +1 -0
  109. package/lib-esm/parse/parseXYA.d.ts +2 -0
  110. package/lib-esm/parse/parseXYA.d.ts.map +1 -0
  111. package/lib-esm/parse/parseXYA.js +14 -0
  112. package/lib-esm/parse/parseXYA.js.map +1 -0
  113. package/lib-esm/postProcessing.d.ts +2 -0
  114. package/lib-esm/postProcessing.d.ts.map +1 -0
  115. package/lib-esm/postProcessing.js +44 -0
  116. package/lib-esm/postProcessing.js.map +1 -0
  117. package/lib-esm/postProcessingNMR.d.ts +2 -0
  118. package/lib-esm/postProcessingNMR.d.ts.map +1 -0
  119. package/lib-esm/postProcessingNMR.js +91 -0
  120. package/lib-esm/postProcessingNMR.js.map +1 -0
  121. package/lib-esm/prepareNtuplesDatatable.d.ts +2 -0
  122. package/lib-esm/prepareNtuplesDatatable.d.ts.map +1 -0
  123. package/lib-esm/prepareNtuplesDatatable.js +84 -0
  124. package/lib-esm/prepareNtuplesDatatable.js.map +1 -0
  125. package/lib-esm/prepareSpectrum.d.ts +2 -0
  126. package/lib-esm/prepareSpectrum.d.ts.map +1 -0
  127. package/lib-esm/prepareSpectrum.js +7 -0
  128. package/lib-esm/prepareSpectrum.js.map +1 -0
  129. package/lib-esm/profiling.d.ts +2 -0
  130. package/lib-esm/profiling.d.ts.map +1 -0
  131. package/lib-esm/profiling.js +9 -0
  132. package/lib-esm/profiling.js.map +1 -0
  133. package/lib-esm/simpleChromatogram.d.ts +2 -0
  134. package/lib-esm/simpleChromatogram.d.ts.map +1 -0
  135. package/lib-esm/simpleChromatogram.js +13 -0
  136. package/lib-esm/simpleChromatogram.js.map +1 -0
  137. package/package.json +22 -17
  138. package/src/convert.js +57 -13
  139. package/src/createTree.js +16 -3
  140. package/CHANGELOG.md +0 -427
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
@@ -0,0 +1,2 @@
1
+ export default function fastParseXYData(spectrum: any, value: any): void;
2
+ //# sourceMappingURL=fastParseXYData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastParseXYData.d.ts","sourceRoot":"","sources":["../../src/parse/fastParseXYData.js"],"names":[],"mappings":"AAAA,yEA4KC"}
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function fastParseXYData(spectrum, value) {
4
+ // TODO need to deal with result
5
+ // console.log(value);
6
+ // we check if deltaX is defined otherwise we calculate it
7
+ let yFactor = spectrum.yFactor;
8
+ let deltaX = spectrum.deltaX;
9
+ spectrum.isXYdata = true;
10
+ let currentData = { x: [], y: [] };
11
+ spectrum.data = currentData;
12
+ let currentX = spectrum.firstX;
13
+ let currentY = spectrum.firstY;
14
+ // we skip the first line
15
+ //
16
+ let endLine = false;
17
+ let ascii;
18
+ let i = 0;
19
+ for (; i < value.length; i++) {
20
+ ascii = value.charCodeAt(i);
21
+ if (ascii === 13 || ascii === 10) {
22
+ endLine = true;
23
+ }
24
+ else {
25
+ if (endLine)
26
+ break;
27
+ }
28
+ }
29
+ // we proceed taking the i after the first line
30
+ let newLine = true;
31
+ let isDifference = false;
32
+ let isLastDifference = false;
33
+ let lastDifference = 0;
34
+ let isDuplicate = false;
35
+ let inComment = false;
36
+ let currentValue = 0; // can be a difference or a duplicate
37
+ let lastValue = 0; // must be the real last value
38
+ let isNegative = false;
39
+ let inValue = false;
40
+ let skipFirstValue = false;
41
+ let decimalPosition = 0;
42
+ for (; i <= value.length; i++) {
43
+ if (i === value.length)
44
+ ascii = 13;
45
+ else
46
+ ascii = value.charCodeAt(i);
47
+ if (inComment) {
48
+ // we should ignore the text if we are after $$
49
+ if (ascii === 13 || ascii === 10) {
50
+ newLine = true;
51
+ inComment = false;
52
+ }
53
+ }
54
+ else {
55
+ // when is it a new value ?
56
+ // when it is not a digit, . or comma
57
+ // it is a number that is either new or we continue
58
+ if (ascii <= 57 && ascii >= 48) {
59
+ // a number
60
+ inValue = true;
61
+ if (decimalPosition > 0) {
62
+ currentValue += (ascii - 48) / Math.pow(10, decimalPosition++);
63
+ }
64
+ else {
65
+ currentValue *= 10;
66
+ currentValue += ascii - 48;
67
+ }
68
+ }
69
+ else if (ascii === 44 || ascii === 46) {
70
+ // a "," or "."
71
+ inValue = true;
72
+ decimalPosition++;
73
+ }
74
+ else {
75
+ if (inValue) {
76
+ // need to process the previous value
77
+ if (newLine) {
78
+ newLine = false; // we don't check the X value
79
+ // console.log("NEW LINE",isDifference, lastDifference);
80
+ // if new line and lastDifference, the first value is just a check !
81
+ // that we don't check ...
82
+ if (isLastDifference)
83
+ skipFirstValue = true;
84
+ }
85
+ else {
86
+ // need to deal with duplicate and differences
87
+ if (skipFirstValue) {
88
+ skipFirstValue = false;
89
+ }
90
+ else {
91
+ if (isDifference) {
92
+ lastDifference = isNegative ? 0 - currentValue : currentValue;
93
+ isLastDifference = true;
94
+ isDifference = false;
95
+ }
96
+ else if (!isDuplicate) {
97
+ lastValue = isNegative ? 0 - currentValue : currentValue;
98
+ }
99
+ let duplicate = isDuplicate ? currentValue - 1 : 1;
100
+ for (let j = 0; j < duplicate; j++) {
101
+ if (isLastDifference) {
102
+ currentY += lastDifference;
103
+ }
104
+ else {
105
+ currentY = lastValue;
106
+ }
107
+ currentData.x.push(currentX);
108
+ currentData.y.push(currentY * yFactor);
109
+ currentX += deltaX;
110
+ }
111
+ }
112
+ }
113
+ isNegative = false;
114
+ currentValue = 0;
115
+ decimalPosition = 0;
116
+ inValue = false;
117
+ isDuplicate = false;
118
+ }
119
+ // positive SQZ digits @ A B C D E F G H I (ascii 64-73)
120
+ if (ascii < 74 && ascii > 63) {
121
+ inValue = true;
122
+ isLastDifference = false;
123
+ currentValue = ascii - 64;
124
+ }
125
+ else if (ascii > 96 && ascii < 106) {
126
+ // negative SQZ digits a b c d e f g h i (ascii 97-105)
127
+ inValue = true;
128
+ isLastDifference = false;
129
+ currentValue = ascii - 96;
130
+ isNegative = true;
131
+ }
132
+ else if (ascii === 115) {
133
+ // DUP digits S T U V W X Y Z s (ascii 83-90, 115)
134
+ inValue = true;
135
+ isDuplicate = true;
136
+ currentValue = 9;
137
+ }
138
+ else if (ascii > 82 && ascii < 91) {
139
+ inValue = true;
140
+ isDuplicate = true;
141
+ currentValue = ascii - 82;
142
+ }
143
+ else if (ascii > 73 && ascii < 83) {
144
+ // positive DIF digits % J K L M N O P Q R (ascii 37, 74-82)
145
+ inValue = true;
146
+ isDifference = true;
147
+ currentValue = ascii - 73;
148
+ }
149
+ else if (ascii > 105 && ascii < 115) {
150
+ // negative DIF digits j k l m n o p q r (ascii 106-114)
151
+ inValue = true;
152
+ isDifference = true;
153
+ currentValue = ascii - 105;
154
+ isNegative = true;
155
+ }
156
+ else if (ascii === 36 && value.charCodeAt(i + 1) === 36) {
157
+ // $ sign, we need to check the next one
158
+ inValue = true;
159
+ inComment = true;
160
+ }
161
+ else if (ascii === 37) {
162
+ // positive DIF digits % J K L M N O P Q R (ascii 37, 74-82)
163
+ inValue = true;
164
+ isDifference = true;
165
+ currentValue = 0;
166
+ isNegative = false;
167
+ }
168
+ else if (ascii === 45) {
169
+ // a "-"
170
+ // check if after there is a number, decimal or comma
171
+ let ascii2 = value.charCodeAt(i + 1);
172
+ if ((ascii2 >= 48 && ascii2 <= 57) ||
173
+ ascii2 === 44 ||
174
+ ascii2 === 46) {
175
+ inValue = true;
176
+ if (!newLine)
177
+ isLastDifference = false;
178
+ isNegative = true;
179
+ }
180
+ }
181
+ else if (ascii === 13 || ascii === 10) {
182
+ newLine = true;
183
+ inComment = false;
184
+ }
185
+ // and now analyse the details ... space or tabulation
186
+ // if "+" we just don't care
187
+ }
188
+ }
189
+ }
190
+ }
191
+ exports.default = fastParseXYData;
192
+ //# sourceMappingURL=fastParseXYData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastParseXYData.js","sourceRoot":"","sources":["../../src/parse/fastParseXYData.js"],"names":[],"mappings":";;AAAA,SAAwB,eAAe,CAAC,QAAQ,EAAE,KAAK;IACrD,gCAAgC;IAChC,uBAAuB;IACvB,0DAA0D;IAE1D,IAAI,OAAO,GAAG,QAAQ,CAAC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AAK,CAAC;iBACpB;qBAAM,IAAI,KAAK,KAAK,EAAE,EAAE;oBACvB,QAAQ;oBACR,qDAAqD;oBACrD,IAAI,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACrC,IACE,CAAC,MAAM,IAAI,EAAE,IAAI,MAAM,IAAI,EAAE,CAAC;wBAC9B,MAAM,KAAK,EAAE;wBACb,MAAM,KAAK,EAAE,EACb;wBACA,OAAO,GAAG,IAAI,CAAC;wBACf,IAAI,CAAC,OAAO;4BAAE,gBAAgB,GAAG,KAAK,CAAC;wBACvC,UAAU,GAAG,IAAI,CAAC;qBACnB;iBACF;qBAAM,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,EAAE,EAAE;oBACvC,OAAO,GAAG,IAAI,CAAC;oBACf,SAAS,GAAG,KAAK,CAAC;iBACnB;gBACD,sDAAsD;gBACtD,4BAA4B;aAC7B;SACF;KACF;AACH,CAAC;AA5KD,kCA4KC"}
@@ -0,0 +1,2 @@
1
+ export default function parsePeakTable(spectrum: any, value: any, result: any): void;
2
+ //# sourceMappingURL=parsePeakTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsePeakTable.d.ts","sourceRoot":"","sources":["../../src/parse/parsePeakTable.js"],"names":[],"mappings":"AAGA,qFAeC"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const removeCommentRegExp = /\$\$.*/;
4
+ const peakTableSplitRegExp = /[,\t ]+/;
5
+ function parsePeakTable(spectrum, value, result) {
6
+ spectrum.isPeaktable = true;
7
+ if (!spectrum.variables || Object.keys(spectrum.variables) === 2) {
8
+ parseXY(spectrum, value, result);
9
+ }
10
+ else {
11
+ parseXYZ(spectrum, value, result);
12
+ }
13
+ // we will add the data in the variables
14
+ if (spectrum.variables) {
15
+ for (let key in spectrum.variables) {
16
+ spectrum.variables[key].data = spectrum.data[key];
17
+ }
18
+ }
19
+ }
20
+ exports.default = parsePeakTable;
21
+ function parseXY(spectrum, value, result) {
22
+ let currentData = { x: [], y: [] };
23
+ spectrum.data = currentData;
24
+ // counts for around 20% of the time
25
+ let lines = value.split(/,? *,?[;\r\n]+ */);
26
+ for (let i = 1; i < lines.length; i++) {
27
+ let values = lines[i]
28
+ .trim()
29
+ .replace(removeCommentRegExp, '')
30
+ .split(peakTableSplitRegExp);
31
+ if (values.length % 2 === 0) {
32
+ for (let j = 0; j < values.length; j = j + 2) {
33
+ // takes around 40% of the time to add and parse the 2 values nearly exclusively because of Number
34
+ currentData.x.push(Number(values[j]) * spectrum.xFactor);
35
+ currentData.y.push(Number(values[j + 1]) * spectrum.yFactor);
36
+ }
37
+ }
38
+ else {
39
+ result.logs.push(`Format error: ${values}`);
40
+ }
41
+ }
42
+ }
43
+ function parseXYZ(spectrum, value, result) {
44
+ let currentData = {};
45
+ let variables = Object.keys(spectrum.variables);
46
+ let numberOfVariables = variables.length;
47
+ variables.forEach((variable) => (currentData[variable] = []));
48
+ spectrum.data = currentData;
49
+ // counts for around 20% of the time
50
+ let lines = value.split(/,? *,?[;\r\n]+ */);
51
+ for (let i = 1; i < lines.length; i++) {
52
+ let values = lines[i]
53
+ .trim()
54
+ .replace(removeCommentRegExp, '')
55
+ .split(peakTableSplitRegExp);
56
+ if (values.length % numberOfVariables === 0) {
57
+ for (let j = 0; j < values.length; j++) {
58
+ // todo should try to find a xFactor (y, ...)
59
+ currentData[variables[j % numberOfVariables]].push(Number(values[j]));
60
+ }
61
+ }
62
+ else {
63
+ result.logs.push(`Format error: ${values}`);
64
+ }
65
+ }
66
+ }
67
+ //# sourceMappingURL=parsePeakTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsePeakTable.js","sourceRoot":"","sources":["../../src/parse/parsePeakTable.js"],"names":[],"mappings":";;AAAA,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AACrC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAEvC,SAAwB,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CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,6CAA6C;gBAC7C,WAAW,CAAC,SAAS,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvE;SACF;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,MAAM,EAAE,CAAC,CAAC;SAC7C;KACF;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function parseXYA(spectrum: any, value: any): void;
2
+ //# sourceMappingURL=parseXYA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseXYA.d.ts","sourceRoot":"","sources":["../../src/parse/parseXYA.js"],"names":[],"mappings":"AAAA,kEAeC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function parseXYA(spectrum, value) {
4
+ let removeSymbolRegExp = /(\(+|\)+|<+|>+|\s+)/g;
5
+ spectrum.isXYAdata = true;
6
+ let values;
7
+ let currentData = { x: [], y: [] };
8
+ spectrum.data = currentData;
9
+ let lines = value.split(/,? *,?[;\r\n]+ */);
10
+ for (let i = 1; i < lines.length; i++) {
11
+ values = lines[i].trim().replace(removeSymbolRegExp, '').split(',');
12
+ currentData.x.push(Number(values[0]));
13
+ currentData.y.push(Number(values[1]));
14
+ }
15
+ }
16
+ exports.default = parseXYA;
17
+ //# sourceMappingURL=parseXYA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseXYA.js","sourceRoot":"","sources":["../../src/parse/parseXYA.js"],"names":[],"mappings":";;AAAA,SAAwB,QAAQ,CAAC,QAAQ,EAAE,KAAK;IAC9C,IAAI,kBAAkB,GAAG,sBAAsB,CAAC;IAEhD,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,IAAI,MAAM,CAAC;IACX,IAAI,WAAW,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACnC,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;IAE5B,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC;AACH,CAAC;AAfD,2BAeC"}
@@ -0,0 +1,2 @@
1
+ export default function postProcessing(entriesFlat: any, result: any, options: any): void;
2
+ //# sourceMappingURL=postProcessing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postProcessing.d.ts","sourceRoot":"","sources":["../src/postProcessing.js"],"names":[],"mappings":"AAMA,0FAyCC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const add2D_1 = __importDefault(require("./2d/add2D"));
7
+ const complexChromatogram_1 = require("./complexChromatogram");
8
+ const postProcessingNMR_1 = __importDefault(require("./postProcessingNMR"));
9
+ const profiling_1 = __importDefault(require("./profiling"));
10
+ const simpleChromatogram_1 = __importDefault(require("./simpleChromatogram"));
11
+ function postProcessing(entriesFlat, result, options) {
12
+ // converting Hz to ppm
13
+ (0, postProcessingNMR_1.default)(entriesFlat);
14
+ for (let entry of entriesFlat) {
15
+ if (Object.keys(entry.ntuples).length > 0) {
16
+ let newNtuples = [];
17
+ let keys = Object.keys(entry.ntuples);
18
+ for (let i = 0; i < keys.length; i++) {
19
+ let key = keys[i];
20
+ let values = entry.ntuples[key];
21
+ for (let j = 0; j < values.length; j++) {
22
+ if (!newNtuples[j])
23
+ newNtuples[j] = {};
24
+ newNtuples[j][key] = values[j];
25
+ }
26
+ }
27
+ entry.ntuples = newNtuples;
28
+ }
29
+ if (entry.twoD && options.wantXY) {
30
+ (0, add2D_1.default)(entry, options);
31
+ (0, profiling_1.default)(result, 'Finished countour plot calculation', options);
32
+ if (!options.keepSpectra) {
33
+ delete entry.spectra;
34
+ }
35
+ }
36
+ // maybe it is a GC (HPLC) / MS. In this case we add a new format
37
+ if (options.chromatogram) {
38
+ if (entry.spectra.length > 1) {
39
+ (0, complexChromatogram_1.complexChromatogram)(entry);
40
+ }
41
+ else {
42
+ (0, simpleChromatogram_1.default)(entry);
43
+ }
44
+ (0, profiling_1.default)(result, 'Finished chromatogram calculation', options);
45
+ }
46
+ delete entry.tmp;
47
+ }
48
+ }
49
+ exports.default = postProcessing;
50
+ //# sourceMappingURL=postProcessing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postProcessing.js","sourceRoot":"","sources":["../src/postProcessing.js"],"names":[],"mappings":";;;;;AAAA,uDAA+B;AAC/B,+DAA4D;AAC5D,4EAAoD;AACpD,4DAAoC;AACpC,8EAAsD;AAEtD,SAAwB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO;IACjE,uBAAuB;IACvB,IAAA,2BAAiB,EAAC,WAAW,CAAC,CAAC;IAE/B,KAAK,IAAI,KAAK,IAAI,WAAW,EAAE;QAC7B,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACzC,IAAI,UAAU,GAAG,EAA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AAC,GAAG,CAAC;KAClB;AACH,CAAC;AAzCD,iCAyCC"}
@@ -0,0 +1,2 @@
1
+ export default function postProcessingNMR(entriesFlat: any): void;
2
+ //# sourceMappingURL=postProcessingNMR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postProcessingNMR.d.ts","sourceRoot":"","sources":["../src/postProcessingNMR.js"],"names":[],"mappings":"AAEA,kEA4FC"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const nmr_processing_1 = require("nmr-processing");
4
+ function postProcessingNMR(entriesFlat) {
5
+ // specific NMR functions
6
+ for (let entry of entriesFlat) {
7
+ let observeFrequency = 0;
8
+ let shiftOffsetVal = 0;
9
+ for (let spectrum of entry.spectra) {
10
+ if (entry.ntuples && entry.ntuples.symbol) {
11
+ if (!observeFrequency && spectrum.observeFrequency) {
12
+ observeFrequency = spectrum.observeFrequency;
13
+ }
14
+ if (!shiftOffsetVal && spectrum.shiftOffsetVal) {
15
+ shiftOffsetVal = spectrum.shiftOffsetVal;
16
+ }
17
+ }
18
+ else {
19
+ observeFrequency = spectrum.observeFrequency;
20
+ shiftOffsetVal = spectrum.shiftOffsetVal;
21
+ }
22
+ if (observeFrequency) {
23
+ if (spectrum.xUnits && spectrum.xUnits.toUpperCase().includes('HZ')) {
24
+ spectrum.xUnits = 'PPM';
25
+ spectrum.xFactor = spectrum.xFactor / observeFrequency;
26
+ spectrum.firstX = spectrum.firstX / observeFrequency;
27
+ spectrum.lastX = spectrum.lastX / observeFrequency;
28
+ spectrum.deltaX = spectrum.deltaX / observeFrequency;
29
+ for (let i = 0; i < spectrum.data.x.length; i++) {
30
+ spectrum.data.x[i] /= observeFrequency;
31
+ }
32
+ }
33
+ }
34
+ if (shiftOffsetVal) {
35
+ let shift = spectrum.firstX - shiftOffsetVal;
36
+ spectrum.firstX = spectrum.firstX - shift;
37
+ spectrum.lastX = spectrum.lastX - shift;
38
+ for (let i = 0; i < spectrum.data.x.length; i++) {
39
+ spectrum.data.x[i] -= shift;
40
+ }
41
+ }
42
+ // we will check if some nucleus are missing ...
43
+ if (entry.ntuples && entry.ntuples.nucleus && entry.ntuples.symbol) {
44
+ for (let i = 0; i < entry.ntuples.nucleus.length; i++) {
45
+ let symbol = entry.ntuples.symbol[i];
46
+ let nucleus = entry.ntuples.nucleus[i];
47
+ if (symbol.startsWith('F') && !nucleus) {
48
+ if (symbol === 'F1') {
49
+ // if F1 is defined we will use F2
50
+ if (entry.tmp.$NUC2) {
51
+ entry.ntuples.nucleus[i] = entry.tmp.$NUC2;
52
+ }
53
+ else {
54
+ let f2index = entry.ntuples.symbol.indexOf('F2');
55
+ if (f2index && entry.ntuples.nucleus[f2index]) {
56
+ entry.ntuples.nucleus[i] = entry.ntuples.nucleus[f2index];
57
+ }
58
+ }
59
+ }
60
+ if (symbol === 'F2')
61
+ entry.ntuples.nucleus[i] = entry.tmp.$NUC1;
62
+ }
63
+ if (symbol === 'F2') {
64
+ entry.yType = entry.ntuples.nucleus[0];
65
+ }
66
+ }
67
+ }
68
+ if (observeFrequency &&
69
+ entry.ntuples &&
70
+ entry.ntuples.symbol &&
71
+ entry.ntuples.nucleus) {
72
+ let unit = '';
73
+ let pageSymbolIndex = entry.ntuples.symbol.indexOf(spectrum.pageSymbol);
74
+ if (entry.ntuples.units && entry.ntuples.units[pageSymbolIndex]) {
75
+ unit = entry.ntuples.units[pageSymbolIndex];
76
+ }
77
+ if (unit !== 'PPM') {
78
+ if (pageSymbolIndex !== 0) {
79
+ throw Error('Not sure about this ntuples format');
80
+ }
81
+ let ratio0 = nmr_processing_1.gyromagneticRatio[entry.ntuples.nucleus[0]];
82
+ let ratio1 = nmr_processing_1.gyromagneticRatio[entry.ntuples.nucleus[1]];
83
+ if (!ratio0 || !ratio1) {
84
+ throw Error('Problem with determination of gyromagnetic ratio');
85
+ }
86
+ let ratio = (ratio0 / ratio1) * observeFrequency;
87
+ spectrum.pageValue /= ratio;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ exports.default = postProcessingNMR;
94
+ //# sourceMappingURL=postProcessingNMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postProcessingNMR.js","sourceRoot":"","sources":["../src/postProcessingNMR.js"],"names":[],"mappings":";;AAAA,mDAAmD;AAEnD,SAAwB,iBAAiB,CAAC,WAAW;IACnD,yBAAyB;IAEzB,KAAK,IAAI,KAAK,IAAI,WAAW,EAAE;QAC7B,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,KAAK,IAAI,QAAQ,IAAI,KAAK,CAAC,OAAO,EAAE;YAClC,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;gBACzC,IAAI,CAAC,gBAAgB,IAAI,QAAQ,CAAC,gBAAgB,EAAE;oBAClD,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;iBAC9C;gBACD,IAAI,CAAC,cAAc,IAAI,QAAQ,CAAC,cAAc,EAAE;oBAC9C,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;iBAC1C;aACF;iBAAM;gBACL,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;gBAC7C,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;aAC1C;YAED,IAAI,gBAAgB,EAAE;gBACpB,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;oBACnE,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC;oBACxB,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,GAAG,gBAAgB,CAAC;oBACvD,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,GAAG,gBAAgB,CAAC;oBACrD,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,GAAG,gBAAgB,CAAC;oBACn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KAAK,KAAK,EAAE;oBAClB,IAAI,eAAe,KAAK,CAAC,EAAE;wBACzB,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;qBACnD;oBAED,IAAI,MAAM,GAAG,kCAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzD,IAAI,MAAM,GAAG,kCAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;wBACtB,MAAM,KAAK,CAAC,kDAAkD,CAAC,CAAC;qBACjE;oBACD,IAAI,KAAK,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,gBAAgB,CAAC;oBACjD,QAAQ,CAAC,SAAS,IAAI,KAAK,CAAC;iBAC7B;aACF;SACF;KACF;AACH,CAAC;AA5FD,oCA4FC"}
@@ -0,0 +1,2 @@
1
+ export default function prepareNtuplesDatatable(currentEntry: any, spectrum: any, kind: any): void;
2
+ //# sourceMappingURL=prepareNtuplesDatatable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareNtuplesDatatable.d.ts","sourceRoot":"","sources":["../src/prepareNtuplesDatatable.js"],"names":[],"mappings":"AAAA,mGAoFC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function prepareNtuplesDatatable(currentEntry, spectrum, kind) {
4
+ let xIndex = -1;
5
+ let yIndex = -1;
6
+ let firstVariable = '';
7
+ let secondVariable = '';
8
+ if (kind.indexOf('++') > 0) {
9
+ firstVariable = kind.replace(/.*\(([a-zA-Z0-9]+)\+\+.*/, '$1');
10
+ secondVariable = kind.replace(/.*\.\.([a-zA-Z0-9]+).*/, '$1');
11
+ }
12
+ else {
13
+ kind = kind.replace(/[^a-zA-Z]/g, '');
14
+ firstVariable = kind.charAt(0);
15
+ secondVariable = kind.charAt(1);
16
+ spectrum.variables = {};
17
+ for (let symbol of kind) {
18
+ let lowerCaseSymbol = symbol.toLowerCase();
19
+ let index = currentEntry.ntuples.symbol.indexOf(symbol);
20
+ if (index === -1)
21
+ throw Error(`Symbol undefined: ${symbol}`);
22
+ spectrum.variables[lowerCaseSymbol] = {};
23
+ for (let key in currentEntry.ntuples) {
24
+ if (currentEntry.ntuples[key][index]) {
25
+ spectrum.variables[lowerCaseSymbol][key.replace(/^var/, '')] =
26
+ currentEntry.ntuples[key][index];
27
+ }
28
+ }
29
+ }
30
+ }
31
+ xIndex = currentEntry.ntuples.symbol.indexOf(firstVariable);
32
+ yIndex = currentEntry.ntuples.symbol.indexOf(secondVariable);
33
+ if (xIndex === -1)
34
+ xIndex = 0;
35
+ if (yIndex === -1)
36
+ yIndex = 0;
37
+ if (currentEntry.ntuples.first) {
38
+ if (currentEntry.ntuples.first.length > xIndex) {
39
+ spectrum.firstX = currentEntry.ntuples.first[xIndex];
40
+ }
41
+ if (currentEntry.ntuples.first.length > yIndex) {
42
+ spectrum.firstY = currentEntry.ntuples.first[yIndex];
43
+ }
44
+ }
45
+ if (currentEntry.ntuples.last) {
46
+ if (currentEntry.ntuples.last.length > xIndex) {
47
+ spectrum.lastX = currentEntry.ntuples.last[xIndex];
48
+ }
49
+ if (currentEntry.ntuples.last.length > yIndex) {
50
+ spectrum.lastY = currentEntry.ntuples.last[yIndex];
51
+ }
52
+ }
53
+ if (currentEntry.ntuples.vardim &&
54
+ currentEntry.ntuples.vardim.length > xIndex) {
55
+ spectrum.nbPoints = currentEntry.ntuples.vardim[xIndex];
56
+ }
57
+ if (currentEntry.ntuples.factor) {
58
+ if (currentEntry.ntuples.factor.length > xIndex) {
59
+ spectrum.xFactor = currentEntry.ntuples.factor[xIndex];
60
+ }
61
+ if (currentEntry.ntuples.factor.length > yIndex) {
62
+ spectrum.yFactor = currentEntry.ntuples.factor[yIndex];
63
+ }
64
+ }
65
+ if (currentEntry.ntuples.units) {
66
+ if (currentEntry.ntuples.units.length > xIndex) {
67
+ if (currentEntry.ntuples.varname &&
68
+ currentEntry.ntuples.varname[xIndex]) {
69
+ spectrum.xUnits = `${currentEntry.ntuples.varname[xIndex]} [${currentEntry.ntuples.units[xIndex]}]`;
70
+ }
71
+ else {
72
+ spectrum.xUnits = currentEntry.ntuples.units[xIndex];
73
+ }
74
+ }
75
+ if (currentEntry.ntuples.units.length > yIndex) {
76
+ if (currentEntry.ntuples.varname &&
77
+ currentEntry.ntuples.varname[yIndex]) {
78
+ spectrum.yUnits = `${currentEntry.ntuples.varname[yIndex]} [${currentEntry.ntuples.units[yIndex]}]`;
79
+ }
80
+ else {
81
+ spectrum.yUnits = currentEntry.ntuples.units[yIndex];
82
+ }
83
+ }
84
+ }
85
+ }
86
+ exports.default = prepareNtuplesDatatable;
87
+ //# sourceMappingURL=prepareNtuplesDatatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareNtuplesDatatable.js","sourceRoot":"","sources":["../src/prepareNtuplesDatatable.js"],"names":[],"mappings":";;AAAA,SAAwB,uBAAuB,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI;IAC1E,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;IAChB,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;IAChB,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,cAAc,GAAG,EAAE,CAAC;IACxB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC1B,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC,CAAC;QAC/D,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;KAC/D;SAAM;QACL,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACtC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC/B,cAAc,GAAG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AAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;YAC9C,IACE,YAAY,CAAC,OAAO,CAAC,OAAO;gBAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EACpC;gBACA,QAAQ,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;aACrG;iBAAM;gBACL,QAAQ,CAAC,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aACtD;SACF;QACD,IAAI,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;YAC9C,IACE,YAAY,CAAC,OAAO,CAAC,OAAO;gBAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EACpC;gBACA,QAAQ,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;aACrG;iBAAM;gBACL,QAAQ,CAAC,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aACtD;SACF;KACF;AACH,CAAC;AApFD,0CAoFC"}
@@ -0,0 +1,2 @@
1
+ export default function prepareSpectrum(spectrum: any): void;
2
+ //# sourceMappingURL=prepareSpectrum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareSpectrum.d.ts","sourceRoot":"","sources":["../src/prepareSpectrum.js"],"names":[],"mappings":"AAAA,6DAGC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function prepareSpectrum(spectrum) {
4
+ if (!spectrum.xFactor)
5
+ spectrum.xFactor = 1;
6
+ if (!spectrum.yFactor)
7
+ spectrum.yFactor = 1;
8
+ }
9
+ exports.default = prepareSpectrum;
10
+ //# sourceMappingURL=prepareSpectrum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareSpectrum.js","sourceRoot":"","sources":["../src/prepareSpectrum.js"],"names":[],"mappings":";;AAAA,SAAwB,eAAe,CAAC,QAAQ;IAC9C,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAC9C,CAAC;AAHD,kCAGC"}
@@ -0,0 +1,2 @@
1
+ export default function profiling(result: any, action: any, options: any): void;
2
+ //# sourceMappingURL=profiling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiling.d.ts","sourceRoot":"","sources":["../src/profiling.js"],"names":[],"mappings":"AAAA,gFAOC"}