Dateien nach "ILP" hochladen

This commit is contained in:
2026-06-18 12:03:22 +02:00
parent 1fd362c39a
commit 74b73be992
2 changed files with 19 additions and 7 deletions
+16 -4
View File
@@ -213,14 +213,14 @@ CNMR1= {
#Experimental Theobromine nmr
HNMR2= {
HNMR2 = {
1: ([11.10], [1]),
2: ([3.33], [3]),
3: ([3.84], [3]),
4: ([7.97], [1]),
}
CNMR2= {
CNMR2 = {
1: ([154.9], [1]),
2: ([149.8], [1]),
3: ([107.1], [1]),
@@ -230,6 +230,17 @@ CNMR2= {
7: ([33.9], [1]),
}
#Combination of methyl group and base purine rings from two papers
CNMR3 = {
1: ([153.1], [1]),
2: ([150.0], [1]),
3: ([108.1], [1]),
4: ([154.9], [1]),
5: ([142.6], [1]),
6: ([29.3], [1]),
7: ([33.9], [1]),
}
def overlap(listref, listnew):
twoleft = np.sum(np.multiply(np.concatenate((listref, [0, 0])), np.concatenate(([0, 0], listnew))))
oneleft = np.sum(np.multiply(np.concatenate((listref, [0])), np.concatenate(([0], listnew))))
@@ -283,13 +294,13 @@ def correction(spectra, corretionppm):
return newspectra
def main():
spectrumref = CNMR1
spectrumref = CNMR3
spectrafalse = [CXANTHINE, C1XANTHINE, C3XANTHINE, C7XANTHINE, C1XANTHINE, C17XANTHINE, C37XANTHINE, C137XANTHINE]
likelihood = []
for spectrumtrue in spectrafalse:
#errorlist = {}
errorlist = []
for correctionvalue in range(8, 16):
for correctionvalue in range(8, 12): #also tested 8.4, 8.37, 11
spectrumrefcorrected = correction(spectrumref, correctionvalue) #CCAFFEINE 11 (klappt hier sehr gut) CCAFFEINE2 12 CPARAXANTHINE 10 CNMR1 9, 10 o 11 (sehr gut) CNMR2 10 o 11
error = 0
total = 0
@@ -313,6 +324,7 @@ def main():
error += negative
#errorlist[correctionvalue] = error
errorlist.append(error)
#print(min(range(len(errorlist)), key=errorlist.__getitem__))
likelihood.append(round((total - min(errorlist))/total, 2))
print(likelihood)
'''for i in np.arange(0.01, 0.07, 0.01):