{ "cells": [ { "cell_type": "markdown", "id": "bc9ac4ed-4f39-46e4-bb1d-61f94d238363", "metadata": {}, "source": [ "# Calibration Without Noise Diodes \n", "\n", "This notebook shows how to use [`GBTFITSLoad.calseq`](https://dysh.readthedocs.io/en/latest/reference/modules/dysh.fits.html#dysh.fits.gbtfitsload.GBTFITSLoad.calseq) to derive the system temperature for observations taken with the W-Band receiver of the GBT. The W-Band receiver has two feeds (beams) and covers the frequency range from 67 to 92 GHz, and, unlike most of the GBT receivers, it does not have noise diodes for calibration. Instead it uses a wheel to put hot and cold loads in front of the receiver, in what we call a calibration sequence (calseq). For the other spectral line receiver that does not use noise diodes, Argus, the command used to compute the system temperature is [`GBTFITSLoad.vanecal`](https://dysh.readthedocs.io/en/latest/reference/modules/dysh.fits.html#dysh.fits.gbtfitsload.GBTFITSLoad.vanecal), because Argus uses a vane instead of a wheel. An example showing how to use `vanecal` will be provided elsewhere.\n", "\n", "The data in this example contains observations of M82 using the [Nod observing procedure](https://gbtdocs.readthedocs.io/en/latest/references/software/scheduling-blocks.html#astrid_commands.Nod).\n", "\n", "## Dysh commands\n", "\n", "The following dysh commands are introduced (leaving out all the function arguments):\n", "\n", " filename = dysh_data()\n", " sdf = GBTFITSLoad()\n", " sdf.udata()\n", " sdf.select()\n", " sb = sdf.getnod()\n", " sb = sdf.getps()\n", " ta = sb.timeaverage()\n", " ta.baseline()\n", " ta.average()\n", " pp = ta.plot()\n", " tt.oshow(ta1)\n", " \n", "## Loading Modules\n", "We start by loading the modules we will use for the data reduction. \n" ] }, { "cell_type": "code", "execution_count": 1, "id": "220b176f-a383-4539-aed0-f85b73c436fa", "metadata": {}, "outputs": [], "source": [ "# These modules are required for the data reduction.\n", "from dysh.fits import GBTFITSLoad\n", "from dysh.log import init_logging\n", "from astropy import units as u\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "# These modules are used for file I/O\n", "from dysh.util.files import dysh_data\n", "from pathlib import Path" ] }, { "cell_type": "markdown", "id": "7827e730-9399-4704-9121-b3ce4cee53fa", "metadata": {}, "source": [ "## Setup\n", "We start the dysh logging, so we get more information about what is happening.\n", "This is only needed if working on a notebook.\n", "If using the CLI through the ``dysh`` command, then logging is setup for you." ] }, { "cell_type": "code", "execution_count": 2, "id": "0d35a9cc-a8bc-4cb5-abce-8fdf72aa49dc", "metadata": {}, "outputs": [], "source": [ "init_logging(2)\n", "\n", "# also create a local \"output\" directory where temporary notebook files can be stored.\n", "output_dir = Path.cwd() / \"output\"\n", "output_dir.mkdir(exist_ok=True)" ] }, { "cell_type": "markdown", "id": "92eee316-70f3-4676-9808-fa39d347dea3", "metadata": {}, "source": [ "## Data Retrieval\n", "\n", "Download the example SDFITS data, if necessary." ] }, { "cell_type": "code", "execution_count": 3, "id": "e6a7c6cb-005c-4873-893b-b70b7bf468ce", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "22:36:47.261 I Resolving example=nod3 -> nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits\n", "22:36:47.262 I url: http://www.gb.nrao.edu/dysh//example_data/nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "AGBT15B_244_07.raw.vegas.trim.fits already downloaded\n" ] } ], "source": [ "filename = dysh_data(example=\"nod3\")" ] }, { "cell_type": "markdown", "id": "756a53a6-ca52-4484-9fc1-a696e8388459", "metadata": {}, "source": [ "## Data Loading\n", "\n", "Next, we use `GBTFITSLoad` to load the data, and then its `summary` method to inspect its contents." ] }, { "cell_type": "code", "execution_count": 4, "id": "867d44d3-3676-4d12-8476-55d9c864faf0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| SCAN | \n", "OBJECT | \n", "VELOCITY | \n", "PROC | \n", "PROCSEQN | \n", "RESTFREQ | \n", "# IF | \n", "# POL | \n", "# INT | \n", "# FEED | \n", "AZIMUTH | \n", "ELEVATION | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|
| 130 | \n", "M82 | \n", "0.0 | \n", "CALSEQ | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "3 | \n", "2 | \n", "334.3782 | \n", "46.5595 | \n", "
| 131 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.3555 | \n", "46.4977 | \n", "
| 132 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "2 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.4400 | \n", "46.3994 | \n", "
| 133 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.2819 | \n", "46.2979 | \n", "
| 134 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "2 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.3704 | \n", "46.1996 | \n", "
| 135 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.2152 | \n", "46.0993 | \n", "
| 136 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "2 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.3061 | \n", "46.0009 | \n", "
| 137 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.1520 | \n", "45.9003 | \n", "
| 138 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "2 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.2438 | \n", "45.8002 | \n", "
| 139 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.0929 | \n", "45.6982 | \n", "
| 140 | \n", "M82 | \n", "0.0 | \n", "Nod | \n", "2 | \n", "87.645 | \n", "4 | \n", "2 | \n", "1 | \n", "2 | \n", "334.1845 | \n", "45.5991 | \n", "
| 141 | \n", "M82 | \n", "0.0 | \n", "CALSEQ | \n", "1 | \n", "87.645 | \n", "4 | \n", "2 | \n", "3 | \n", "2 | \n", "334.0287 | \n", "45.4683 | \n", "