Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:objects:responsefunction:functions:invertenergy [2024/10/07 14:59] Aleksandrs Zacinskisdocumentation:language_reference:objects:responsefunction:functions:invertenergy [2024/12/22 20:29] (current) Maurits W. Haverkort
Line 3: Line 3:
  
 ### ###
-InvertEnergy(G) takes response function $G(\omega)$ as an argument and returns $G(-\omega)$. Argument response function doesn't get overwritten.+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
 ### ###
  
Line 18: Line 18:
 dE =HalfBW/NEDOS dE =HalfBW/NEDOS
  
-a0 = {0} += {0} 
-b0 = {}+= {}
  
-for i=-NEDOS,NEDOS do +for i=1,NEDOS do 
-  a0[#a0+1] = i * dE -- energy axis from -1 to 1 +  a[#a+1] = (i-0.5) * dE -- energy axis from to 1 
-  b0[#b0+1] = 0.5 -- flat density of states+  b[#b+1] = 0.5 / NEDOS -- flat density of states
 end end
  
-G0 = ResponseFunction.New( {a0,b0,mu=0,type="ListOfPoles", name="G0"} )+G0 = ResponseFunction.New( {a,b,mu=0,type="ListOfPoles", name="G0"} )
 G0_inv = ResponseFunction.InvertEnergy(G0) G0_inv = ResponseFunction.InvertEnergy(G0)
  
-print(ResponseFunction.ToTable(G0)+print(G0) 
-print(ResponseFunction.ToTable(G0_inv))+print(G0_inv)
  
 </code> </code>
Line 36: Line 36:
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-{ { 0 , -1 , -0.-0.-0.-0.-0.-0.-0.-0.-0.1 , 0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1 } ,  +{ { 0 , 0.05 , 0.15 , 0.25 , 0.35 , 0.45 , 0.55 , 0.65 , 0.75 , 0.85 , 0.95 } ,  
-  { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 +  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } ,
-  type = ListOfPoles ,+
   mu = 0 ,   mu = 0 ,
-  name = G0 } +  name = G0 , 
-   +  type = ListOfPoles } 
-{ { 0 , 1 , 0.9 , 0.8 , 0.7 , 0.6 , 0.5 , 0.4 , 0.3 , 0.2 , 0.1 , 0 , -0., -0., -0., -0., -0., -0., -0., -0., -0.9 , -1 } ,  +{ { 0 , -0.05 , -0.15 , -0.25 , -0.35 , -0.45 , -0.55 , -0.65 , -0.75 , -0.85 , -0.95 } ,  
-  { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 +  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } ,
-  type = ListOfPoles ,+
   mu = 0 ,   mu = 0 ,
-  name = G0 } +  name = G0 , 
 +  type = ListOfPoles }
 </file> </file>
  
 ===== Table of contents ===== ===== Table of contents =====
-{{indexmenu>.#1|msort}}+{{indexmenu>../#2|tsort}}
  
Print/export