⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Leginon
All Projects
Leginon
Overview
Activity
Roadmap
Issues
News
Documents
Wiki
Forums
Files
Download (902 Bytes)
RE: Rawtransfer.py not transfering all files.
ยป check_framename.py
Anchi Cheng
, 04/26/2016 11:10 AM
#!/usr/bin/env python
import
sys
from
leginon
import
leginondata
if
len
(
sys
.
argv
)
!=
2
:
print
"Usage: python check_framename.py frame_name"
print
"frame_name is the name of the timestamped directory name of DE or Falcon camera"
print
"or the file name of K2 mrc stack"
sys
.
exit
(
1
)
name
=
sys
.
argv
[
1
]
# Find in CameraEMData whether the name is recorded
q
=
leginondata
.
CameraEMData
()
q
[
'frames name'
]
=
name
results
=
q
.
query
()
if
results
:
for
r
in
results
:
print
'%s is associated with CameraEMData id %d'
%
(
name
,
r
.
dbid
)
print
'frame saving option was %s in that acquisition'
%
(
r
[
'save frames'
])
# Find the image(s) that used this CameraEMData
images
=
leginondata
.
AcquisitionImageData
(
camera
=
r
).
query
()
for
imagedata
in
images
:
print
'Image %s.mrc was acquired with the CameraEMData'
%
(
imagedata
[
'filename'
])
else
:
print
'%s is an orphan that has no Leginon record'
%
name
(1-1/1)
Loading...