Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
f4d1a7e9
Commit
f4d1a7e9
authored
Feb 21, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc fixes (?)
parent
b221f12d
Pipeline
#25265
passed with stages
in 5 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
nifty4/sugar.py
nifty4/sugar.py
+6
-9
No files found.
nifty4/sugar.py
View file @
f4d1a7e9
...
...
@@ -45,13 +45,13 @@ def _single_power_analyze(field, idx, binbounds):
def
power_analyze
(
field
,
spaces
=
None
,
binbounds
=
None
,
keep_phase_information
=
False
):
""" Computes the
square root
power spectrum for a subspace of `field`.
""" Computes the power spectrum for a subspace of `field`.
Creates a PowerSpace for the space addressed by `spaces` with the given
binning and computes the power spectrum as a Field over this
PowerSpace. This can only be done if the subspace to be analyzed is a
harmonic space. The resulting field has the same units as the
initial
field, corresponding to the square root of the power spectrum
.
harmonic space. The resulting field has the same units as the
square of the
initial field
.
Parameters
----------
...
...
@@ -106,9 +106,7 @@ def power_analyze(field, spaces=None, binbounds=None,
parts
=
[
field
.
real
*
field
.
real
+
field
.
imag
*
field
.
imag
]
for
space_index
in
spaces
:
parts
=
[
_single_power_analyze
(
field
=
part
,
idx
=
space_index
,
binbounds
=
binbounds
)
parts
=
[
_single_power_analyze
(
part
,
space_index
,
binbounds
)
for
part
in
parts
]
return
parts
[
0
]
+
1j
*
parts
[
1
]
if
keep_phase_information
else
parts
[
0
]
...
...
@@ -152,9 +150,8 @@ def create_power_operator(domain, power_spectrum, space=None):
"""
domain
=
DomainTuple
.
make
(
domain
)
space
=
utilities
.
infer_space
(
domain
,
space
)
return
DiagonalOperator
(
_create_power_field
(
domain
[
space
],
power_spectrum
),
domain
=
domain
,
spaces
=
space
)
field
=
_create_power_field
(
domain
[
space
],
power_spectrum
)
return
DiagonalOperator
(
field
,
domain
,
space
)
def
create_harmonic_smoothing_operator
(
domain
,
space
,
sigma
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment