<jupyter_start><jupyter_text>Cut data in time dimension<jupyter_code># truncate the data and save

cut_im = np.squeeze(imarray[:,:500,:,:,:,:])
display(type(cut_im))
display(cut_im.dtype)
cut_im.shape
import tifffile as tiff
tiff.imwrite(root_session_folder + 'cutTiff/temp_suite2p_mc.tif', cut_im)
# save cut data as h5
hf = h5py.File(folder + 'cutTiff/cutH5.h5', 'w')
hf.create_dataset('imaging', data=cut_im)
hf.close()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup