Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73676865
weights.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
Tue, Jul 23, 15:14
Size
379 B
Mime Type
text/x-python
Expires
Thu, Jul 25, 15:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19248713
Attached To
rLIBMULTISCALE LibMultiScale
weights.py
View Options
#!/usr/bin/env python
import
numpy
as
np
import
sys
def
compute
(
**
kwargs
):
# print kwargs
positions
=
kwargs
[
'ComputeExtract:PADAssociation:coupling'
]
positionsy
=
positions
[:,
1
]
ymin
=
positionsy
.
min
()
ymax
=
positionsy
.
max
()
weights
=
[(
i
-
ymin
)
/
(
ymax
-
ymin
)
for
i
in
positions
[:,
1
]
]
weights
=
np
.
array
(
weights
)
print
weights
return
weights
Event Timeline
Log In to Comment