Dateien nach "ILP" hochladen
This commit is contained in:
parent
1fd362c39a
commit
74b73be992
@ -47,9 +47,9 @@ VERTICES2 = {
|
||||
VERTICES = ['Xanthine', 'p_{0,0}', 'p_{0,1}', 'p_{0,2}', 'p_{0,3}', 'p_{0,4}', 'p_{0,5}', 'Caffeine']
|
||||
|
||||
NMRLIKELYHOODS = [0.0, 0.2, 0.7, 0.1, 0.1, 0.2, 0.7, 0.0]
|
||||
NMRLIKELYHOODS1 = [0.75, 0.66, 0.66, 0.89, 0.66, 0.86, 0.79, 0.65]
|
||||
NMRLIKELYHOODS2 = [0.58, 0.75, 0.71, 0.91, 0.75, 0.76, 0.85, 0.82]
|
||||
|
||||
NMRLIKELYHOODS1 = [0.75, 0.59, 0.36, 0.89, 0.59, 0.86, 0.78, 0.65]
|
||||
NMRLIKELYHOODS2 = [0.56, 0.75, 0.45, 0.79, 0.75, 0.76, 0.84, 0.74]
|
||||
NMRLIKELYHOODS3 = [0.54, 0.53, 0.7, 0.77, 0.53, 0.85, 0.94, 0.79]
|
||||
|
||||
FIXED_FLOWS = {
|
||||
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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user