Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:objects:responsefunction:functions:invertenergy [2024/10/07 14:59] – Aleksandrs Zacinskis | documentation: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)$. | + | 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/ | dE =HalfBW/ | ||
- | a0 = {0} | + | a = {0} |
- | b0 = {} | + | b = {} |
- | for i=-NEDOS,NEDOS do | + | for i=1,NEDOS do |
- | | + | |
- | | + | |
end | end | ||
- | G0 = ResponseFunction.New( {a0,b0, | + | G0 = ResponseFunction.New( {a,b, |
G0_inv = ResponseFunction.InvertEnergy(G0) | G0_inv = ResponseFunction.InvertEnergy(G0) | ||
- | print(ResponseFunction.ToTable(G0)) | + | print(G0) |
- | print(ResponseFunction.ToTable(G0_inv)) | + | print(G0_inv) |
</ | </ | ||
Line 36: | Line 36: | ||
==== Result ==== | ==== Result ==== | ||
<file Quanty_Output> | <file Quanty_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 , 0.05 , 0.15 , 0.25 , 0.35 , 0.45 , 0.55 , 0.65 , 0.75 , 0.85 , 0.95 } , |
- | { 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 } , | + | { 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 , |
- | + | | |
- | { { 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 , -0.05 , -0.15 , -0.25 , -0.35 , -0.45 , -0.55 , -0.65 , -0.75 , -0.85 , -0.95 } , |
- | { 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 } , | + | { 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 } | ||
</ | </ | ||
===== Table of contents ===== | ===== Table of contents ===== | ||
- | {{indexmenu> | + | {{indexmenu> |