⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Leginon
All Projects
Leginon
Overview
Activity
Roadmap
Issues
News
Documents
Wiki
Forums
Files
Download (871 Bytes)
Make DDD movie stack
» correctstack.py
Anchi Cheng
, 07/20/2014 08:08 AM
#!/usr/bin/env python
import
sys
from
appionlib
import
apDDprocess
,
apDatabase
from
pyami
import
mrc
if
__name__
==
'__main__'
:
dd
=
apDDprocess
.
DirectDetectorProcessing
()
if
len
(
sys
.
argv
)
!=
2
:
print
'Usage: correctframes.py image'
print
' image (str or int): imagefilename or imageid'
sys
.
exit
()
imagevalue
=
sys
.
argv
[
1
]
try
:
imageid
=
int
(
imagevalue
)
# imagevalue is database imageid (an integer)
imagedata
=
apDatabase
.
getImageDataFromSpecificImageId
(
imageid
)
except
ValueError
:
# imagevalue is filename
imgtree
=
apDatabase
.
getSpecificImagesFromDB
([
imagevalue
])
imagedata
=
imgtree
[
0
]
imageid
=
imagedata
.
dbid
# choose the subclass to initiate using the session name
dd
=
apDDprocess
.
initializeDDFrameprocess
(
imagedata
[
'session'
][
'name'
],
False
)
dd
.
setImageData
(
imageid
)
stackpath
=
dd
.
makeCorrectedRawFrameStack
(
'.'
)
print
stackpath
« Previous
1
2
3
Next »
(2-2/3)
Loading...