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

Stitch data from different h5 files, and create a new h5 file containing all the datasets


In [22]:
wd = '/Users/Li/Downloads/xrf_data/twin_boundary_stitch'

In [23]:
num = np.arange(2468, 2493)
filelist = [str(n)+'.h5' for n in num]        # all the individual h5 file to be stitched

In [24]:
outfile = 'test.h5'   # name of output h5 file

In [25]:
shape = [6,5]  # shape of different regions to be stitched

In [26]:
make_hdf_stitched(wd, filelist, outfile, shape)


Reading data from each hdf file.
Saving all the data into one hdf file.
Done!

In [ ]: