mirror of
https://github.com/AllenDowney/AstronomicalData.git
synced 2025-12-23 07:28:56 -08:00
145 lines
3.4 KiB
Plaintext
145 lines
3.4 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Data Carpentry Astronomy Workshop\n",
|
|
"\n",
|
|
"This notebook imports the libraries we need for the workshop.\n",
|
|
"\n",
|
|
"If any of them are missing, you'll get an error message.\n",
|
|
"\n",
|
|
"If you don't get any error messages, you are all set."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from wget import download"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas as pd\n",
|
|
"import numpy as np"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import matplotlib as mpl\n",
|
|
"import matplotlib.pyplot as plt\n",
|
|
"from matplotlib.path import Path\n",
|
|
"from matplotlib.patches import Polygon"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import astropy.coordinates as coord\n",
|
|
"import astropy.units as u\n",
|
|
"from astropy.table import Table"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import gala.coordinates as gc"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Created TAP+ (v1.2.1) - Connection:\n",
|
|
"\tHost: gea.esac.esa.int\n",
|
|
"\tUse HTTPS: True\n",
|
|
"\tPort: 443\n",
|
|
"\tSSL Port: 443\n",
|
|
"Created TAP+ (v1.2.1) - Connection:\n",
|
|
"\tHost: geadata.esac.esa.int\n",
|
|
"\tUse HTTPS: True\n",
|
|
"\tPort: 443\n",
|
|
"\tSSL Port: 443\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"# Note: running this import statement opens a connection\n",
|
|
"# to a Gaia server, so it will fail if you are not connected\n",
|
|
"# to the internet.\n",
|
|
"\n",
|
|
"from astroquery.gaia import Gaia"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"During the workshop, we might put code on Slack and ask you to cut and paste it into the notebook.\n",
|
|
"\n",
|
|
"If you are on a Mac, you might encounter a problem with smart quotes.\n",
|
|
"\n",
|
|
"To check, following this link to [our Slack workspace](https://app.slack.com/client/T01DJHEP8Q1/C01D2TZA8SH/details/pins) and find the pinned message with the setup instructions.\n",
|
|
"It contains a line of Python code.\n",
|
|
"\n",
|
|
"Copy the code from Slack and paste it in the cell below.\n",
|
|
"If it runs without producing an error, you are all set.\n",
|
|
"\n",
|
|
"Otherwise, you might have to change your system settings so it does not convert straight quotes to smart quotes.\n",
|
|
"If you have trouble with this, let us know and we will provide more details."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"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.8.5"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 4
|
|
}
|