{"id":41044,"date":"2018-10-04T03:01:12","date_gmt":"2018-10-03T17:01:12","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=41044"},"modified":"2018-10-05T08:03:57","modified_gmt":"2018-10-04T22:03:57","slug":"php-and-python-pyephem-astronomy-helper-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-and-python-pyephem-astronomy-helper-primer-tutorial\/","title":{"rendered":"PHP and Python PyEphem Astronomy Helper Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ephem_astronomy.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP and Python PyEphem Astronomy Helper Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pyephem.jpg\" title=\"PHP and Python PyEphem Astronomy Helper Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP and Python PyEphem Astronomy Helper Primer Tutorial<\/p><\/div>\n<p>&#8220;The Three P&#8217;s&#8221;, for us, namely, PHP and Python and Perl, are all great choices as serverside programming languages.  You will find, as a result of this, that programmers have written great code for one or other of them, and perhaps for all three.  We came across a <a target=_blank title='Thanks for heads up' href='https:\/\/rl.se\/sub-solar-point'>&#8220;heads up&#8221;<\/a>, thanks, to a stupendous Python module called <a target=_blank title='PyEphem ... thanks' href='\/\/rhodesmill.org\/pyephem\/'>PyEphem<\/a> that we are introducing at this blog today via &#8230;<\/p>\n<ul>\n<li>installing onto a (MacBook Pro) Mac OS X <a target=_blank title='MAMP Mac OS X local Apache\/PHP web server landing page' href='http:\/\/www.mamp.info'>MAMP<\/a> local web server environment via (you may not need &#8220;sudo &#8221; below) &#8230;<br \/>\n<code><br \/>\nsudo pip install pyephem<br \/>\n<\/code>\n<\/li>\n<li>unit testing just Python on that local web server via good test code on  <a target=_blank title='PyEphem ... thanks' href='\/\/rhodesmill.org\/pyephem\/'>this webpage<\/a><\/li>\n<li>install on (Apache\/PHP\/MySql Linux CentOS) rjmprogramming.com.au web server<\/li>\n<li>unit testing just Python on that rjmprogramming.com.au web server web server via good test code on  <a target=_blank title='PyEphem ... thanks' href='\/\/rhodesmill.org\/pyephem\/'>this webpage<\/a><\/li>\n<li>write some supervisory interfacing PHP featuring &#8230;\n<ol>\n<li>table of Celestial Body (list in a dropdown) and its <a target=_blank title='Right Asension information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Right_ascension'>Right Ascension<\/a> (angle from Earth) and its <a target=_blank title='Declination information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Declination'>Declination<\/a> (angle from Earth) &#8230; and if &#8230;<\/li>\n<li>dropdown selection causes some template Python for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Python\/Jupiter.py_GETME\" title=\"Jupiter.py_GETME\">Jupiter<\/a>.py to be amended with name of Celestial Body of choice and any epoch (date) information to arrive at filled out table cells<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; for a simple PHP supervisory arrangement (via PHP <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a>) for the (hard working duck underneath the water) Python PyEphem module controlled astronomy calculation brilliance underneath.<\/p>\n<p>We have a short <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pyephem.pdf\">&#8220;stream of consciousness&#8221; PDF slideshow<\/a> (of installing, coding and running) to augment your PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ephem_astronomy.php\">live run<\/a>&#8216;s PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ephem_astronomy.php_GETME\" title=\"ephem_astronomy.php\">ephem_astronomy.php<\/a> code for your perusal.  Early days, but exciting days!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d41044' onclick='var dv=document.getElementById(\"d41044\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/python\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d41044' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;The Three P&#8217;s&#8221;, for us, namely, PHP and Python and Perl, are all great choices as serverside programming languages. You will find, as a result of this, that programmers have written great code for one or other of them, and &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-and-python-pyephem-astronomy-helper-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,29,37],"tags":[109,2693,405,611,714,744,802,932,2550,997,2691,1012,2692,1122,1319,1411],"class_list":["post-41044","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-astronomy","tag-declination","tag-exec","tag-install","tag-local-web-server","tag-mamp","tag-module","tag-php","tag-pip","tag-programming","tag-pyephem","tag-python","tag-right-ascension","tag-server","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/41044"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=41044"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/41044\/revisions"}],"predecessor-version":[{"id":41056,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/41044\/revisions\/41056"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=41044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=41044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=41044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}