<jupyter_start><jupyter_text>[![Notebook Tutorial](__code/__all/notebook_tutorial.png)](https://neutronimaging.pages.ornl.gov/tutorial/notebooks/dual_energy)   Select Your IPTS<jupyter_code>import warnings
warnings.filterwarnings('ignore')

from __code.dual_energy.dual_energy import Interface, DualEnergy

from __code import system
system.System.select_working_dir()
from __code.__all import custom_style
custom_style.style()<jupyter_output><empty_output><jupyter_text>UI setup<jupyter_code>%gui qt<jupyter_output><empty_output><jupyter_text>Select data input folder<jupyter_code>o_dual = DualEnergy(working_dir=system.System.get_working_dir())
o_dual.select_working_folder()<jupyter_output><empty_output><jupyter_text>Launch UI<jupyter_code>o_interface = Interface(o_dual=o_dual, spectra_file=o_dual.spectra_file)
o_interface.show()<jupyter_output><empty_output><jupyter_text>DEBUGGING<jupyter_code>import warnings
warnings.filterwarnings('ignore')

from __code.dual_energy.dual_energy import Interface, DualEnergy
import glob
import os
%gui qt
data_path = '/Users/j35/IPTS/VENUS/IPTS-25778_normalized'
list_data = glob.glob(data_path + "*.tif")
spectra_file = os.path.join(data_path, "Image019_Spectra.txt")
assert os.path.exists(spectra_file)

o_dual = DualEnergy(working_dir=data_path)
o_dual.load_data(data_path)
o_interface = Interface(o_dual=o_dual,
                       working_dir=data_path,
                       spectra_file=spectra_file)
o_interface.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10585885486018642, 'fraction_numerical': 0.006657789613848202, 'mean_word_length': 8.10909090909091, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '354026', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 576, 'n_tokens_neox': 536, 'n_words': 64, 'path': 'notebooks/dual_energy.ipynb', 'repo_name': 'mabrahamdevops/python_notebooks', 'size': '1502'}