In [1]:
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
import os
from pyxrf.api import *


/Users/lili/miniconda3/envs/pyxrf/lib/python2.7/site-packages/IPython/html.py:14: ShimWarning: The `IPython.html` package has been deprecated. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`.
  "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning)

Define working dir and list of run number for reconstruction


In [3]:
working_dir = '/home/xf03id/data_analysis/tomo_Mar2016/pixel_fitting/'

In [4]:
# create 2d, 3d array to save data
datalist1 = range(7214, 7284, 2)
datalist2 = range(7287, 7335+2, 2)
datalist = datalist1+datalist2

Combine data as a 3D array


In [5]:
element_list = ['Au_L']  # input a list of elements
d3 = combine_data_to_recon(element_list, datalist, working_dir) 
# output d3 is a dictionary of 3d array

Create movie to check


In [6]:
create_movie(d3['Au_L'], 'my_test.mp4')


Save all the data to h5 file for reconstruction


In [ ]:
# define all the angles
angle = np.arange(-90, 90, 3)

In [ ]:
# save all data into one h5 file
h5file_for_recon(d3, angle, filename='recon_data.h5')