Commit 54e4bc34 authored by Martin Schorb's avatar Martin Schorb
Browse files

mergemap: STDOUT pipe to get rid of temp file

parent 6ac655a0
......@@ -704,12 +704,17 @@ def mergemap(mapitem,crop=False,black=False,blendmont=True):
print('WARNING: Multiple maps stored in an MRC stack without mdoc file for metadata. I will guess the pixel size.')
pixelsize = 1./numpy.sqrt(abs(numpy.linalg.det(mat)))
callcmd = 'extracttilts ' + mapfile + ' -stage -all > syscall.tmp'
callcmd = 'extracttilts ' + mapfile + ' -stage -all'
tilepos1 = loadtext('syscall.tmp')[20:-1]
p2 = Popen(callcmd, shell=True, stdout=PIPE)
for line in p2.stdout:
tilepos1 = o1[20:-1]
tilepos = numpy.array([numpy.fromstring(tilepos1[0],dtype=float,sep=' '),numpy.fromstring(tilepos1[1],dtype=float,sep=' ')])
for item in tilepos1[2:] : tilepos=numpy.append(tilepos,[numpy.fromstring(item,dtype=float,sep=' ')],axis=0)
blendmont = True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment