dlsmicro.backend.io¶
Module for parsing data exported from Zetasizer software
-
dlsmicro.backend.io.read_zetasizer_csv_to_dict(file_path, row, intensities_rows=None, column_order=['Record', 'Sample Name', 'Measurement Position', 'Correlation Data', 'Correlation Delay Times', 'Distribution Fit Data', 'Distribution Fit Delay Times', 'Cumulants Fit Data', 'Cumulants Fit Delay Times', 'Derived Count Rate', 'Measured Intercept', 'Measured Baseline'], use_zetasizer_g1=True)[source]¶ Read csv file exported from the Zetasizer software to a dictionary containing data relevant to DLS microrheology analysis
Parameters: - file_path (str) – Path to the .csv file to be read
- row (int) – Row number (0-indexed) for the measurement record containing the correlation data
- intensities_rows (list of int, optional) – List of rows (0-indexed) corresponding to the
scattering intensity measurements for the
broken-ergodicity
correction. If
None, it is assumed that the intensity measurements begin after the row number for the correlation data and end at the last row of the .csv file. - column_order (list of str, optional) – Ordered list names for the columns in the .csv file
(depends on your export template). If you use
the dlsmicro_export.edf, this parameter is not necessary.
See
dlsmicro.io.default_column_order - use_zetasizer_g1 (boolean, optional) –
If True, the estimated intermediate scattering function g1, measured baseline, and measured intercept exported by the Zetasizer software are used to calculate the correlation function. This is useful because g1 is exported at higher numerical precision than the correlation function. The g1 exported from the Zetasizer is not the true g1 for non-ergodic samples, but this option correctly inverts the formula used by
the Zetasizer.
Returns: - data_dict (dictionary) – Python dictionary containing the keys below
- ’time_lag’ (1d-array) – Vector of time-lags (in microseconds) at which the correlation function is measured.
- ’correlation’ (1d-array) – Vector of values of the correlation coefficient at the
time-lags
data_dict['time_lag'] - ’point_intensity’ (float) – Scattering intensity at the measurement position where
data_dict['correlation']is collected - ’ensemble_intensity’ (1d-array)
- ’point_position’ (float) – Meausrement position in the cuvette (in mm) where the
data for the
correlation function
data_dict['correlation']is collected - ’ensemble_positions’ (1-d array) – Vector of measurement positions in the cuvette
corresponding to
the scattering intensities in
data_dict['ensemble_intensity']
Notes
This function will correctly parse the .csv file generated using the dlsmicro_export.edf Zetasizer software template. If you would like to use this function for parsing .csv files from a different user-generated Zetasizer template, the following parameters must be exported. In addition, a list of the paramters in the order in which they occur in the .csv columns must be supplied. Note that if generating your own Zetasizer template, you should not use the “include headers” option. This does not work well for exporting the correlation data.
- ‘Correlation Data’ : Zetasizer exports ss a string of comma separated
- values, e.g. “1.000, 0.987, 0.921, …”
- ‘Correlation Data Delay Times’ : Zetasizer exports as a string of comma
- separated values, e.g. “0.50, 1.0, 1.5, …”
‘Derived Count Rate’ ‘Measurement Position’
If
use_zetsizer_g1==True, then the export templatemustalso include the following: ‘Distribution Fit Data’: Zetasizer exports as a string of comma separatedvalues, e.g. “0.50, 1.0, 1.5, …”- ‘Distribution Fit Delay Times’: Zetasizer exports as a string of comma
- separated values, e.g. “0.50, 1.0, 1.5, …”
‘Measured Intercept’ ‘Measured Baseline’