In [ ]:
%matplotlib inline
In [ ]:
import numpy as np
import scipy as sp
import pylab as plt
import tomotools
import os
In [ ]:
tomo_objects = [
'a12f2b09-b505-4b5b-be81-55db317f5197',
'98f78673-92ec-4b60-a784-7d5d8280bc4b',
'5514c001-5748-4029-885e-b27ccb684682',
'23c3a8a9-048d-408a-b676-24a564ab553c',
'f88e99e9-23ae-40af-8e50-5f32229cd929',
'14ee3d50-6b99-481f-b61b-34496a82a616',
'392b7a4b-36f6-4d30-8ca1-0cf5ee0c6de4',
'0f21251a-1ed6-4b89-a36c-db8078e30aec',
'efee4c82-2e1d-487a-9b2f-95e0cc7dd34d',
'd4c33336-ab3f-4539-9aac-3a32a0ee905b',
'1c3e2f04-239c-4793-ab62-d6ca1af73a12',
'6fb4e2f3-8893-40d9-9246-ef37565a9592',
'173f4f99-0a99-46c3-a3aa-681fa84cca0b'
]
In [ ]:
storage_dir = '/diskmnt/a/makov/robotom/'
plt.figure(figsize=(14,10))
for to in tomotools.log_progress(tomo_objects):
tomo_info = tomotools.get_tomoobject_info(to)
experiment_id = tomo_info['_id']
print(tomo_info['specimen'], experiment_id)
data_file = os.path.join(storage_dir, experiment_id,'amira.raw')
data = np.fromfile(data_file, dtype='float32')
x,y = np.histogram(data,bins=1000);
plt.semilogy(y[:-1],x, label=tomo_info['specimen'])
plt.xlim([0, 3])
plt.grid()
plt.legend(loc=0)
In [ ]:
plt.imshow(data.reshape(817,536,536)[200])
In [ ]:
data.shape[0]/536./536
In [ ]: