~maddevelopers/mg5amcnlo/FKS_EW_granny

« back to all changes in this revision

Viewing changes to models/4Gen/function_library.py

  • Committer: Marco Zaro
  • Date: 2018-04-16 14:08:47 UTC
  • mfrom: (78.403.58 2.6.2)
  • Revision ID: marco.zaro@gmail.com-20180416140847-nuz7haj3di3gqqhq
merged with 2.6.2 rev 332

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This file is part of the UFO.
2
 
#
3
 
# This file contains definitions for functions that
4
 
# are extensions of the cmath library, and correspond
5
 
# either to functions that are in cmath, but inconvenient
6
 
# to access from there (e.g. z.conjugate()),
7
 
# or functions that are simply not defined.
8
 
#
9
 
#
10
 
 
11
 
__date__ = "22 July 2010"
12
 
__author__ = "claude.duhr@durham.ac.uk"
13
 
 
14
 
import cmath
15
 
from object_library import all_functions, Function
16
 
 
17
 
#
18
 
# shortcuts for functions from cmath
19
 
#
20
 
 
21
 
complexconjugate = Function(name = 'complexconjugate',
22
 
                            arguments = ('z',),
23
 
                            expression = 'z.conjugate()')
24
 
 
25
 
 
26
 
re = Function(name = 're',
27
 
              arguments = ('z',),
28
 
              expression = 'z.real')
29
 
 
30
 
im = Function(name = 'im',
31
 
              arguments = ('z',),
32
 
              expression = 'z.imag')
33
 
 
34
 
# New functions (trigonometric)
35
 
 
36
 
sec = Function(name = 'sec',
37
 
             arguments = ('z',),
38
 
             expression = '1./cmath.cos(z)')
39
 
 
40
 
asec = Function(name = 'asec',
41
 
             arguments = ('z',),
42
 
             expression = 'cmath.acos(1./z)')
43
 
 
44
 
csc = Function(name = 'csc',
45
 
             arguments = ('z',),
46
 
             expression = '1./cmath.sin(z)')
47
 
 
48
 
acsc = Function(name = 'acsc',
49
 
             arguments = ('z',),
50
 
             expression = 'cmath.asin(1./z)')
51
 
 
52
 
 
53
 
 
54