⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Leginon
All Projects
Leginon
Overview
Activity
Roadmap
Issues
News
Documents
Wiki
Forums
Files
Download (541 Bytes)
RE: upload helical picking from EMAN1/2 to Appion
ยป convert.py
Rui Zhang
, 12/28/2017 12:13 PM
#!/usr/bin/env python
import
os
count
=
1
fout
=
file
(
'particledata-test.csv'
,
"w"
)
fout
.
write
(
"particle# x_coord y_coord helix_num image_name
\n
"
)
box
=
300
for
i
in
range
(
675
):
try
:
f1
=
file
(
"17dec01x_%03d.box"
%
i
)
except
:
continue
l1
=
f1
.
readlines
()
n
=
len
(
l1
)
MT
=
0
for
j
in
range
(
n
):
tmp
=
l1
[
j
].
split
()
if
int
(
tmp
[
-
1
])
==
-
1
:
MT
+=
1
cen_x
=
int
(
tmp
[
0
])
+
box
/
2
cen_y
=
int
(
tmp
[
1
])
+
box
/
2
fout
.
write
(
"%d
\t
%d
\t
%d
\t
%d
\t
17dec01x_%03d
\n
"
%
(
count
,
cen_x
,
cen_y
,
MT
,
i
))
count
+=
1
f1
.
close
()
fout
.
close
()
(1-1/1)
Loading...