Skip to content

Commit f201ad9

Browse files
committed
added code to remove empty datasets from mnova json so that data is not
overwritten
1 parent 8456691 commit f201ad9

File tree

7 files changed

+408
-351
lines changed

7 files changed

+408
-351
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,6 @@ To install the script so that it has its own menu item and menu bar, the followi
292292

293293
![mnova_simpleNMR](readMePngs/mnova_simpleNMR.png)
294294

295-
6. The icon will not be displayed as this requires copying the image simpleNMRlogo.png to the same directory where the script has been installed and changing the first line in the script to the same directory.
295+
6. The icon will not be displayed as this requires copying the image `simpleNMRlogo.png` to the same directory where the script has been installed and changing the first line in the script to the same directory.
296296

297297
![mnova_simpleNMR_2](readMePngs/mnova_simpleNMR_2.png)

exampleProblems/2-ethyl-1-indanone/2-ethyl-1-indanone.json

Lines changed: 112 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,174 +1165,140 @@
11651165
},
11661166
"cosy": {
11671167
"f1_ppm": {
1168-
"1": 7.352275399932183,
1169-
"2": 7.448374359487117,
1170-
"3": 7.352275399932183,
1171-
"4": 2.812951456977248,
1172-
"5": 2.606848512273122,
1173-
"6": 2.606848512273122,
1174-
"7": 1.001844729650673,
1175-
"8": 1.964517682293971
1168+
"1": 7.448374359487117,
1169+
"2": 7.352275399932183,
1170+
"3": 2.606848512273122,
1171+
"4": 2.606848512273122,
1172+
"5": 1.001844729650673,
1173+
"6": 1.964517682293971
11761174
},
11771175
"f2_ppm": {
1178-
"1": 7.737564351158939,
1176+
"1": 7.567158389420261,
11791177
"2": 7.567158389420261,
1180-
"3": 7.567158389420261,
1181-
"4": 3.30748707389514,
1182-
"5": 3.30748707389514,
1183-
"6": 1.964517682293971,
1184-
"7": 1.964517682293971,
1185-
"8": 1.964517682293971
1178+
"3": 3.30748707389514,
1179+
"4": 1.964517682293971,
1180+
"5": 1.964517682293971,
1181+
"6": 1.964517682293971
11861182
},
11871183
"intensity": {
1188-
"1": 0.8134750127792358,
1189-
"2": 1.574164390563965,
1190-
"3": 0.2207812666893005,
1191-
"4": 0.3013738095760345,
1192-
"5": 0.09333708882331848,
1193-
"6": 0.3139396905899048,
1194-
"7": 0.8830317854881287,
1195-
"8": 0.1004290208220482
1184+
"1": 1.574164390563965,
1185+
"2": 0.2207812666893005,
1186+
"3": 0.05913177505135536,
1187+
"4": 0.3139396905899048,
1188+
"5": 0.8830317854881287,
1189+
"6": 0.1004290208220482
11961190
},
11971191
"f1_i": {
1198-
"1": 4,
1199-
"2": 3,
1200-
"3": 4,
1201-
"4": 6,
1202-
"5": 7,
1203-
"6": 7,
1204-
"7": 10,
1205-
"8": 8
1192+
"1": 3,
1193+
"2": 4,
1194+
"3": 7,
1195+
"4": 7,
1196+
"5": 10,
1197+
"6": 8
12061198
},
12071199
"f1p_i": {
1208-
"1": 5,
1209-
"2": 6,
1210-
"3": 5,
1211-
"4": 9,
1212-
"5": 8,
1213-
"6": 8,
1214-
"7": 11,
1215-
"8": 10
1200+
"1": 6,
1201+
"2": 5,
1202+
"3": 8,
1203+
"4": 8,
1204+
"5": 11,
1205+
"6": 10
12161206
},
12171207
"f2_i": {
1218-
"1": 1,
1208+
"1": 2,
12191209
"2": 2,
1220-
"3": 2,
1221-
"4": 5,
1222-
"5": 5,
1223-
"6": 8,
1224-
"7": 8,
1225-
"8": 8
1210+
"3": 5,
1211+
"4": 8,
1212+
"5": 8,
1213+
"6": 8
12261214
},
12271215
"f2p_i": {
1228-
"1": 7,
1216+
"1": 4,
12291217
"2": 4,
1230-
"3": 4,
1231-
"4": 9,
1232-
"5": 9,
1233-
"6": 10,
1234-
"7": 10,
1235-
"8": 10
1218+
"3": 9,
1219+
"4": 10,
1220+
"5": 10,
1221+
"6": 10
12361222
},
12371223
"f1p_ppm": {
1238-
"1": 127.2743508502364,
1239-
"2": 126.5228388126049,
1240-
"3": 127.2743508502364,
1241-
"4": 32.31753922066989,
1242-
"5": 48.74270426301496,
1243-
"6": 48.74270426301496,
1244-
"7": 11.58170032407751,
1245-
"8": 24.45272702583003
1224+
"1": 126.5228388126049,
1225+
"2": 127.2743508502364,
1226+
"3": 48.74270426301496,
1227+
"4": 48.74270426301496,
1228+
"5": 11.58170032407751,
1229+
"6": 24.45272702583003
12461230
},
12471231
"f2p_ppm": {
1248-
"1": 123.8165819830844,
1232+
"1": 134.5884480174205,
12491233
"2": 134.5884480174205,
1250-
"3": 134.5884480174205,
1251-
"4": 32.31753922066989,
1252-
"5": 32.31753922066989,
1253-
"6": 24.45272702583003,
1254-
"7": 24.45272702583003,
1255-
"8": 24.45272702583003
1234+
"3": 32.31753922066989,
1235+
"4": 24.45272702583003,
1236+
"5": 24.45272702583003,
1237+
"6": 24.45272702583003
12561238
},
12571239
"f1H_i": {
1258-
"1": "H4",
1259-
"2": "H3",
1260-
"3": "H4",
1261-
"4": "H6",
1262-
"5": "H7",
1263-
"6": "H7",
1264-
"7": "H10",
1265-
"8": "H8"
1240+
"1": "H3",
1241+
"2": "H4",
1242+
"3": "H7",
1243+
"4": "H7",
1244+
"5": "H10",
1245+
"6": "H8"
12661246
},
12671247
"f2H_i": {
1268-
"1": "H1",
1248+
"1": "H2",
12691249
"2": "H2",
1270-
"3": "H2",
1271-
"4": "H5",
1272-
"5": "H5",
1273-
"6": "H8",
1274-
"7": "H8",
1275-
"8": "H8"
1250+
"3": "H5",
1251+
"4": "H8",
1252+
"5": "H8",
1253+
"6": "H8"
12761254
},
12771255
"f1Cp_i": {
1278-
"1": "C5",
1279-
"2": "C6",
1280-
"3": "C5",
1281-
"4": "C9",
1282-
"5": "C8",
1283-
"6": "C8",
1284-
"7": "C11",
1285-
"8": "C10"
1256+
"1": "C6",
1257+
"2": "C5",
1258+
"3": "C8",
1259+
"4": "C8",
1260+
"5": "C11",
1261+
"6": "C10"
12861262
},
12871263
"f2Cp_i": {
1288-
"1": "C7",
1264+
"1": "C4",
12891265
"2": "C4",
1290-
"3": "C4",
1291-
"4": "C9",
1292-
"5": "C9",
1293-
"6": "C10",
1294-
"7": "C10",
1295-
"8": "C10"
1266+
"3": "C9",
1267+
"4": "C10",
1268+
"5": "C10",
1269+
"6": "C10"
12961270
},
12971271
"f1_ppm_orig": {
1298-
"1": 7.348358839227305,
1299-
"2": 7.447310850078518,
1300-
"3": 7.350210639609407,
1301-
"4": 2.812258357628771,
1302-
"5": 2.607530136577619,
1303-
"6": 2.605891541783929,
1304-
"7": 1.001326068172147,
1305-
"8": 1.964488317301542
1272+
"1": 7.447310850078518,
1273+
"2": 7.350210639609407,
1274+
"3": 2.606743400116869,
1275+
"4": 2.605891541783929,
1276+
"5": 1.001326068172147,
1277+
"6": 1.964488317301542
13061278
},
13071279
"f1_ppm_prob": {
1308-
"1": 58.708814549472066,
1309-
"2": 78.00381908348834,
1310-
"3": 73.26728036781576,
1311-
"4": 79.02554062013203,
1312-
"5": 79.0504771344543,
1313-
"6": 78.34036465490018,
1314-
"7": 79.36033139064126,
1315-
"8": 79.7870800560017
1280+
"1": 78.00381908348834,
1281+
"2": 73.26728036781576,
1282+
"3": 79.77082706862024,
1283+
"4": 78.34036465490018,
1284+
"5": 79.36033139064126,
1285+
"6": 79.7870800560017
13161286
},
13171287
"f2_ppm_orig": {
1318-
"1": 7.738430033265081,
1288+
"1": 7.566996222976494,
13191289
"2": 7.566996222976494,
1320-
"3": 7.566996222976494,
1321-
"4": 3.30728647990954,
1322-
"5": 3.307057782702674,
1323-
"6": 1.965567855644642,
1324-
"7": 1.965477164626156,
1325-
"8": 1.965097083513452
1290+
"3": 3.310011683794853,
1291+
"4": 1.965567855644642,
1292+
"5": 1.965477164626156,
1293+
"6": 1.965097083513452
13261294
},
13271295
"f2_ppm_prob": {
1328-
"1": 78.601495279427,
1296+
"1": 79.74650164908823,
13291297
"2": 79.74650164908823,
1330-
"3": 79.74650164908823,
1331-
"4": 79.72427143690014,
1332-
"5": 79.49491161624567,
1333-
"6": 78.0478072201684,
1334-
"7": 78.33282267622302,
1335-
"8": 79.25454156114374
1298+
"3": 70.23914174984161,
1299+
"4": 78.0478072201684,
1300+
"5": 78.33282267622302,
1301+
"6": 79.25454156114374
13361302
}
13371303
},
13381304
"c13_df": {
@@ -1791,44 +1757,36 @@
17911757
},
17921758
"cosy_df": {
17931759
"f2_ppm": {
1794-
"1": 7.738430033265081,
1760+
"1": 7.566996222976494,
17951761
"2": 7.566996222976494,
1796-
"3": 7.566996222976494,
1797-
"4": 3.30728647990954,
1798-
"5": 3.307057782702674,
1799-
"6": 1.965567855644642,
1800-
"7": 1.965477164626156,
1801-
"8": 1.965097083513452
1762+
"3": 3.310011683794853,
1763+
"4": 1.965567855644642,
1764+
"5": 1.965477164626156,
1765+
"6": 1.965097083513452
18021766
},
18031767
"f1_ppm": {
1804-
"1": 7.348358839227305,
1805-
"2": 7.447310850078518,
1806-
"3": 7.350210639609407,
1807-
"4": 2.812258357628771,
1808-
"5": 2.607530136577619,
1809-
"6": 2.605891541783929,
1810-
"7": 1.001326068172147,
1811-
"8": 1.964488317301542
1768+
"1": 7.447310850078518,
1769+
"2": 7.350210639609407,
1770+
"3": 2.606743400116869,
1771+
"4": 2.605891541783929,
1772+
"5": 1.001326068172147,
1773+
"6": 1.964488317301542
18121774
},
18131775
"intensity": {
1814-
"1": 0.8134750127792358,
1815-
"2": 1.574164390563965,
1816-
"3": 0.2207812666893005,
1817-
"4": 0.3013738095760345,
1818-
"5": 0.09333708882331848,
1819-
"6": 0.3139396905899048,
1820-
"7": 0.8830317854881287,
1821-
"8": 0.1004290208220482
1776+
"1": 1.574164390563965,
1777+
"2": 0.2207812666893005,
1778+
"3": 0.05913177505135536,
1779+
"4": 0.3139396905899048,
1780+
"5": 0.8830317854881287,
1781+
"6": 0.1004290208220482
18221782
},
18231783
"signaltype": {
18241784
"1": "Compound",
18251785
"2": "Compound",
18261786
"3": "Compound",
18271787
"4": "Compound",
18281788
"5": "Compound",
1829-
"6": "Compound",
1830-
"7": "Compound",
1831-
"8": "Compound"
1789+
"6": "Compound"
18321790
}
18331791
},
18341792
"expected_molecule": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:5dd4c039320c1c3d51f7dd139ed1ce0e53a9f36369638948b161aec5840ad803
3-
size 64884215
2+
oid sha256:0c615dc2af43788c85f6c3017ddae909a9c9900925d93eeefbffab937117c5b7
3+
size 64881927
Binary file not shown.

