|====================================================| | This is the readme file for the Astrotron project. | |====================================================| |PD - PD - PD - PD - PD - PD - PD - PD - PD - PD - PD| |====================================================| | Astrotron and all the files I include with it are | | given by me, fyngyrz, to the public domain. Enjoy. | | You can do whatever you want with this. If you | | improve it, of course I'd love to hear about it, | | but there's no requirement to tell me. | | | | Everything in the archive as I distribute it is my | | original work. | | | | Thanks to Deb for putting up with my fascinations. | | | | Thanks to Brandon Craig Rhodes, who worked with me | | to get ephem cooking in the old RH9 / early python | | environment. | | | |====================================================| | File formatted for 80 columns using tabstops of 4. | |====================================================| | PD code by fyngyrz v1.0.H http://fyngyrz.com | | June of 2010, at Glasgow, Montana, USA, Earth, SOL | |====================================================| What is Astrotron? ------------------ Astrotron is a tool to tell you what the observing conditions are for solar system objects, stars, and the aurora borealis. There are three types of people who might be interested: o Astro-photographers o Astronomer types o Star-gazers Astrotron puts together on one webpage, for your specific location: ------------------------------------------------------------------- o Graphed magnetic field conditions in the earth's upper atmosphere; o Power flux in the auroral oval - great indicator of current activity o Visibility graph for the auroral oval o Solar and lunar azimuth and elevation, and calculated current skyglow o Predicted darkness intervals (if any) for today and tomorrow o Observing locations for all of our planets (yes, Pluto as well) o Basic local weather information related to observing conditions o K-index values (a lagging, but useful index of auroral potential) o Experimental set of US weather dials based on lat/long information Astrotron Requirements: ----------------------- o Linux or OSX *nix environment o Operating web server (Apache, etc. - Any web server will do) o Written loosely for Python 2.5.1; may work on earlier versions. o Python PIL package: http://www.pythonware.com/products/pil/ o Python ephem package: http://rhodesmill.org/pyephem/index.html o The scripts expect python to be present in /usr/bin/python o wget command: http://www.gnu.org/software/wget/ o You'll need to be able to make a cron table entry o gunzip and tar (or compatible) are required to extract the archive How It Works: ------------- Astrotron uses ephem to determine the altitudes, azimuths and illumination phase of objects in space. It also references various government web sites to retrieve satellite and other data. Various scripts create files with information required for display on the web page; and there are jobs to convert the incoming data to meter images, graphs, and text blocks. These tasks are run by cron at five minute intervals, rather than each time the web page is viewed. This both reduces the server load (a lot!) and ensures that the data sources are not abused by constantly retrieving data that has not changed, which in turn (hopefully) means you won't be banned from retrieving them. Your Astrotron may have more than one client; meaning, you can share the output page with others. It is generally useful to people in your immediate area, that is, those who can get to the observing location conveniently, and are interested in things like auroras and dark skies for telescopic and unassisted viewing of the night skies. Because of this general usability, if the application fetched the data for every page retrieval, the bandwidth load on the source data servers would multiply times the number of users. Instead, because it buffers (and sometimes modifies) the data and images it fetches, it only multiplies the data source load times the number of astrotron installations, whereas the installations themselves cover the bandwidth cost of serving to all local clients. Do NOT modify the code to go after the data more than every five minutes! The web page itself simply references the data created and cached by the other tasks - so a web page load poses almost no overhead to your server, and that in turn allows any number of clients to keep the web page (which auto-reloads every five minutes as well) up without beating up your server's CPU or filesystem. It's not even an .shtml page; nothing but HTML and already prepared .gif files are served in response to a page load, and no scripts run, either - a side effect of this is excellent security. No scripts and no parameters means no parameter hacking. FAQ - Frequently Asked Questions ================================ I changed (something) in the .conf file, and the change either isn't showing, or not working as expected. Why? ------------------------------------------------------ If you change something in the .conf file, you should re-run the makelinks.py script. This script is responsible for creating links to files in the tmp directory, and for configuring the HTML files in the project so they reflect the current mix of features. If the feature you changed doesn't need makelinks.py to effect the change, there's no harm done by running it again. On the other hand, if it does need it, then you *really* need it. No visibility dial in weather? Why? ----------------------------------- Because data for visibility is not included in the experimental NWS XML digital weather service. In the original hard-coded astrotron, I was fetching it separately from my local NWS office by parsing the aviation weather report. Unfortunately, they (the NWS people) tell me that the aviation forcast changes format (and availability) from one NWS office to the next, so there's no way to reliably get that data at this time. If they add it to the XML, I'll add it here, and you'll be able to get it in an update. Check the project at... http://fyngyrz.com/?page_id=748 ...to see what's going on as far as updates and changes go. What's in the archive? ---------------------- aa_humidlib.py -- library that converts relative to absolute humidity aa_meterlib.py -- library that generates meters aa_utes.py -- various utility functions used by the other .py files astrotron.conf -- configuration for astrotron project / application astrohelp.html -- file generated into your webserver dir by makelinks.py astrohelp.raw -- used to generate astrohelp.html astrotron.html -- file generated into your webserver dir by makelinks.py astrotron.raw -- used to generate astrotron.html aur_digits.py -- creates LED style number as jpg files aur_getpol.py -- fetches, cleans up, annotates and caches polar graphics aur_kindex.py -- creates list of NOAA K-index data aur_xmwx.py -- XML parser for NWS experimental digital weather format damoon.py -- creates list of solar system object positions darkness.py -- creates display of times for best observing conditions digits (dir) -- contains jpeg images of digits 0...9 for LED simulation displayconf.py -- dumps configuration, basically a dignostic doall.raw -- used to generate doall.py, which in turn is run by cron envtest.py -- checks to see if prerequisites are in place in your OS gen_aa_dial.py -- creates all those dials and text from the above data genmag.py -- creates the GOES satellite magnetic field plot makelinks.py -- configures astrotron and its environment readme -- this file Changes: ======== 1.0.H == September 9th, 2010 -- dark/light list now indents light to isolate periods -- install updated to show how to become root under OS X -- makelinks.py now creates soft links instead of hard links -- Klingons around Uranus are now optional (see config) 1.0.G == July 8th, 2010 -- Now includes auroral visibility graph from spacew.com -- makelinks, help, readme, config updated: visibility feature -- potential bug where tilde expansion not implemented for path of auroral power graph fixed; this could have cause a failure to load the image if, instead of in the /tmp/ directory, the user decided to store the polar file subordinate to his home directory using tilde expansion. 1.0.F == July 7th, 2010 -- Darkness predictions now extend through 4 24-hour periods -- each day of no darkness now has a date 1.0.E == July 3rd, 2010 -- You can now double the size of the polar map -- Polar map clipped to remove dead pixels -- HTML page re-arranged to pull 8 planets together -- xmwx.py commented and add'l diagnostics in place -- (I've got an inquiry to the NWS about XML products as well... hopefully they'll help me get visibility into astrotron in a general manner.) 1.0.D == July 1st, 2010 -- Includes my crosshair values in shipped version -- Some improvements in archive packager (versioning) -- envtest.py smarter, recommends wget source -- some documentation improvements 1.0.C == June 28th, 2010 -- readme updates -- Fewer steps to the install process -- HTML page header now includes lat/long -- aa_utes.py organized, commented a bit 1.0.B == June 26th, 2010 -- calculates darkness periods only once a day -- Documentation updates -- New scheme: [archivename]-[version].[revision].[level] 1.0 == June 25th, 2010 -- original release (.A is implied)