Thursday 5 September 2019

Twilight Photometer Part II - Analysis

This is a followup to the earlier post that described the construction of a Twilight Photometer. In this one, I'll describe the setup and analysis.

The basic idea is that as the sun sets, or rises, it sweeps a beam into the atmosphere that illuminates a segment of the sky above the photometer. By analysing the gradient of light changes directly above the photometer and calculating the sun shadow height it is possible to reveal the presence of any high altitude aerosols. The following diagram, from the original article, shows the theory of it:



In the original article, Forest Mims provides a spreadsheet that he uses to analyse the data. Based on this and a similar one from the NOAA I created a Python module to do the solar calculations.  The calculations are quite intricate but it's fascinating to see how given the date and latitude and longitude it's possible to calculate the sun shadow height (and a lot of other interesting things such as sun azimuthal angle and sunset time). I have a series of Python scripts which work together to:

  1. Download the data as a CSV file from the Photometer
  2. Add the observations to an SQLite database
  3. Generate the plots of shadow height vs intensity and intensity gradient.
The Python scripts are available on GitHub

In general, it all works pretty well and, as I hoped, it's more flexible than the spreadsheet allowing experimentation with different types of data smoothing and generation of plots for data from multiple days of sunset or sunrise recording.

Once I started generating plots I was pleased to see they followed the same general shape as those reported by Mimms. The first problem, however, was that the photometer seemed too sensitive, being at maximum intensity even sometime after sunset. So the plots look something like this: 

With the first 10 or so km missing because it's on maximum intensity. 

I'd used 40 GOhm resistors in the amplifier and even with the link removed to only use one it was still perhaps too sensitive. So I soldered an additional 40GOhm resistor over each one in order to halve the resistance:




This seemed to help but I also needed to extend the tube above the LED with a longer piece of brass tubing and an extra piece of black heatshrink tube I could cut. Then I could adjust it so that just before sunset it would be just below the maximum intensity. To help with the adjustment I added a Serial LCD to show the current intensity. This turned out to be a lot more complicated than I'd hoped since I was already using a fair amount of memory and using the SoftwareSerial tipped it into the region where it could no longer open a file on the SD card. I ended up trimming down as much memory usage as I could and moving to the Send-Only version of SoftwareSerial and SDFat library rather than the standard SD one. These savings freed up enough memory to allow the logging to work.

Eventually, I got the sensitivity about right for both sunset and sunrise recording. Here's a typical set of graphs from a fairly clear morning:





As expected the intensity graph gets noisier as the sun shadow is higher because the sky is still quite dark at that point and the signal generated by the LED is weak. 


What I have realised is that there may, in fact, be a limited application for this type of photometer given my location Mims notes that you really need at least one timezone of clear sky along the sun's azimuth at sunrise and sunset. For me, in Christchurch NZ, that's about halfway across the Tasman sea for sunset. Getting that level of clarity might be common in Texas, it's not so much here in the South Pacific. Here's the satellite image for the morning the above graphs were recorded:



You can see that it was clear above Christchurch but to the East, along the sun's azimuth of (60deg)  there were some significant clouds which probably explains the high altitude disruption. Very often I've recorded graphs like this:




There will be days that have sufficiently clear skies but it's likely to only be when there is very significant high pressure to the east or west of my position. That means that the useful data will be recorded mostly for a single type of climatic condition, and a relatively rare one at that.

In any case, I'm still keeping an eye on the forecast, hoping for clear skies and recording when it looks promising. I'm hoping to build up something of a baseline over the winter and perhaps when it's bushfire season in Australia I'll start to see evidence of high altitude aerosols.








A Proton Precession Magnetometer - Part 1: Overview and Polarisation Coil

 A Proton Precession Magnetometer - Part 1: Overview and Polarisation Coil For some time now I've wanted to add a magnetometer to my wea...