I designed the Astrotron to assist me in determining if it is worth trekking to a dark-sky observing point for auroral events and astro-photography and/or telescopic observation.

This information is specifically calculated for the Glasgow, Montana, USA observation location. If you are significantly distant (more than 50 miles) from this location, the information displayed by the Astrotron will be incorrect for you. The further away you are, the more inaccurate it becomes.

I wrote this application for my own benefit (you can see some of my in-and-around Glasgow auroral photography here and my astrophotography here) but I would be nothing less than delighted if someone else in the local area was able to take advantage of my work and thereby enjoy some viewing or photography. I'd love to hear from you if that is the case, please write to me using the email address [fyngyrz (at) gmail (dot) com]. I will always answer such an email.

The Astrotron is coded in Python, a modern scripting language I very much enjoy working with. It uses two nonstock libraries, the PIL library (Python Imaging Library) and the ephem library. I use PIL to help generate the graphs and meters; and ephem to calculate the positions of the planets and related astronomical information. I have split the work so that the ephem-driven portion runs on my Mac, and the PIL and HTML portions run on my web server, which is a Linux machine. All work-intensive portions of the Astrotron are driven by *nix crontab launches; loading (and re-loading) the Astrotron page does not cause any data to be re-calculated; that happens every five minutes whether anyone is looking at the page or not. The Astrotron page itself will re-load every five minutes if you simply leave it open in a web browser, thus always showing you recent information. If you want the most recent information, load the page at about ten seconds after any five-minute point on the clock (for instance, at 8:15:10 AM.) The page itself is not "heavy" in terms of bytes, and the server can handle a very large number of requests without a problem.


As mentioned above, the Astrotron runs on my own server, which disconnects from the Internet every evening from 2:00 AM to 2:30 AM local time in order to back itself up without external demands being made on its processing power. So during that 1/2 hour, the Astrotron is unavailable. Keep this in mind and see to it that on evenings where you might like to use it, you check in with it before it shuts down at 2:00 AM, or be prepared to wait until 2:30 AM.

Azimuth and elevation

These two dial types are used to locate a celestial body. Azimuth dials tell you which direction to look; north, south, east or west. Elevation dials tell you how high up from the horizon to look: Zero is the horizon, and 90° is stright up. These are marked "alt" which is short for "altitude." Both dial types are calibrated in degrees. All you have to know is how the compass directions relate to where you are observing, and these two dials allow you to locate something in just moments.

The Sun

The first factor to be considered is the sun's elevation. "Astronomical Darkness" is the period when the sun is 18° or more below the local horizon. At this point, the sun's illumination is sufficiently shielded by the body of the earth itself to no longer be a factor in observing or photography. Basically, if the sun is above 18°, the quality of your observations will be reduced.

The Moon

With the exception of photographing or observing the moon itself, the presence of the moon if it is even more than slightly illuminated serves as a negative factor; the moon's reflected light, as diffused throughout the earth's atmosphere, will make it very difficult to observe faint auroras, comets and DSOs. Consequently, the lunar elevation is marked in red above the horizon if the phase is greater than 1/4th.

Below 1/4 phase, both because the visible portion of the illuminated lunar area is small and because such an extreme phase angle means that much of the visibly illuminated area is in shadow anyway, we can discount the moon as a negative observing factor. The elevation scale turns green from end to end under such conditions. Note that the moon is much more interesting to photograph and observe when shadows are deep and plentiful.

The "Darkness" dial

This dial is at zero until the sun reaches the horizon, and will reach maximum indication (100%) when the sun reaches or exceeds 18° below the horzion. If the moon is above the horizon, the degree of illumination (moon phase) will reduce the darkness level.

If the moon is full and above the horizon, the maximum this meter will read is 50%. If the moon is 1/2 full, the maximum the meter will read is 75%. The calculation is linear (although the amount of light we get from the moon relative to its phase is not... because the moon surface displays more and deeper shadows as the angle to us changes, 1/4 moon is much, much dimmer than 3/4ths less than the full moon illumination.)

Consequently, if the moon is up, this dial is more advisory than accurate.

If the moon is not up (or up, but at zero phase), the dial tells you just what you want to know, as it corresponds directly to the sun's elevation. In such a case, the two yellow ticks on the dial scale correspond, left to right, to 6° (civil twilight) and 12° (nautical twilight), while the right end of the scale is 18° (astronomical twilight.)

Lunar-Solar separation

The separation dial gives the angle between the sun and the moon. If this approches zero, a partial or full solar eclipse (moon obscuring the sun) may occur for this observing location.

