<jupyter_start><jupyter_text>Calrep ExampleAn example of using the pyMez function Calrep to create uncertainties for one-port and two-port raw files generated by the HP Basic program measLP. MeasLP will be replaced with a python routine.<jupyter_code>from pyMez import *
# open a raw file in the TESTS_DIRECTORY
file_path=os.path.join(TESTS_DIRECTORY,"CTN208.A1_011613")
raw_measurement=TwoPortRawModel(file_path)
%matplotlib inline
# check the data 
raw_measurement.show();
# now to calrep we just use the calrep function
calrep_measurement=calrep(raw_measurement)
# use the plot_calrep 
plot_calrep(calrep_measurement);<jupyter_output><empty_output><jupyter_text>Comparison of the text versions<jupyter_code>print(raw_measurement)
print(calrep_measurement)
# A plot comparing the two files
plot_calrep_results_comparison(calrep_model=calrep_measurement,results_model=raw_measurement);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0665938864628821, 'fraction_numerical': 0.010917030567685589, 'mean_word_length': 8.967391304347826, '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': '207455', 'license': 'Unlicense', 'n_tokens_mistral': 308, 'n_tokens_neox': 298, 'n_words': 76, 'path': 'Documentation/Examples/jupyter/Calrep_Example.ipynb', 'repo_name': 'aricsanders/pyMez3', 'size': '916'}