InvertEnergy

InvertEnergy(G) takes response function $G(\omega)$ as an argument and returns $-G(-\omega)^*$. As we only store the poles and their residues we can do this by negating the energy of the poles without the need to change the size of the residue

Example

This example initializes a response function in the “list of poles” representation and inverts its energy.

Input

Example.Quanty
NEDOS   = 10
HalfBW = 1
dE =HalfBW/NEDOS
 
a = {0}
b = {}
 
for i=1,NEDOS do
  a[#a+1] = (i-0.5) * dE -- energy axis from 0 to 1
  b[#b+1] = 0.5 / NEDOS -- flat density of states
end
 
G0 = ResponseFunction.New( {a,b,mu=0,type="ListOfPoles", name="G0"} )
G0_inv = ResponseFunction.InvertEnergy(G0)
 
print(G0)
print(G0_inv)

Result

{ { 0 , 0.05 , 0.15 , 0.25 , 0.35 , 0.45 , 0.55 , 0.65 , 0.75 , 0.85 , 0.95 } , 
  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } ,
  mu = 0 ,
  name = G0 ,
  type = ListOfPoles }
{ { 0 , -0.05 , -0.15 , -0.25 , -0.35 , -0.45 , -0.55 , -0.65 , -0.75 , -0.85 , -0.95 } , 
  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } ,
  mu = 0 ,
  name = G0 ,
  type = ListOfPoles }

Table of contents

Print/export