The Weather

Ah, the weather. You would think that current observations of the weather would be quite accurate. Wouldn't you? Well, you'd be wrong. First of all, the National Weather Service [NWS] (where I get the data) only reports the details about once an hour, with occasional "burps" of data in between. I have the application check every five minutes so as to catch those burps if and when they happen, but even so... the accuracy leaves quite a bit to be desired. Please consider the weather information here advisory only.

Cloud Cover

First thing to be aware of is that the instrument that the NWS uses to determine cloud coverage only looks at a cone above the NWS station that covers about 30° of the sky. So they can say no clouds, and you can go outside, and discover clouds everywhere but over the weather station.

On the other hand, the NWS can indicate it is 100% overcast, and you can go out, and there will be only one cloud, which is sitting right on top of the NWS station (which is up by the Glasgow airport, if you weren't aware.)

This is the weakest part of the weather information I gather. I include it simply because if it doesn't indicate clear, you know there were at least some clouds, somewhere, within the last hour or so.

Absolute and Relative Humidity

The NWS only reports relative humidity. Relative humidity is a percentage describing the amount of moisture the atmosphere can carry at the current temperature and air pressure, both of which vary. Relative humidity is useful as a weather factor because it tells you how damp you will "feel" the air is when you're out in it. But that's not really what we're interested in here.

What we really want to know for astronomical viewing purposes is the actual amount of water suspended in the atmosphere in gaseous form, regardless of temperature or pressure — because that relates directly to how much visibility is degraded: Water molecules block, reflect, and bend light. The more water molecules there are in the atmosphere between us and the things we're trying to look at, the less we like it. The amount of water in gas form that is present in the atmosphere is called "absolute humidity."

Through a process that incorporates fixed steam tables, two-dimensional interpolation, temperature, and pressure, I massage the NWS relative humidity value into an absolute humidity value that is pretty accurate between -25°C and 50°C.

Below -25°C (-15°f), the air can't hold much moisture, and so astronomically speaking, we don't really care. If it gets over 50°C (which is about 122°f), I don't think you're going to care very much either, as you'll hopefully be cowering in some air-conditioned building. I know I will be, anyway.

The displayed value represents grams of water per cubic meter of atmosphere. The higher the value, the more opaque the atmosphere gets. Also, when the dew point (the point where the atmosphere can hold no more moisture at the current temperature) is reached, gaseous moisture condenses out into droplets, which creates fog. If fog is present, generally the visibility dial will be below ten miles.

As an interesting tweak, since the maximum amount of water that can be sustained in gas form varies, I adjust the meter scale to the upper limit with each measurement. So you'll see the scale labels change with the temperature. I provide .2, .4, .6 and .8 of scale maximum.


Visibility is reported by the NWS as how far you can see when looking towards the horizon. It is a scale from 10 miles (very clear) to 0 miles (fog, snow, other weather that occludes vision.) If it reads ten miles, you may (probably will) be able to see much further than ten miles. Dust or humidity may limit you, however, as astronomical observations require better than ten mile visibility even if you're only looking straight up. If this dial is not sitting pegged at ten, conditions are probably not very good. Although, as mentioned previously, the NWS only reports once an hour, so it may be that the reading is old enough to be wrong. Go look!


Ah, at last, a weather datum that we can more or less count on. And which doesn't directly affect seeing much, although it definitely affects your comfort and should guide you when you prepare to go out, which is why I monitor it. This is the temperature at the airport NWS sensor, taken within the last hour.

K-indices and auroral activity

The National Oceanic and Atmospheric Administration [NOAA] monitors all manner of "space weather" data of considerable interest to the observer or photgrapher of auroras. They combine the information they have into a composite number called a "k-index", a value they (usually) update every three hours for the average conditions during those three hours (and which, consequently, really is telling you what did happen, rather than what is happening, or what you can expect to happen.) If the k-index for Glasgow (I'll come back to that) is four, there was a possibility of being able to observe faint auroral activity from a dark location near Glasgow. If the k-index for Glasgow is five or higher, the auroras are likely to become quite bright.

There are several "gotchas" here. First, you'll note there are three k-index dials, one for College, Alaska, one for Denver, Colorado, and on that is simply marked "Planetary". So what's the value for Glasgow, then? Well, uh, you sorta look at the Denver one... they're south of us, so we are likely to have a higher value... and then the planetary one too, as that's orbital... and you... well, you guess. Secondly, because these are three hour averages... yeah, they're probably old anyway and don't represent current conditions. Advisory, again. But higher is definitely better. Still, conditions can change literally in a minute. Third, for reasons unknown to me, sometimes NOAA simply fails to report the data, in which case the affected dial(s) will read zero.

Magnetometer data and auroral activity

This information is more immediately useful than the K-indices. Data is available up to the last five minutes (minute, actually, but I only retrieve it every five minutes) and so you can actually see what the earth's magnetic field is doing pretty much right now. If these lines are flat, then there's not much going on, and the odds of an aurora are quite low. If they're jagged and crossing one another, that's good... you might be able to see something. There are two lines because there are two satellites, one at West 75° longitude (GOES-13), and the other at West 136° longitude (GOES-11.) We're at West 106° longitude, so we're kind of right between them — activity at either one, or both, can affect our auroral conditions.

The polar auroral map

This is derived from a dataset reported by a trans-polar orbiting satellite (NOAA-16) and actually shows the measured intensity of auroral activity (indirectly, by measuring the polar atmopheric electrical currents in ergs per square centimeter per second.) This data generally isn't very old, fifteen minutes or so, and so you can take it quite seriously. You can easily see Montana, and I've placed a black crosshair where Glasgow is; if the auroral field reaches the crosshair intersection, and if other factors (weather, sun altitude, moon conditions) also cooperate, it's time to get out there and observe or photograph. Red indicates highest activity, yellow moderate, and deep blue... none.

The 'N' factor designated at the left side of the chart should be 2.0 or less for the data in the chart to be considered accurate. Higher numbers than 2.0 indicate poor measurement success by the polar satellite that is the source of the chart data. The activity number ranges from zero to ten; at ten, things are very intense, and at zero... nothing. Keep in mind that high activity doesn't mean anything if the auroral oval doesn't extend into, or almost into, our area.

The red arrow on the chart points towards the noon meridian at the time the chart was generated.

The Planets

Each planet gets an azimuth and an elevation dial. The planets (and all the moons) are daylight objects, photographically speaking, which means that if you want to shoot them, you use camera settings similar to those you would when shooting out and about during the day here on earth. This is because these objects are directly illuminated by the sun. But because they (with the exception of our own moon) are so far away, and therefore cover a very small portion of the sky, they don't contribute enough light to interfere with most deep space or auroral observations. Consequently, the scales for altitude are marked with red when they are under the horizon, to remind you that no, you can't observe them; and green when above, because that means you can see them.

Predicted darkness intervals

At the bottom right of the display, there are some text lines that lay out the periods of darkness (if any) that cover the current, previous and next evenings. I generate these predictions once a day, a few minutes after local noon. You can use this information to plan your observing. Weather can foul up such plans, and of course as far as auroras go, you can have perfect observing conditions and no aurora at all. The intervals tell you when it gets dark, and then when it gets too light. These intervals are calculated using the sun's -18° crossings and the state of the moon — nothing else — so remember, the information is very much advisory and depends on actual conditions at those times.

For several months of the year, (mid-June through mid-September) the sun will not reach 18° below the horizon. At these times, no darkness predictions will be listed.

Observing locations

I have three favorites in the local area. The first is about 3/4ths of the way out to the landfill (Landfill Road is about 500 meters north of highway 2, on the east side) from Highway 24.

This is a very good location for shooting northward, and the roadway offers the benefit of being precisely east-west. It is far enough from Glasgow to be properly dark for north or south observations, and near enough to be very convenient.

Views low on the horizon to the east are compromised by the lights at the landfill, and views to the west by Glasgow itself.

The second is about 13 miles north on Highway 24, at the base of the cell tower on the west side of the road.

This location is excellent for eastern observing, as Glasgow is far enough south, and Saint Marie far enough north, to not affect the view. Views to the west suffer from having the tower in the way, although they're fine if you're shooting more northwest or southwest. Views to the north are slightly compromised by the lights of Saint Marie; views to the south by Glasgow, only more so.

The last is west of Glasgow, about 1/2 mile west on Riggen Road. Riggen is another nearly east-west oriented track, although it is a dirt road, so be sure to cover your lenses if any cars come by (unlikely... I've never seen one late at night.)

From this point, views of the western sky are perfect.

Perhaps I'll meet someone out there one fine evening!

Why is north down on the azimuth dials?

Because my desk faces south, which puts east and west to my left and right, respectively. It's very convenient for me this way. Deal with it. :)

Valid HTML 4.01 Transitional