Package models :: Module import_ufo :: Class OrganizeModelExpression
[hide private]
[frames] | no frames]

Class OrganizeModelExpression

source code

Organize the couplings/parameters of a model

Instance Methods [hide private]
 
__init__(self, model) source code
 
main(self)
Launch the actual computation and return the associate params/couplings.
source code
 
analyze_parameters(self)
separate the parameters needed to be recomputed events by events and the others
source code
 
add_parameter(self, parameter)
add consistently the parameter in params and all_expr.
source code
 
add_coupling(self, coupling)
add consistently the coupling in couplings and all_expr.
source code
 
analyze_couplings(self)
creates the shortcut for all special function/parameter separate the couplings dependent of track variables of the others
source code
 
find_dependencies(self, expr)
check if an expression should be evaluated points by points or not
source code
 
shorten_expr(self, expr)
apply the rules of contraction and fullfill self.params with dependent part
source code
 
shorten_complex(self, matchobj)
add the short expression, and return the nice string associate
source code
 
shorten_expo(self, matchobj)
add the short expression, and return the nice string associate
source code
 
shorten_cmath(self, matchobj)
add the short expression, and return the nice string associate
source code
 
shorten_conjugate(self, matchobj)
add the short expression, and retrun the nice string associate
source code
 
search_type(self, expr, dep='')
return the type associate to the expression if define
source code
Class Variables [hide private]
  track_dependant = ['aS', 'aEWM1']
  complex_number = re.compile(r'complex\((?P<real>[^,\(\)]+),(?P...
  expo_expr = re.compile(r'(?P<expr>[\w\.]+)\s*\*\*\s*(?P<expo>[...
  cmath_expr = re.compile(r'cmath.(?P<operation>\w+)\((?P<expr>\...
  conj_expr = re.compile(r'complexconjugate\((?P<expr>\w+)\)')
  separator = re.compile(r'[\+,-\*/\(\)]')
Method Details [hide private]

add_parameter(self, parameter)

source code 

add consistently the parameter in params and all_expr. avoid duplication

add_coupling(self, coupling)

source code 

add consistently the coupling in couplings and all_expr. avoid duplication


Class Variable Details [hide private]

complex_number

Value:
re.compile(r'complex\((?P<real>[^,\(\)]+),(?P<imag>[^,\(\)]+)\)')

expo_expr

Value:
re.compile(r'(?P<expr>[\w\.]+)\s*\*\*\s*(?P<expo>[\d\.\+-]+)')

cmath_expr

Value:
re.compile(r'cmath.(?P<operation>\w+)\((?P<expr>\w+)\)')