mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2025-01-12 22:18:29 +01:00
Remove kwargs to use explicit optional arguments
This commit is contained in:
parent
8224f76d4e
commit
617e50dc03
@ -224,7 +224,7 @@ class dataFileBase(object):
|
|||||||
vs=[val,corr]
|
vs=[val,corr]
|
||||||
uns=[unsafe,unsafecorr]
|
uns=[unsafe,unsafecorr]
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
datamtbe[i].excitations.append(excitationValue(firstState,finst[0],vs[i],type=finst[2],T1=T1,forces=oscilatorForces,isUnsafe=uns[i]))
|
datamtbe[i].excitations.append(excitationValue(firstState,finst[0],vs[i],type=finst[2],T1=T1,oscilatorForces=oscilatorForces,isUnsafe=uns[i]))
|
||||||
for value in datacls.values():
|
for value in datacls.values():
|
||||||
for dat in value:
|
for dat in value:
|
||||||
datalist.append(dat)
|
datalist.append(dat)
|
||||||
@ -359,19 +359,15 @@ class FluoDataFile(oneStateDataFileBase):
|
|||||||
|
|
||||||
|
|
||||||
class excitationBase:
|
class excitationBase:
|
||||||
def __init__(self,initial, final, **kwargs):
|
def __init__(self,initial, final,type=None, T1=None,isUnsafe=False):
|
||||||
self.initial = initial
|
self.initial = initial
|
||||||
self.final = final
|
self.final = final
|
||||||
self.type = kwargs["type"] if "type" in kwargs else None
|
self.type = type
|
||||||
self.T1 = kwargs["T1"] if "T1" in kwargs else None
|
self.T1 = T1
|
||||||
self.isUnsafe = kwargs["isUnsafe"] if "isUnsafe" in kwargs else False
|
self.isUnsafe = isUnsafe
|
||||||
|
|
||||||
class excitationValue(excitationBase):
|
class excitationValue(excitationBase):
|
||||||
def __init__(self,initial, final, value,**kwarg):
|
def __init__(self,initial, final, value, type=None, T1=None,isUnsafe=False,oscilatorForces=None):
|
||||||
supkwarg=kwarg.copy()
|
super(excitationValue,self).__init__(initial, final,type=type,T1=T1,isUnsafe=False)
|
||||||
for item in ["forces","corrected"]:
|
|
||||||
if item in supkwarg:
|
|
||||||
supkwarg.pop(item)
|
|
||||||
super(excitationValue,self).__init__(initial, final,**supkwarg)
|
|
||||||
self.value = value
|
self.value = value
|
||||||
self.oscilatorForces=kwarg["forces"] if "forces" in kwarg else None
|
self.oscilatorForces = oscilatorForces
|
||||||
|
Loading…
Reference in New Issue
Block a user