<jupyter_start><jupyter_text>Read projections data<jupyter_code>filename = 'mli_L206_HT_650_L3'
projs_path = '/data02/MyArchive/AM_part_Xuan/projs' 
binning = 1 
ntheta = 3000
# z, y, x
point = [500, 2000, 2000]
width = [64, 256, 256]
sz = slice(point[0], point[0] + width[0])
read_fpath = os.path.join(projs_path, filename + '_projs_bin%i_ntheta%i.hdf5'%(binning,ntheta))
with h5py.File(read_fpath, 'r') as hf:
    projs = np.asarray(hf['data'][:,sz,:])
    theta = np.asarray(hf['theta'][:])
    center = float(np.asarray(hf['center'][()]))<jupyter_output><empty_output><jupyter_text>Reconstruct one full slice<jupyter_code>vol_shape = projs.shape[1:] + (projs.shape[-1],)
vol_shape
with cp.cuda.Device(0):
    center = projs.shape[-1]//2.0
    sub_vol = test_recon_patch(projs, theta, center, point, width, apply_fbp=True)
    sub_vol = 1.0*(sub_vol - sub_vol.min()) / (sub_vol.max() - sub_vol.min())
    print("shape of sub_vol: ", sub_vol.shape)
fig, ax = plt.subplots(1,1, figsize = (8,8))
ax.imshow(sub_vol[0], cmap = 'gray')
fig, ax = plt.subplots(1,3, figsize = (12,6))
view_midplanes(sub_vol, ax = ax)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18580192813321647, 'fraction_numerical': 0.049079754601226995, 'mean_word_length': 5.601156069364162, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '59943', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 531, 'n_tokens_neox': 493, 'n_words': 82, 'path': 'scratchpad/sparse_segmentation/notebooks/devel/test_recon_patch_AMpart.ipynb', 'repo_name': 'arshadzahangirchowdhury/TomoEncoders', 'size': '1141'}