Skip to content

Commit

Permalink
Merge pull request ratt-ru#96 from Trienko/edit
Browse files Browse the repository at this point in the history
Edit
  • Loading branch information
Trienko authored Mar 1, 2017
2 parents cf8643e + 11b1a45 commit d9f179a
Show file tree
Hide file tree
Showing 7 changed files with 1,251 additions and 398 deletions.
152 changes: 93 additions & 59 deletions 3_Positional_Astronomy/3_0_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 1,
"metadata": {
"collapsed": false,
"deletable": true,
Expand Down Expand Up @@ -73,14 +73,22 @@
" padding: 0.5em;\n",
" }\n",
"\n",
"a.trienko {\n",
"}\n",
"\n",
".trienko:after {\n",
" content: 'whatever it is you want to add';\n",
"}\n",
"\n",
"</style>\n",
"\n",
"\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 69,
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -103,32 +111,91 @@
"Import section specific modules:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"text/html": [
"<script>\n",
" code_show=false; \n",
" function code_toggle() {\n",
" if (code_show){\n",
" $('div.input').hide();\n",
" } else {\n",
" $('div.input').show();\n",
" }\n",
" code_show = !code_show\n",
" } \n",
" $( document ).ready(code_toggle);\n",
"</script>\n",
"\n",
"The raw code for this notebook is by default hidden for easier reading. To toggle on/off the raw code, click <a href=\"javascript:code_toggle()\">here</a>.\n",
"\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.display import HTML\n",
"HTML('../style/code_toggle.html')"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Automatic referencing code:"
"Referencing code:"
]
},
{
"cell_type": "code",
"execution_count": 70,
"execution_count": 3,
"metadata": {
"collapsed": false
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"<script> aval=document.getElementById(\"pos_chp\"); aval.href=\"../3_Positional_Astronomy/3_introduction.ipynb#pos_chp\"; aval.innerHTML = \"&#8493 3 Positional Astronomy\"; </script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os, sys\n",
"init_path = os.path.abspath(os.path.join('../init/'))\n",
"sys.path.append(init_path)\n",
"\n",
"import pickle\n",
"from incfunc import init_ipyref_filename, ipy_label, ipy_ref\n",
"from ipywidgets import widgets\n",
"from IPython.display import HTML \n",
"\n",
"lfilename='../3_Positional_Astronomy/3_0_introduction.ipynb'\n",
"ipyrefname=init_ipyref_filename()\n",
"\n",
"try:\n",
Expand All @@ -137,7 +204,7 @@
" f = open(ipyrefname, 'rb')\n",
" sdict = pickle.load(f)\n",
" f.close()\n",
" debug_lvl=0 \n",
" debug_lvl=0\n",
" if debug_lvl > 10: print 'loaded', ipyrefname\n",
"else :\n",
" if debug_lvl > 10: print \"Running through mainlist for updating reference\"\n",
Expand All @@ -148,47 +215,34 @@
]
},
{
"cell_type": "code",
"execution_count": 71,
"cell_type": "markdown",
"metadata": {
"collapsed": false
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_chp'\n",
"titlestr='Positional Astronomy'\n",
"ipy_label(sdict, 'chapter', idstr, titlestr)\n",
"idcntr='_xyz'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']))"
"Adding labels and references:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# <a class='pos_chp_xyz' id='pos_chp'></a>"
"rstr=ipy_label(sdict, 'chapter','pos_chp', 'Positional Astronomy', lfilename);HTML(rstr)"
]
},
{
"cell_type": "code",
"execution_count": 83,
"cell_type": "markdown",
"metadata": {
"collapsed": true
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"idstr='pos_sec_eq'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']))\n",
"idstr='pos_sec_halst'\n",
"idcntr='_intro'\n",
"stval={}\n",
"ipy_ref(sdict, idstr, stval, titlestr='', sdisplay='extfile', idsub=idcntr, debug_lvl=debug_lvl)\n",
"widgets.PlaceProxy(child=stval['child'], selector=('.'+stval['class']))"
"# <a id='pos_chp'></a>"
]
},
{
Expand All @@ -204,12 +258,11 @@
" <font size=4><b> Astronomical coordinate systems </b></font>\n",
" <br>\n",
" <br>\n",
"&bull; the <em>equatorial coordinate system</em> in <a class='pos_sec_eq_intro' href='../3_Positional_Astronomy/3_1_equatorial_coordinates.ipynb#pos_sec_eq'></a>: the equatorial coordinate system enables us to create \n",
"<a class='pos_sec_halst_intro' href='../3_Positional_Astronomy/3_2_hour_angle.ipynb#pos_sec_halst'></a>\n",
"&bull; the <em>equatorial coordinate system</em> in <a class='pos_sec_eq_intro' href='../3_Positional_Astronomy/3_1_equatorial_coordinates.ipynb#pos_sec_eq' display=inline></a>: the equatorial coordinate system enables us to create \n",
"astronomical catalogues, so that we can easily locate celestial objects in the night sky.\n",
"<br><br>\n",
"&bull; the <em>horizontal coordinate system</em> in <a href='../3_Positional_Astronomy/3_3_horizontal_coordinates.ipynb'>$\\S$ 3.3 &#10142;</a>: the horizontal coordinate system is used to point a telescope to a specific location in an observer's local sky. <br><br> \n",
"&bull; the <em>direction cosine coordinate system</em> in <a href='../3_Positional_Astronomy/3_4_direction_cosine_coordinates.ipynb'>$\\S$ 3.4 &#10142;</a>: the direction cosine coordinate system is used to make local sky-maps around a direction of interest. It is also important in radio interferometry as it allows us to define a Fourier relationship between the sky brightness and interferometric measurements (see <a href='../4_Visibility_Space/4_0_introduction.ipynb'>$\\S$ 4 &#10142;</a>).\n",
"&bull; the <em>horizontal coordinate system</em> in <a class='pos_sec_hor_intro' href='../3_Positional_Astronomy/3_3_horizontal_coordinates.ipynb#pos_sec_hor'></a>: the horizontal coordinate system is used to point a telescope to a specific location in an observer's local sky. <br><br> \n",
"&bull; the <em>direction cosine coordinate system</em> in <a class='pos_sec_dir_intro' href='../3_Positional_Astronomy/3_4_direction_cosine_coordinates.ipynb#pos_sec_dir'></a>: the direction cosine coordinate system is used to make local sky-maps around a direction of interest. It is also important in radio interferometry as it allows us to define a Fourier relationship between the sky brightness and interferometric measurements (see <a href='../4_Visibility_Space/4_0_introduction.ipynb'>$\\S$ 4 &#10142;</a>).\n",
"</p>\n",
"\n",
"There are two additional concepts that are also discussed: *hour angle* and *local sidereal time*. \n",
Expand Down Expand Up @@ -336,25 +389,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.3"
},
"widgets": {
"state": {
"3127040718aa4f3880d5436944826488": {
"views": [
{
"cell_index": 6
}
]
},
"db54a84737144126b37871be4cdacdb7": {
"views": [
{
"cell_index": 8
}
]
}
},
"version": "1.2.0"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit d9f179a

Please sign in to comment.