"This notebook corresponds to version {{ version }} of the pipeline tool: https://github.com/NSLS-II/pipelines"
This notebook begins with a raw time-series of images and ends with $g_2(t)$ for a range of $q$, fit to an exponential or stretched exponential, and a two-time correlation functoin.
The important scientific code is imported from the chxanalys and scikit-beam project. Refer to chxanalys and scikit-beam for additional documentation and citation information.
CHX Olog (https://logbook.nsls2.bnl.gov/11-ID/)
Import packages for I/O, visualization, and analysis.
In [1]:
from pyCHX.chx_packages import *
%matplotlib notebook
plt.rcParams.update({'figure.max_open_warning': 0})
plt.rcParams.update({ 'image.origin': 'lower' })
plt.rcParams.update({ 'image.interpolation': 'none' })
import pickle as cpk
from pyCHX.chx_xpcs_xsvs_jupyter_V1 import *
In [2]:
%matplotlib notebook
In [ ]:
In [7]:
cd sample_data
In [4]:
%run ~/Repos/chx_xpcs/chx_xpcs/io/multifile/multifile.py
In [13]:
fp = 'sample_compress.bin'
In [23]:
f = MultifileBNL(fp )
In [37]:
%%timeit
f.rdframe(0)
#f.rdframe(1000 )
f.rdframe(1000 -1 )
f.rdframe(500 -1 )
In [35]:
from pyCHX.chx_packages import *
In [44]:
FD = Multifile(fp )
In [36]:
%%timeit
FD.rdframe(0)
#f.rdframe(1000 )
FD.rdframe(1000 -1 )
FD.rdframe(500 -1 )
In [ ]:
In [ ]:
In [41]:
fp = '/home/yuzhang/analysis/Compressed_Data/uid_fefc3fac-af61-4248-be62-04cdfb231688.cmp'
In [42]:
f = MultifileBNL(fp )
In [43]:
%%timeit
f.rdframe(0)
#f.rdframe(1000 )
f.rdframe(7200 -1 )
f.rdframe(3600 -1 )
In [46]:
FD = Multifile(fp, 0, 7200 )
In [47]:
%%timeit
FD.rdframe(0)
#f.rdframe(1000 )
FD.rdframe(7200 -1 )
FD.rdframe(3600 -1 )
In [48]:
3240//11
Out[48]:
In [49]:
FD.rdframe(1000)
Out[49]:
In [54]:
#(f.rdframe(7000).T - FD.rdframe(7000)).sum()
In [55]:
uid = 'fefc3f'
In [56]:
sud = get_sid_filenames(db[uid])
In [59]:
fp = sud[2][0]
print(fp)
In [63]:
!ls /XF11ID/data/2018/02/15/016f0386-b6e2-4c0a-800d_2701* |wc
In [65]:
#!ls /XF11ID/data/2018/02/15/016f0386-b6e2-4c0a-800d_2701*
In [66]:
pwd
Out[66]:
In [ ]:
In [71]:
%run ~/Repos/chx_xpcs/chx_xpcs/io/eiger/compress_file.py
In [72]:
%%time
compress_file(fp, dset_min=1, dset_max=72, dset_root="/entry/data",
dset_pref="data_", outfile="uid=%s.bin"%uid)
In [ ]:
In [ ]: