-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from thomaswmorris/tod-in-base-sim
Inherit TODs from base sim
- Loading branch information
Showing
13 changed files
with
288 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "6970217f", | ||
"metadata": {}, | ||
"source": [ | ||
"### Getting started" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ee8a9126", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import matplotlib.pyplot as plt\n", | ||
"import numpy as np\n", | ||
"\n", | ||
"import maria " | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "6dfa512c", | ||
"metadata": {}, | ||
"source": [ | ||
"In order to construct a model, we need some ingredients.\n", | ||
"\n", | ||
"The first ingredient is the array, which entirely defines the telescope. The Array object contains all the information about detector offsets, baselines, frequencies, and more, as well as apertures and observational constraints on the instrument.\n", | ||
"\n", | ||
"We can load one of `maria`'s predefined arrays ([MUSTANG-2](https://greenbankobservatory.org/science/gbt-observers/mustang-2/)) " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "8e3b0f75", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"m2 = maria.get_array(\"MUSTANG-2\")\n", | ||
"m2.plot_dets()\n", | ||
"m2.description" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ee6e0f60", | ||
"metadata": {}, | ||
"source": [ | ||
"The second ingredient is the pointing, which determines where and how the telescope moves, and how fast it samples. \n", | ||
"\n", | ||
"We can loading a default scan with a two-degree radius from `maria`:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "662ebf40", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"daisy_scan = maria.get_pointing(\"DAISY-2deg\")\n", | ||
"daisy_scan.description" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "332041a8-2564-4fe7-951b-78c330b7134e", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"daisy_scan.scan_radius" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "542b3f89", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"plt.figure(figsize=(4,4))\n", | ||
"\n", | ||
"plt.plot(np.degrees(daisy_scan.ra), \n", | ||
" np.degrees(daisy_scan.dec),\n", | ||
" lw=5e-1)\n", | ||
"\n", | ||
"plt.xlabel(r'RA (degrees)')\n", | ||
"plt.ylabel(r'Dec. (degrees)')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "352f68d6", | ||
"metadata": {}, | ||
"source": [ | ||
"The last ingredient is the site, which determines the translation between local coordinates and sky coordinates. It also determines the weather parameters that go into the atmospheric simulation. \n", | ||
"\n", | ||
"Loading the Green Bank Telescope site from `maria`:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "cdb1db9d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"green_bank = maria.get_site(\"GBT\")\n", | ||
"green_bank.description" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "81d5997d", | ||
"metadata": {}, | ||
"source": [ | ||
"We can combine these objects by passing them to one of `maria`'s models. On construction, the simulation is initialized:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "05d4cc35", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"sim = maria.Simulation(array=m2, pointing=daisy_scan, site=green_bank)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"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.9.13" | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "f88e5bf5f0be7bd9faa88242bcf07e5ffa7d513506f360fd3aab8d7c0fbd2667" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.