Tutorial
See the tutorial jupyter notebook for a worked example.
Minimum needs: a folder containing files representing X-ray diffraction patterns from a in situ cycling experiment.
Optional extra: an electrochemical cycling data file. Currently biologic .mpt files are supported.
Note
Aside from XRD patterns, other 1-D data such as XAS (IR, Raman…) spectra can also be used. The correlation function is agnostic to measurement type.
Aside from battery data, other cycling experiments such as thermal cycling can also be used.
For each in situ experiment, create a cycad object.
from cycad import cycad
run = cycad()
Use the cycad.cycad.read_folder() method to read a list of data files from a folder and specify the file type to be read. Use cycad.cycad.read_data() to read all data files from the folder into the cycad.df dataframe.
run.read_folder('data/', 'csv')
If electrochemical cycling data is available, use cycad.cycad.read_echem_mpt() to read echem data from a mpt file.
run.read_echem_mpt('echem.mpt')
Use cycad.cycad.autocorrelate() and cycad.cycad.autocorrelate_ec() to calculate the autocorrelation matrices for the in situ XRD and cycling voltage data respectively.
run.autocorrelate_ec()
run.autocorrelate()
Finally use cycad.cycad.plot() to plot the autocorrelation matrices. If you have loaded echem data, set the echem parameter to True to plot the echem autocorrelation matrix.
run.plot(echem=True)