{ "cells": [ { "cell_type": "markdown", "id": "supposed-bulgarian", "metadata": {}, "source": [ "## Access Saved Data Via the Web\n", "\n", "**This tutorial shows Databoker 2.0.0, which is in prelease. It is currently being evaluated and tested at some NSLS-II beamlines.**\n", "\n", "**To run this, first we need to point Juptyer at a separate Python environment. Execute the line below, and the click \"Python 3\" in the top-right corner of this notebook, and choose \"Python 3 (preview)\" from the options that appear.**" ] }, { "cell_type": "code", "execution_count": null, "id": "distributed-albania", "metadata": {}, "outputs": [], "source": [ "!/srv/conda/envs/preview/bin/python -m ipykernel install --user --name preview --display-name \"Python 3 (preview)\"" ] }, { "cell_type": "code", "execution_count": null, "id": "impaired-study", "metadata": {}, "outputs": [], "source": [ "from tiled.client import from_uri" ] }, { "cell_type": "code", "execution_count": null, "id": "proof-portugal", "metadata": {}, "outputs": [], "source": [ "c = from_uri(\"http://data-samples.blueskyproject.io\")" ] }, { "cell_type": "code", "execution_count": null, "id": "timely-child", "metadata": {}, "outputs": [], "source": [ "c" ] }, { "cell_type": "code", "execution_count": null, "id": "shared-receptor", "metadata": {}, "outputs": [], "source": [ "c['bmm']" ] }, { "cell_type": "code", "execution_count": null, "id": "accepted-logging", "metadata": {}, "outputs": [], "source": [ "run = c['bmm'][22521]\n", "run" ] }, { "cell_type": "code", "execution_count": null, "id": "editorial-admission", "metadata": {}, "outputs": [], "source": [ "run['primary']" ] }, { "cell_type": "code", "execution_count": null, "id": "heated-attention", "metadata": {}, "outputs": [], "source": [ "run['primary']['data']" ] }, { "cell_type": "code", "execution_count": null, "id": "fixed-belle", "metadata": {}, "outputs": [], "source": [ "run['primary']['data'][['dcm_energy', 'I0', 'It']]" ] }, { "cell_type": "code", "execution_count": null, "id": "naval-acceptance", "metadata": {}, "outputs": [], "source": [ "run['primary']['data'].uri" ] }, { "cell_type": "code", "execution_count": null, "id": "according-peripheral", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (preview)", "language": "python", "name": "preview" }, "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.10" } }, "nbformat": 4, "nbformat_minor": 5 }