mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Starting to fix python code for QUEST#2
This commit is contained in:
parent
b8e8b52383
commit
3402445caa
@ -154,13 +154,26 @@ class dataFileBase(object):
|
|||||||
mytrans[i]=str(mathsoup)
|
mytrans[i]=str(mathsoup)
|
||||||
for col in range(3,np.size(table,1)):
|
for col in range(3,np.size(table,1)):
|
||||||
col=table[:,col]
|
col=table[:,col]
|
||||||
mybasis=col[2]
|
mybasis=col[1]
|
||||||
for index,cell in enumerate(col[first:last+1]):
|
for index,cell in enumerate(col[first:last+1]):
|
||||||
mymethod=method(str(table[index,2],mybasis))
|
methodnameAT1=str(table[first+index,2])
|
||||||
if str(cell)!="":
|
PTString="($\%T_1$)"
|
||||||
m=re.match(r"(?P<value>[-+]?\d*\.?\d+)\s*\((?:(?P<T1>\d*\.?\d+)\%)|(?P<?>\d*\.?\d+)\)")
|
HasT1=methodnameAT1.endswith(PTString)
|
||||||
val,unsafe=getValFromCell(m.group("value"))
|
if HasT1:
|
||||||
|
methodname=methodnameAT1[:-len(PTString)]
|
||||||
|
else:
|
||||||
|
methodname=methodnameAT1
|
||||||
|
mymethod=method(methodname,mybasis)
|
||||||
|
strcell=str(cell)
|
||||||
|
if strcell!="":
|
||||||
|
if HasT1:
|
||||||
|
m=re.match(r"^(?P<value>[-+]?\d+\.?\d*)\s*\((?P<T1>\d*\.?\d+)\%\)$",strcell)
|
||||||
|
val,unsafe=getValFromCell(TexSoup(m.group("value")))
|
||||||
T1=m.group("T1")
|
T1=m.group("T1")
|
||||||
|
else:
|
||||||
|
m=re.match(r"^[-+]?\d+\.?\d*",strcell)
|
||||||
|
val,unsafe=getValFromCell(TexSoup(m.group(0)))
|
||||||
|
T1=None
|
||||||
finst=finsts[index]
|
finst=finsts[index]
|
||||||
if (mymolecule,mymethod) in datacls:
|
if (mymolecule,mymethod) in datacls:
|
||||||
data=datacls[(mymolecule,mymethod)]
|
data=datacls[(mymolecule,mymethod)]
|
||||||
|
Loading…
Reference in New Issue
Block a user