{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS Example with Gentec Maestro" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:40.814064Z", "start_time": "2019-04-08T12:29:39.336064Z" } }, "outputs": [], "source": [ "from qcodes_contrib_drivers.drivers.Gentec.Gentec_Maestro import Gentec_Maestro" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Initialize the instrument using its ASRL address" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:41.793064Z", "start_time": "2019-04-08T12:29:41.695064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: Gentec Maestro (serial:None, firmware:1.04.16) in 0.09s\n" ] } ], "source": [ "gentec = Gentec_Maestro(name=\"Gentec\", address='ASRL16::INSTR')" ] }, { "cell_type": "markdown", "metadata": { "ExecuteTime": { "end_time": "2019-03-05T09:37:07.204100Z", "start_time": "2019-03-05T09:37:07.184101Z" } }, "source": [ "## Set the wavelength to get the right calibration\n", "First, we read the currently set wavelength." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:42.931064Z", "start_time": "2019-04-08T12:29:42.905064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Wavelength : 1024 nm\n" ] } ], "source": [ "print(gentec.wavelength.label, ': ', gentec.wavelength.get(), gentec.wavelength.unit)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let's set the wavelength of our laser source and confirm that it was set." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:45.235064Z", "start_time": "2019-04-08T12:29:45.230064Z" } }, "outputs": [], "source": [ "gentec.wavelength.set(660)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:46.493064Z", "start_time": "2019-04-08T12:29:46.458064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Wavelength : 660 nm\n" ] } ], "source": [ "print(gentec.wavelength.label, ': ', gentec.wavelength.get(), gentec.wavelength.unit)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Read the laser power\n", "Let's read the laser power detected by the Gentec." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:49.551064Z", "start_time": "2019-04-08T12:29:49.520064Z" }, "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Power : 0.634878 W\n" ] } ], "source": [ "print(gentec.power.label, ': ', gentec.power.get(), gentec.power.unit)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also set an offset in order to remove any background from the measurement." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:50.777064Z", "start_time": "2019-04-08T12:29:50.749064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Zero offset enabled : 0 \n" ] } ], "source": [ "print(gentec.zero_offset_enabled.label, ': ', gentec.zero_offset_enabled.get(), gentec.zero_offset_enabled.unit)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:51.412064Z", "start_time": "2019-04-08T12:29:51.407064Z" } }, "outputs": [], "source": [ "gentec.set_zero_offset()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:52.001064Z", "start_time": "2019-04-08T12:29:51.973064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Zero offset enabled : 1 \n" ] } ], "source": [ "print(gentec.zero_offset_enabled.label, ': ', gentec.zero_offset_enabled.get(), gentec.zero_offset_enabled.unit)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's now repeat the power measurement." ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:53.069064Z", "start_time": "2019-04-08T12:29:53.044064Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Power : -0.000390634 W\n" ] } ], "source": [ "print(gentec.power.label, ': ', gentec.power.get(), gentec.power.unit)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally let's clear the offset." ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:55.387064Z", "start_time": "2019-04-08T12:29:55.381064Z" } }, "outputs": [], "source": [ "gentec.clear_zero_offset()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Close instrument" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2019-04-08T12:29:56.385064Z", "start_time": "2019-04-08T12:29:56.276064Z" } }, "outputs": [], "source": [ "gentec.close()" ] } ], "metadata": { "hide_input": false, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "nbsphinx": { "execute": "never" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }