Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search api notebook 6 #15

Merged
merged 9 commits into from
Jun 21, 2023
2,848 changes: 0 additions & 2,848 deletions notebooks/api-client.ipynb

This file was deleted.

2,875 changes: 2,875 additions & 0 deletions notebooks/draft/api-client.ipynb

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions notebooks/draft/wwt.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "infrared-worcester",
"metadata": {},
"outputs": [],
"source": [
"from pywwt.jupyter import WWTJupyterWidget"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "becoming-scout",
"metadata": {},
"outputs": [],
"source": [
"wwt = WWTJupyterWidget()\n",
"wwt.set_view('sky')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "frequent-compromise",
"metadata": {},
"outputs": [],
"source": [
"wwt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "beginning-madonna",
"metadata": {},
"outputs": [],
"source": [
"from astropy.table import Table\n",
"\n",
"OEC = 'https://worldwidetelescope.github.io/pywwt/data/open_exoplanet_catalogue.csv'\n",
"\n",
"table = Table.read(OEC, delimiter=',', format='ascii.basic')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "rational-maria",
"metadata": {},
"outputs": [],
"source": [
"layer = wwt.layers.add_table_layer(table=table, frame='Sky',lon_att='ra', lat_att='dec')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "accessory-signature",
"metadata": {},
"outputs": [],
"source": [
"layer.color = 'red'\n",
"layer.marker_scale = 'screen'\n",
"#layer.marker_scale = 'world'\n",
"layer.size_scale = 100."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "harmful-tribune",
"metadata": {},
"outputs": [],
"source": [
"wwt.center_on_coordinates(SkyCoord(285.0130833333333, 40.22075\n",
" , unit=u.deg))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "quick-transfer",
"metadata": {},
"outputs": [],
"source": [
"wwt.set_view('solar system')\n",
"wwt.solar_system.track_object('Earth')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "verified-prime",
"metadata": {},
"outputs": [],
"source": [
"from astropy.table import Table\n",
"EARTHQUAKES = 'https://worldwidetelescope.github.io/pywwt/data/earthquakes_2010.csv'\n",
"table = Table.read(EARTHQUAKES, delimiter=',', format='ascii.basic')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "atomic-projection",
"metadata": {},
"outputs": [],
"source": [
"layer = wwt.layers.add_table_layer(table=table, frame='Earth',\n",
" lon_att='longitude', lat_att='latitude')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "brave-elite",
"metadata": {},
"outputs": [],
"source": [
"wwt.solar_system.track_object('Earth')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dramatic-faculty",
"metadata": {},
"outputs": [],
"source": [
"help(layer)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "expanded-dating",
"metadata": {},
"outputs": [],
"source": []
}
],
"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.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading