ess.nmx.mtz_io.process_single_mtz_to_dataframe#
- ess.nmx.mtz_io.process_single_mtz_to_dataframe(mtz, wavelength_column_name='LAMBDA', intensity_column_name='I', intensity_sig_col_name='SIGI')[source]#
Select and derive columns from the original
MtzDataFrame.- Parameters:
mtz (
Mtz) – The raw mtz dataset.wavelength_column_name (
mtz_io.WavelengthColumnName(str), default:'LAMBDA') – The name of the wavelength column in the mtz file.intensity_column_name (
mtz_io.IntensityColumnName(str), default:'I') – The name of the intensity column in the mtz file.intensity_sig_col_name (
mtz_io.StdDevColumnName(str), default:'SIGI') – The name of the standard uncertainty of intensity column in the mtz file.
- Returns:
mtz_io.MtzDataFrame(pandas.core.frame.DataFrame) – The new mtz dataframe with derived and renamed columns.The derived columns are:
hkl: The miller indices as a list of integers.d: The d-spacing calculated from the miller indices.:math:
\dfrac{2}{d^{2}} = \dfrac{\sin^2(\theta)}{\lambda^2}
resolution: The resolution calculated from the d-spacing.
For consistent names of columns/coordinates, the following columns are renamed:
wavelength_column_name->'wavelength'intensity_column_name->'I'intensity_sig_col_name->'SIGI'
Other columns are kept as they are.
Notes
pandas.DataFrameis used from loading to merging, butgemmi.Mtzhasgemmi.Mtz:calculate_d()that can derive thedusingHKL. This part of the method must be called on each mtz file separately.