{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Optical Spectrograph Data Example" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from osirisl1services.readlevel1 import open_level1_spectrograph\n", "from osirisl1services.services import Level1Services\n", "import matplotlib.pyplot as plt\n", "from matplotlib.colors import LogNorm\n", "\n", "FIG_SIZE = (15, 6)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load the Spectrograph data for orbit 6432, scan 12" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "spectrograph = open_level1_spectrograph(scanno=6432012)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The data and added variables are returned as xarray Datasets" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(spectrograph)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The corresponding pointing, position, tangent point, and sza info can be accessed through the 'l1' xarray accessor" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(spectrograph.l1.look_ecef)\n", "print(spectrograph.l1.position_ecef)\n", "print(spectrograph.l1.altitude)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plot the data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "spectrograph.data.plot(x='pixel', y='mjd', norm=LogNorm(), vmin=1e10, vmax=1e14, figsize=FIG_SIZE)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load the Spectrograph data for orbit 6432, scan 12 *with the RSAS correction*" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "spect_rsas = open_level1_spectrograph(scanno=6432012, apply_rsas=True)" ] } ], "metadata": { "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.1" } }, "nbformat": 4, "nbformat_minor": 1 }