Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
79f1e164
Commit
79f1e164
authored
Apr 09, 2021
by
Philipp Arras
Browse files
Formatting
parent
64034398
Changes
3
Hide whitespace changes
Inline
Side-by-side
demos/getting_started_density.py
View file @
79f1e164
...
...
@@ -26,8 +26,8 @@
# Demo takes a while to compute
#############################################################
import
sys
import
numpy
as
np
import
nifty7
as
ift
...
...
@@ -236,4 +236,4 @@ if __name__ == "__main__":
)
plot
.
output
(
ny
=
2
,
nx
=
2
,
xsize
=
15
,
ysize
=
15
,
name
=
filename_res
)
print
(
"Saved results as '{}'."
.
format
(
filename_res
))
\ No newline at end of file
print
(
"Saved results as '{}'."
.
format
(
filename_res
))
src/library/correlated_fields.py
View file @
79f1e164
...
...
@@ -24,7 +24,6 @@ from operator import mul
import
numpy
as
np
from
..
import
utilities
from
..logger
import
logger
from
..domain_tuple
import
DomainTuple
from
..domains.power_space
import
PowerSpace
from
..domains.unstructured_domain
import
UnstructuredDomain
...
...
@@ -256,7 +255,7 @@ class _AmplitudeMatern(Operator):
vol1
[
1
:]
=
totvol
**
0.5
vol0
=
Adder
(
makeField
(
pow_spc
,
vol0
))
vol1
=
DiagonalOperator
(
makeField
(
pow_spc
,
vol1
))
op
=
vol0
@
(
vol1
@
op
)
op
=
vol0
@
vol1
@
op
# std = sqrt of integral of power spectrum
self
.
_fluc
=
op
.
power
(
2
).
integrate
().
sqrt
()
...
...
src/library/nft.py
View file @
79f1e164
...
...
@@ -21,9 +21,9 @@ from scipy.constants import speed_of_light
from
..domain_tuple
import
DomainTuple
from
..domains.rg_space
import
RGSpace
from
..domains.unstructured_domain
import
UnstructuredDomain
from
..fft
import
nthreads
from
..operators.linear_operator
import
LinearOperator
from
..sugar
import
makeDomain
,
makeField
from
..fft
import
nthreads
class
Gridder
(
LinearOperator
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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