{ "cells": [ { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "# Good Night Bluesky: Running your overnight script\n", "\n", "In this notebook you will:\n", "\n", "* Perform final checks prior to executing the tested overnight plan\n", " * Additional modifications (transient metadata)\n", " * How to add ancillary signals that are important (baseline versus primary data streams)\n", "* Experience common mistakes that trip up experienced bluesky users\n", "\n", "\n", "**BONUS Material** \n", "Located after our objectives. It is in the form of Q & A.\n", "\n", "Recommend Prerequisites:\n", "* [Hello Python and Jupyter](./Hello%20Python%20and%20Jupyter.ipynb)\n", "* [Good Morning Bluesky](./Good%20Morning%20Bluesky.ipynb)\n", "* [Good Morning Afternoon](./Good%20Afternoon%20Bluesky.ipynb)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#pip install -U --pre databroker[all]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Hosted by Andi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## For Bluesky Session Continuity\n", "Run the next cells to make the ipython kernel match the previous session\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "%run -i gm_user/user_profile.py" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%run -i gm_user/user_startup.py \n", "%run -i gm_user/user_startup_night.py" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "md_info()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "temperature.readback.get()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Let's collect a good dataset for our current temperature\n", "\n", "First, open the file [gm_user/user_startup_night.py](./gm_user/user_startup_night.py) and view it side by side with this notebook.\n", "\n", "It's pretty clear that we should run `RE(one_temperature())` and this is a good first \"real\" test of our functions.\n", "\n", "\n", "```python\n", "RE(one_temperature())\n", "```\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "But we can test how to put this together with our planned overnight script:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "RE(one_temperature())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**But** what if we want to try to automate some processing or take better advantage of data access tools like `databroker` or its replacement `tiled`?\n", "\n", "Let's look at **line 22** in [gm_user/user_startup_night.py](./gm_user/user_startup_night.py)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "