<jupyter_start><jupyter_text>Qcodes example with Andor DU401 BU2<jupyter_code>import matplotlib.pyplot as plt
%matplotlib notebook
from qcodes.instrument_drivers.Andor.DU401 import Andor_DU401<jupyter_output><empty_output><jupyter_text>Initialize the instrumentThe driver for this instrument provides the possibility to setup the instrument with some default settings. However, in this example we will setup the instrument manuall (setup=False).<jupyter_code>andor = Andor_DU401("Andor", setup=False)<jupyter_output>Connected to: Andor DU401_BU2 (serial:13789, firmware:3.255) in 5.58s<jupyter_text>Start the cooler and set the set temperature to $-60$.<jupyter_code>andor.cooler.set(True)
andor.set_temperature(-60)<jupyter_output><empty_output><jupyter_text>After a moment, read the device temperature.<jupyter_code>print(andor.temperature.get(), andor.temperature.unit)<jupyter_output>22 °C<jupyter_text>Take a spectrum in the single scan acquisition modeWe take a spectrum in the single scan acquisition mode with full vertical binning. The exposure time is set to $1$s.<jupyter_code>andor.acquisition_mode.set('single scan')
andor.read_mode.set('full vertical binning')
andor.trigger_mode.set('internal')
andor.shutter_mode.set('fully auto')
andor.exposure_time.set(1)
spectrum = andor.spectrum.get()
plt.figure()
plt.plot(spectrum)
plt.title('spectrum taken in single scan acquisition mode')
plt.xlabel('x pixel number')
plt.ylabel('counts');<jupyter_output><empty_output><jupyter_text>Take a spectrum in the accumulate acquisition modeWe take a spectrum in the accumulate acquisition mode with full vertical binning. The exposure time is set to $1$s and the number of accumulations is set to $10$. The filter for cosmic ray removal is turned on.<jupyter_code>andor.acquisition_mode.set('accumulate')
andor.read_mode.set('full vertical binning')
andor.trigger_mode.set('internal')
andor.shutter_mode.set('fully auto')
andor.filter_mode.set(True)
andor.exposure_time.set(1)
andor.accumulation_cycle_time.set(1)
andor.number_accumulations.set(10)
spectrum = andor.spectrum.get()
plt.figure()
plt.plot(spectrum)
plt.title('spectrum taken in accumulate acquisition mode')
plt.xlabel('x pixel number')
plt.ylabel('counts');<jupyter_output><empty_output><jupyter_text>Take a snapshotWe take a snapshot of the instrument to get an overview of the current settings.<jupyter_code>andor.print_readable_snapshot()<jupyter_output>Andor:
	parameter              value
--------------------------------------------------------------------------------
IDN                     :	{'vendor': 'Andor', 'model': 'DU401_BU2', 'serial':...
accumulation_cycle_time :	1 (s)
acquisition_mode        :	accumulate 
cooler                  :	True 
exposure_time           :	1 (s)
filter_mode             :	True 
number_accumulations    :	10 
read_mode               :	full vertical binning 
set_temperature         :	-60 (°C)
shutter_mode            :	fully auto 
spectrum                :	[63729, 64724, 64771, 64745, 65337, 65069, 65246, 6...
temperature             :	22 (°C)
trigger_mode            :	internal<jupyter_text>Close the instrument<jupyter_code>andor.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12103112228858849, 'fraction_numerical': 0.028921722728701665, 'mean_word_length': 4.448630136986301, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '561798', 'license': 'MIT', 'n_tokens_mistral': 1098, 'n_tokens_neox': 988, 'n_words': 253, 'path': 'docs/examples/Andor_DU401.ipynb', 'repo_name': 'Jajiko/Qcodes_contrib_drivers', 'size': '3181'}