Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90350039
wl.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
Thu, Oct 31, 20:19
Size
478 B
Mime Type
text/x-python
Expires
Sat, Nov 2, 20:19 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22058083
Attached To
rLIBMULTISCALE LibMultiScale
wl.py
View Options
import
numpy
as
np
def
compute
(
a
,
ts
):
vec
=
np
.
copy
(
kwargs
[
"amplitudeMax"
])
ts
=
kwargs
[
"step"
]
# r0 = 4.032*np.sqrt(2)/2
r0
=
1
r1
=
r0
*
np
.
sqrt
(
3
)
wlx
=
160
/
(
2.
*
(
ts
+
1
))
*
r0
wly
=
90
/
(
2.
*
(
ts
+
1
))
*
r1
wl_sq
=
1.
/
np
.
sqrt
((
1.
/
wlx
)
**
2
+
(
1.
/
wly
)
**
2
)
vec
.
resize
(
vec
.
shape
[
0
],
vec
.
shape
[
1
]
+
1
)
vec
[:,
vec
.
shape
[
1
]
-
1
]
=
wl_sq
*
np
.
ones
(
vec
.
shape
[
0
])
return
vec
if
__name__
==
"__main__"
:
a
=
np
.
array
([[
2
,
2
],
[
3
,
3
]])
print
compute
(
a
,
1
)
Event Timeline
Log In to Comment