Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
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
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
30f0c275
Commit
30f0c275
authored
May 22, 2017
by
Theo Steininger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed indentation in in sugar.py
parent
2580647e
Pipeline
#12807
passed with stage
in 4 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
nifty/sugar.py
nifty/sugar.py
+24
-24
No files found.
nifty/sugar.py
View file @
30f0c275
...
@@ -26,30 +26,30 @@ __all__ = ['create_power_operator']
...
@@ -26,30 +26,30 @@ __all__ = ['create_power_operator']
def
create_power_operator
(
domain
,
power_spectrum
,
dtype
=
None
,
def
create_power_operator
(
domain
,
power_spectrum
,
dtype
=
None
,
distribution_strategy
=
'not'
):
distribution_strategy
=
'not'
):
"""
Creates a diagonal operator with a certain power spectrum.
"""
Creates a diagonal operator with a certain power spectrum.
Constructs a diagonal operator that lives over the specified domain, or
Constructs a diagonal operator that lives over the specified domain, or
its harmonic domain in case it is not harmonic.
its harmonic domain in case it is not harmonic.
Parameters
Parameters
----------
----------
domain : DomainObject
domain : DomainObject
Domain over which the power operator shall live. If this is not a
Domain over which the power operator shall live. If this is not a
harmonic domain, it will return an operator for its harmonic domain
harmonic domain, it will return an operator for its harmonic domain
instead.
instead.
power_spectrum : {array-like, method}
power_spectrum : {array-like, method}
An array-like object, or a method that implements the square root
An array-like object, or a method that implements the square root
of a power spectrum as a function of k.
of a power spectrum as a function of k.
dtype : type, *optional*
dtype : type, *optional*
dtype that the field holding the power spectrum shall use
dtype that the field holding the power spectrum shall use
{default : None}
{default : None}
if dtype == None: passes this on to constructor of Field
if dtype == None: passes this on to constructor of Field
distribution_strategy : string, *optional*
distribution_strategy : string, *optional*
Distributed strategy to be used by the underlying d2o objects.
Distributed strategy to be used by the underlying d2o objects.
{default : 'not'}
{default : 'not'}
Returns
Returns
-------
-------
DiagonalOperator : An operator that lives that implements the given power
DiagonalOperator : An operator that lives that implements the given power
spectrum.
spectrum.
"""
"""
if
not
domain
.
harmonic
:
if
not
domain
.
harmonic
:
fft
=
FFTOperator
(
domain
)
fft
=
FFTOperator
(
domain
)
domain
=
fft
.
target
[
0
]
domain
=
fft
.
target
[
0
]
...
...
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