<jupyter_start><jupyter_text>Density of States Analysis Example* Given sample and empty-can data, compute phonon DOS* To use this notebook, first click jupyter menu File->Make a copy* Click the title of the copied jupyter notebook and change it to a new title* Start executing cells  Preparation<jupyter_code># where am I now?
!pwd
# create a new working directory and change into it
workdir = '~/reduction/ARCS/getdos-multiple-Ei-demo'
!mkdir -p {workdir}
%cd {workdir}
# Data to reduce. Change the IPTS number and run numbers to suit your need
samplenxs = "/SNS/ARCS/IPTS-15398/shared/mantid_reduce/non-radC/non-radC_130p00.nxspe"
mtnxs = "/SNS/ARCS/IPTS-15398/shared/mantid_reduce/MT/MT_130p00.nxspe"
initdos = '/SNS/ARCS/IPTS-15398/shared/getdos/graphite-Ei_300-dos.h5'<jupyter_output><empty_output><jupyter_text>Run GetDOS<jupyter_code># import tools
import os, numpy as np
from multiphonon.getdos import notebookUI
import histogram.hdf as hh, histogram as H
%matplotlib notebook
from matplotlib import pyplot as plt
# create the UI for the first time
notebookUI(samplenxs, mtnxs, initdos=initdos, load_options_path='/SNS/ARCS/IPTS-15398/shared/getdos/130meV-getdos-opts.yaml')<jupyter_output><empty_output><jupyter_text>Check output<jupyter_code>ls work/
dos0= hh.load(initdos)
plt.plot(dos0.E, dos0.I, '+', label='DOS from Ei=300meV data')
dos = hh.load('work/final-dos.h5')
plt.plot(dos.E, dos.I, label='new DOS')
plt.xlim(0, 230)
plt.legend(loc='top left')<jupyter_output><empty_output><jupyter_text>Refine GetDOS<jupyter_code># if you need to run getdos again with slightly modified options
# you can start from the previous settings
notebookUI(samplenxs, mtnxs, load_options_path="./work/getdos-opts.yaml")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1110475100171723, 'fraction_numerical': 0.027475672581568404, 'mean_word_length': 6.105691056910569, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 18, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '190349', 'license': 'MIT', 'n_tokens_mistral': 711, 'n_tokens_neox': 647, 'n_words': 164, 'path': 'tests/notebooks/getdos-multiple-Ei.ipynb', 'repo_name': 'granrothge/multiphonon', 'size': '1747'}