<jupyter_start><jupyter_text>Load YAML file The file paths and user inputs for the analysis of the Diamond 2021 experiments are included in the `yaml` configuration files, to record the inputs of the analysis.The information in the `yaml` file can be accessed like this.<jupyter_code># to load the Diamond 2021 analysis
config_path = "yaml/config_diamond_2021.yaml"
config = functions.get_config(config_path)<jupyter_output><empty_output><jupyter_text>Comparing texture strength results for the `Diamond 2021` experiment  Load the ${\alpha}$-phase texture results from EBSD, SXRD-CPF and SXRD-MAUD Load the texture strengths for the data refined using EBSD and write the results to new arrays.<jupyter_code>ebsd_alpha_results = functions.load_ebsd_alpha(config_path)<jupyter_output><empty_output><jupyter_text>Load the texture strengths for the data refined using direct intensities from Continuous-Peak-Fit using Fourier peak analysis and write the results to new arrays.<jupyter_code>cpf_alpha_results = functions.load_sxrd_cpf_alpha(config_path)<jupyter_output><empty_output><jupyter_text>Load the texture strengths for the data refined using the Rietveld method in MAUD and write the results to new arrays.<jupyter_code>maud_alpha_results = functions.load_sxrd_maud_alpha(config_path)<jupyter_output><empty_output><jupyter_text>Plotting the ${\alpha}$-phase texture variation Define the output folder, phase and experiment number for plotting the data.Then, plot the texture strength variation with image number, representing **${\alpha}$-phase** texture strength variation across the rolled Ti-64 sample, as recorded by the different EBSD and SXRD analysis methods.<jupyter_code>output_folder = config["file_paths"]["output_folder"]
print("The output folder is: ", output_folder, sep = '\n', end = '\n\n')
phase_1 = config["user_inputs"]["phase_1"]
print("The first phase to analyse is: ", phase_1, sep = '\n', end = '\n\n')
sxrd_experiment_number = config["user_inputs"]["sxrd_experiment_number"]
print("The SXRD experiment number is: ", sxrd_experiment_number, sep = '\n', end = '\n\n')

texture_strength_types = ["texture_index", "odf_max", "0002_pf_max", "10-10_pf_max", "11-20_pf_max"]
for texture_strength_type in texture_strength_types:
    print("The plots below show the variation in ", texture_strength_type, " across the sample", end = '\n\n')
    functions.plot_texture_strength(sxrd_experiment_number, phase_1, texture_strength_type, output_folder, 
                                    ebsd_alpha_results, cpf_alpha_results, maud_alpha_results)<jupyter_output><empty_output><jupyter_text>Plotting the ${\alpha}$-phase texture variation as a map We can also plot the **${\alpha}$-phase** texture strength variation as a two-dimensional map. Here, we are looking at the maximum pole figure intensity variation for different lattice plane peaks across the Ti-64 sample.<jupyter_code>texture_strength_type = "0002_pf_max"
v_min = 1
v_max = 7
c_map = "Reds"
functions.plot_sxrd_map(sxrd_experiment_number, phase_1, texture_strength_type, output_folder, 
                       cpf_alpha_results, c_map, v_min, v_max)

texture_strength_type = "10-10_pf_max"
v_min = 1
v_max = 2.5
c_map = "Blues"
functions.plot_sxrd_map(sxrd_experiment_number, phase_1, texture_strength_type, output_folder, 
                       cpf_alpha_results, c_map, v_min, v_max)

texture_strength_type = "11-20_pf_max"
v_min = 1
v_max = 4
c_map = "Greens"
functions.plot_sxrd_map(sxrd_experiment_number, phase_1, texture_strength_type, output_folder, 
                       cpf_alpha_results, c_map, v_min, v_max)<jupyter_output><empty_output><jupyter_text>Load the ${\beta}$-phase texture results from EBSD, SXRD-CPF and SXRD-MAUD Load the texture strengths for the data refined using EBSD and write the results to new arrays.<jupyter_code>ebsd_beta_results = functions.load_ebsd_beta(config_path)<jupyter_output><empty_output><jupyter_text>Load the texture strengths for the data refined using direct intensities from Continuous-Peak-Fit using Fourier peak analysis and write the results to new arrays.<jupyter_code>cpf_beta_results = functions.load_sxrd_cpf_beta(config_path)<jupyter_output><empty_output><jupyter_text>Load the texture strengths for the data refined using the Rietveld method in MAUD and write the results to new arrays.<jupyter_code>maud_beta_results = functions.load_sxrd_maud_beta(config_path)<jupyter_output><empty_output><jupyter_text>Plotting the ${\beta}$-phase texture variation Define the output folder, phase and experiment number for plotting the data.Then, plot the texture strength variation with image number, representing **${\beta}$-phase** texture strength variation across the rolled Ti-64 sample, as recorded by the different EBSD and SXRD analysis methods.<jupyter_code>output_folder = config["file_paths"]["output_folder"]
print("The output folder is: ", output_folder, sep = '\n', end = '\n\n')
phase_2 = config["user_inputs"]["phase_2"]
print("The first phase to analyse is: ", phase_2, sep = '\n', end = '\n\n')

texture_strength_types = ["texture_index", "odf_max", "001_pf_max", "110_pf_max", "111_pf_max"]
for texture_strength_type in texture_strength_types:
    print("The plots below show the variation in ", texture_strength_type, " across the sample", end = '\n\n')
    functions.plot_texture_strength(sxrd_experiment_number, phase_2, texture_strength_type, output_folder, 
                                    ebsd_beta_results, cpf_beta_results, maud_beta_results)<jupyter_output><empty_output><jupyter_text>Plotting the ${\beta}$-phase texture variation as a map We can also plot the **${\beta}$-phase** texture strength variation as a two-dimensional map. Here, we are looking at the maximum pole figure intensity variation for different lattice plane peaks across the Ti-64 sample.<jupyter_code>texture_strength_type = "001_pf_max"
v_min = 1
v_max = 6
c_map = "Reds"
functions.plot_sxrd_map(sxrd_experiment_number, phase_2, texture_strength_type, output_folder, 
                       cpf_beta_results, c_map, v_min, v_max)

texture_strength_type = "110_pf_max"
v_min = 1
v_max = 5
c_map = "Greens"
functions.plot_sxrd_map(sxrd_experiment_number, phase_2, texture_strength_type, output_folder, 
                       cpf_beta_results, c_map, v_min, v_max)

texture_strength_type = "111_pf_max"
v_min = 1
v_max = 5
c_map = "Blues"
functions.plot_sxrd_map(sxrd_experiment_number, phase_2, texture_strength_type, output_folder, 
                       cpf_beta_results, c_map, v_min, v_max)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08746000304738687, 'fraction_numerical': 0.01417034892579613, 'mean_word_length': 5.725409836065574, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '327069', 'license': 'MIT', 'n_tokens_mistral': 2168, 'n_tokens_neox': 2010, 'n_words': 584, 'path': 'texture_strength_comparison_diamond_2021.ipynb', 'repo_name': 'christopher-daniel/texture-strength-comparison', 'size': '6563'}