xrd_tools.plugins package
Submodules
xrd_tools.plugins.refinement_profex module
A xrd-tools refinement interface plugin that integrates Profex/BGMN.
- class xrd_tools.plugins.refinement_profex.ProfexInterface(measurement_id: str, data: Series, dir_refinement: str, encoding: str, input_data_suffix: str = '', input_data_header: bool = False, input_data_delimiter: str = ' ', name_phases: str = 'phases')[source]
Bases:
RefinementInterface
Profex/BGMN refinement interface.
- Parameters:
measurement_id (str) – ID of the measurement to be refined with profex.
data (pd.Series) – Series containing the x/y data of the measurement. The index represents the 2θ angle in °.
dir_refinement (str) – Path to the refinement project directory.
encoding (str) – Encoding used in refinement input data file.
input_data_suffix (str) – Suffix appended to
measurement_id
to generate refinement input- and project- filenames. Since the input data filename (without extension) is used as project name by profex, it is recommended to provide no suffix for the refinement files.input_data_delimiter (str) – Delimeter to be used for creation of refinement input data file (profex can not read-in comma separated values).
input_data_header (bool) – Option to ignore header for creation of refinement input data file.
- data: Series
- dir_refinement: str
- encoding: str
- property file_refinement_input: str
Path to
*.xy
refinement input data file.It is constructed as follows:
<dir_refinement>/<measurement_id><suffix_data>.xy
- property file_refinement_project: str
Path to
*.dia
refinement project file.It is constructed as follows:
<dir_refinement>/<measurement_id><suffix_data>.dia
- get_cif_files() dict[str, str] [source]
Get a dictionary with the name and the path to the cif files for a refined phases.
- get_composition(mass_frac_prefix='Q') dict[uncertainties.core.AffineScalarFunc] [source]
Get the composition of the refined sample.
- get_refined_data(i_calc: str, i_bg: str) DataFrame [source]
Get a pandas DataFrame containing the refined data series.
- Parameters:
i_calc (str) – Column name for the calculated intensities.
i_bg (str) – Column name for the background intensities.
- Returns:
A DataFrame with index set to 2θ and an index name as found in the provided data. The columns correspond to: - I_calc with column name provided as argument, - I_bg with column name provided as argument, and - a further column for each phase refined, named with its name as defined
in profex.
- Return type:
pd.DataFrame
- get_refinement_result() RefinementResult [source]
Get a RefinementResults object for the refinement of the measurement.
- input_data_delimiter: str = ' '
- input_data_header: bool = False
- input_data_suffix: str = ''
- measurement_id: str
- name_phases: str = 'phases'
- open_refinement() None [source]
Open the refinement project with profex.
- Raises:
AppNotInstalledError – If profex is not installed on the machine.