Differences
This shows you the differences between two versions of the page.
documentation:language_reference:objects:responsefunction:functions:invertenergy [2024/09/16 12:06] – created Maurits W. Haverkort | documentation:language_reference:objects:responsefunction:functions:invertenergy [2024/10/07 14:59] (current) – Aleksandrs Zacinskis | ||
---|---|---|---|
Line 3: | Line 3: | ||
### | ### | ||
- | alligned paragraph text | + | InvertEnergy(G) takes response function $G(\omega)$ as an argument and returns $G(-\omega)$. Argument response function doesn' |
### | ### | ||
Line 9: | Line 9: | ||
### | ### | ||
- | description text | + | This example initializes a response function in the "list of poles" representation and inverts its energy. |
### | ### | ||
==== Input ==== | ==== Input ==== | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | -- some example code | + | NEDOS = 10 |
+ | HalfBW = 1 | ||
+ | dE =HalfBW/ | ||
+ | |||
+ | a0 = {0} | ||
+ | b0 = {} | ||
+ | |||
+ | for i=-NEDOS,NEDOS do | ||
+ | a0[#a0+1] = i * dE -- energy axis from -1 to 1 | ||
+ | b0[#b0+1] = 0.5 -- flat density of states | ||
+ | end | ||
+ | |||
+ | G0 = ResponseFunction.New( {a0, | ||
+ | G0_inv = ResponseFunction.InvertEnergy(G0) | ||
+ | |||
+ | print(ResponseFunction.ToTable(G0)) | ||
+ | print(ResponseFunction.ToTable(G0_inv)) | ||
</ | </ | ||
==== Result ==== | ==== Result ==== | ||
<file Quanty_Output> | <file Quanty_Output> | ||
- | text produced as output | + | { { 0 , -1 , -0.9 , -0.8 , -0.7 , -0.6 , -0.5 , -0.4 , -0.3 , -0.2 , -0.1 , 0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1 } , |
+ | { 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.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | type = ListOfPoles , | ||
+ | mu = 0 , | ||
+ | name = G0 } | ||
+ | |||
+ | { { 0 , 1 , 0.9 , 0.8 , 0.7 , 0.6 , 0.5 , 0.4 , 0.3 , 0.2 , 0.1 , 0 , -0.1 , -0.2 , -0.3 , -0.4 , -0.5 , -0.6 , -0.7 , -0.8 , -0.9 , -1 } , | ||
+ | { 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.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | type = ListOfPoles , | ||
+ | mu = 0 , | ||
+ | name = G0 } | ||
</ | </ | ||