Commit ccacfc73 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

decompose_power -> keep_phase_information

parent 4af562db
Pipeline #13254 passed with stage
in 5 minutes and 6 seconds
...@@ -269,7 +269,7 @@ class Field(Loggable, Versionable, object): ...@@ -269,7 +269,7 @@ class Field(Loggable, Versionable, object):
# ---Powerspectral methods--- # ---Powerspectral methods---
def power_analyze(self, spaces=None, logarithmic=False, nbin=None, def power_analyze(self, spaces=None, logarithmic=False, nbin=None,
binbounds=None, decompose_power=True): binbounds=None, keep_phase_information=False):
""" Computes the square root power spectrum for a subspace of `self`. """ Computes the square root power spectrum for a subspace of `self`.
Creates a PowerSpace for the space addressed by `spaces` with the given Creates a PowerSpace for the space addressed by `spaces` with the given
...@@ -294,11 +294,16 @@ class Field(Loggable, Versionable, object): ...@@ -294,11 +294,16 @@ class Field(Loggable, Versionable, object):
binbounds : array-like *optional* binbounds : array-like *optional*
Inner bounds of the bins (default : None). Inner bounds of the bins (default : None).
if binbounds==None : bins are inferred. Overwrites nbins and log if binbounds==None : bins are inferred. Overwrites nbins and log
decompose_power : boolean, *optional* keep_phase_information : boolean, *optional*
Whether the analysed signal-space Field is intrinsically real or If False, return a real-valued result containing the power spectrum
complex and if the power spectrum shall therefore be computed of the input Field.
for the real and the imaginary part of the Field separately If True, return a complex-valued result whose real component
(default : True). contains the power spectrum computed from the real part of the
input Field, and whose imaginary component contains the power
spectrum computed from the imaginary part of the input Field.
The absolute value of this result should be identical to the output
of power_analyze with keep_phase_information=False.
(default : False).
Raise Raise
----- -----
...@@ -371,7 +376,7 @@ class Field(Loggable, Versionable, object): ...@@ -371,7 +376,7 @@ class Field(Loggable, Versionable, object):
pindex = power_domain.pindex pindex = power_domain.pindex
rho = power_domain.rho rho = power_domain.rho
if decompose_power: if keep_phase_information:
hermitian_part, anti_hermitian_part = \ hermitian_part, anti_hermitian_part = \
harmonic_domain.hermitian_decomposition( harmonic_domain.hermitian_decomposition(
self.val, self.val,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment