<jupyter_start><jupyter_text>Beamline 2-1 Samples<jupyter_code>import sys, os
sys.path.append(os.path.join('..','src'))
from helper_functions import * 
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)<jupyter_output><empty_output><jupyter_text>Load in data from XY files  Here X is stored as a dictionary of dataframes corresponding to each XY file. Y comes from a csv which contain the true lattice parameters, crystal system and wavelength<jupyter_code>X = np.load("../data/Xdata.npy",allow_pickle=True).item()
Y = pd.read_csv("../data/ssrl_labels.csv")
Y.head()<jupyter_output><empty_output><jupyter_text>Predictions on SSRL data using trained ML models<jupyter_code>for i in range(len(Y)):
    row = Y.iloc[i,:]
    
    name = row['Material']
    wavelength = row['Wavelength']
    crystal_system = row['Crystal System']
    Xdata = X[name]
    y_true = np.sort(row[['a','b','c']])
    
    print("Analysing sample: {}, with crystal system: {} and wavelength: {}".format(name, crystal_system, wavelength))
    predictExptDataPipeline(Xdata, y_true, crystal_system=crystal_system, measured_wavelength=wavelength)<jupyter_output>Analysing sample: BL21Robot_0001, with crystal system: cubic and wavelength: 0.7295684
{'fraction_non_alphanumeric': 0.12232415902140673, 'fraction_numerical': 0.013761467889908258, 'mean_word_length': 5.644670050761421, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '331668', 'license': 'MIT', 'n_tokens_mistral': 459, 'n_tokens_neox': 435, 'n_words': 108, 'path': 'examples/predictions.ipynb', 'repo_name': 'src47/DeepLPnet', 'size': '1308'}