Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F70078902
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
Fri, Jul 5, 04:24
Size
386 B
Mime Type
text/x-python
Expires
Sun, Jul 7, 04:24 (2 d)
Engine
blob
Format
Raw Data
Handle
18784942
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
=
np
.
amin
(
positionsy
)
ymax
=
np
.
amax
(
positionsy
)
weights
=
[(
i
-
ymin
)
/
(
ymax
-
ymin
)
for
i
in
positions
[:,
1
]
]
weights
=
np
.
array
(
weights
)
# print weights
return
weights
Event Timeline
Log In to Comment