<jupyter_start><jupyter_text>Processing UV-Vis spectra obtained from the Beckman Coulter DU-640 spectrophotometer0. Imports<jupyter_code>import os
from .util import isFloat<jupyter_output><empty_output><jupyter_text>1. The following is an example of an absorption spectrum text file obtained form the Beckman Coulter DU-640 spectrophotometer. User ID: DU600Method ID: A:\DEFAULTDate: 07/25/00Time: 12:02 200.0   0.25060  201.0   0.25706  202.0   0.25690  203.0   0.26161  204.0   0.26775  205.0   0.27486  206.0   0.27792  207.0   0.28106<jupyter_code>def readSpectrumFromFile(path_to_file):
    '''Extracts the absorption spectrum from the text file generated by a Beckman Coulter DU-640 spectrophotometer

    Parameters
    ----------
    path_to_file : string
        Path used to locate the spectrum text file.

    Returns
    -------
    array of tuples
       absorption spectrum
       The first element of each tuple is the wavelength in nanometers. 
       The second element is the absorbance measurement in absorbance units.
    '''
    with open(path_to_file) as f:
        spectrum = [
            tuple(map(float, line.strip().split())) 
            for line in f.readlines()
                if (line.strip() and all([isFloat(word) for word in line.strip().split()]))
        ]
    return spectrum<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08786299329858525, 'fraction_numerical': 0.0774385703648548, 'mean_word_length': 2.9069767441860463, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '616008', 'license': 'MIT', 'n_tokens_mistral': 481, 'n_tokens_neox': 399, 'n_words': 132, 'path': 'DU640_spectrum.ipynb', 'repo_name': 'SamuelFigueroa/kinetics', 'size': '1343'}