exampleProblems/2-ethyl-1-indanone/2-ethyl-1-indanone_mresnova.json

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"normValue": 1
152152
},
153153
"peaks": {
154-
"count": 8,
154+
"count": 6,
155155
"0": {
156156
"delta1": 7.447310850078518,
157157
"delta2": 7.566996222976494,
@@ -165,36 +165,24 @@
165165
"type": 0
166166
},
167167
"2": {
168-
"delta1": 7.348358839227305,
169-
"delta2": 7.7384300332650815,
170-
"intensity": 0.8134750127792358,
168+
"delta1": 2.6067434001168692,
169+
"delta2": 3.3100116837948526,
170+
"intensity": 0.05913177505135536,
171171
"type": 0
172172
},
173173
"3": {
174-
"delta1": 2.812258357628771,
175-
"delta2": 3.3072864799095405,
176-
"intensity": 0.30137380957603455,
177-
"type": 0
178-
},
179-
"4": {
180-
"delta1": 2.6075301365776187,
181-
"delta2": 3.3070577827026737,
182-
"intensity": 0.09333708882331848,
183-
"type": 0
184-
},
185-
"5": {
186174
"delta1": 2.605891541783929,
187175
"delta2": 1.9655678556446423,
188176
"intensity": 0.3139396905899048,
189177
"type": 0
190178
},
191-
"6": {
179+
"4": {
192180
"delta1": 1.9644883173015417,
193181
"delta2": 1.965097083513452,
194182
"intensity": 0.10042902082204819,
195183
"type": 0
196184
},
197-
"7": {
185+
"5": {
198186
"delta1": 1.0013260681721468,
199187
"delta2": 1.9654771646261555,
200188
"intensity": 0.8830317854881287,

0 commit comments

Comments
 (0)