Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
8857e16f
Commit
8857e16f
authored
Jan 22, 2016
by
Cristian Lalescu
Browse files
remove unused function
parent
8f92a2b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
bfps/tools.py
View file @
8857e16f
...
...
@@ -136,45 +136,6 @@ def padd_with_zeros(
b
[
n1
-
m1
//
2
:
,
n0
-
m0
//
2
:
,
:
m2
//
2
+
1
]
=
a
[
m1
-
m1
//
2
:
,
m0
-
m0
//
2
:
,
:
m2
//
2
+
1
]
return
b
def
_get_kindices
(
n
=
64
):
nx
=
n
nz
=
n
kx
=
np
.
arange
(
0
,
nx
//
2
+
1
,
1
).
astype
(
np
.
float
)
kvals
=
[]
radii
=
set
([])
index
=
[]
for
iz
in
range
(
1
,
kx
.
shape
[
0
]):
for
ix
in
range
(
1
,
kx
.
shape
[
0
]):
kval
=
(
kx
[
iz
]
**
2
+
kx
[
ix
]
**
2
)
**
.
5
tmp
=
math
.
modf
(
kval
)
if
(
tmp
[
0
]
==
0
and
tmp
[
1
]
<=
nx
//
2
):
kvals
.
append
([
kx
[
iz
],
kx
[
ix
]])
radii
.
add
(
math
.
floor
(
kval
))
index
.
append
([
ix
,
iz
])
kvals
=
np
.
array
(
kvals
)
index
=
np
.
array
(
index
)
new_kvals
=
[]
ordered_kvals
=
[]
radius_vals
=
[]
ii
=
[]
for
r
in
radii
:
ncircle
=
np
.
count_nonzero
((
kvals
[:,
0
]
**
2
+
kvals
[:,
1
]
**
2
)
**
.
5
==
r
)
indices
=
np
.
where
((
kvals
[:,
0
]
**
2
+
kvals
[:,
1
]
**
2
)
**
.
5
==
r
)[
0
]
if
ncircle
>
2
:
ordered_kvals
.
append
(
kvals
[
indices
])
new_kvals
+=
list
(
kvals
[
indices
])
radius_vals
.
append
(
r
)
ii
+=
list
(
index
[
indices
])
ii
=
np
.
array
(
ii
)
good_indices
=
np
.
where
(
ii
[:,
1
]
>
0
)[
0
]
i1
=
(
kx
.
shape
[
0
]
-
1
)
*
2
-
ii
[
good_indices
,
1
]
i0
=
ii
[
good_indices
,
0
]
i1
=
np
.
concatenate
((
ii
[:,
1
],
i1
)),
i0
=
np
.
concatenate
((
ii
[:,
0
],
i0
)),
return
np
.
vstack
((
i0
,
i1
)).
T
.
copy
()
try
:
import
sympy
as
sp
rational0
=
sp
.
Rational
(
0
)
...
...
Write
Preview
Supports
Markdown
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