Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102775723
generate-data.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
Mon, Feb 24, 02:00
Size
407 B
Mime Type
text/x-python
Expires
Wed, Feb 26, 02:00 (2 d)
Engine
blob
Format
Raw Data
Handle
24424499
Attached To
R7571 SP4E-TB-TL-FR
generate-data.py
View Options
#!/usr/bin/python
import
numpy
as
np
import
random
a
=
0.1
npoints
=
100
data
=
np
.
zeros
([
3
,
npoints
])
random
.
seed
=
100
for
i
in
range
(
0
,
npoints
):
data
[
0
,
i
]
=
float
(
i
)
data
[
1
,
i
]
=
float
(
i
)
*
a
data
[
2
,
i
]
=
float
(
i
)
*
a
+
random
.
gauss
(
0.
,
1.
)
f
=
open
(
'data.plot'
,
'w'
)
for
i
in
range
(
0
,
npoints
):
line
=
"{0}
\t
{1}
\t
{2}
\n
"
.
format
(
data
[
0
,
i
],
data
[
1
,
i
],
data
[
2
,
i
])
f
.
write
(
line
)
f
.
close
()
Event Timeline
Log In to Comment