Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61644312
fftfreq.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 8, 01:22
Size
690 B
Mime Type
text/x-python
Expires
Fri, May 10, 01:22 (2 d)
Engine
blob
Format
Raw Data
Handle
17358220
Attached To
rTAMAAS tamaas
fftfreq.py
View Options
from
__future__
import
division
__author__
=
"Lucas Frérot"
import
numpy
as
np
from
numpy.fft
import
fftfreq
def
frequencies1D
(
frequencies
):
n
=
len
(
frequencies
)
frequencies
[:]
=
n
*
fftfreq
(
n
)
def
assign2DFrequencies
(
qx
,
qy
,
frequencies
):
qx
,
qy
=
np
.
meshgrid
(
qx
,
qy
,
indexing
=
'ij'
)
frequencies
[:,
:,
0
]
=
qx
frequencies
[:,
:,
1
]
=
qy
def
frequencies2D
(
frequencies
):
n
=
frequencies
.
shape
qx
=
fftfreq
(
n
[
0
])
*
n
[
0
]
qy
=
fftfreq
(
n
[
1
])
*
n
[
1
]
assign2DFrequencies
(
qx
,
qy
,
frequencies
)
def
hfrequencies2D
(
frequencies
):
n
=
frequencies
.
shape
qx
=
fftfreq
(
n
[
0
])
*
n
[
0
]
qy
=
np
.
arange
(
n
[
1
])
assign2DFrequencies
(
qx
,
qy
,
frequencies
)
Event Timeline
Log In to Comment