De-rotating and De-trailing Tripod Shots

December 2020

Would you like to recover from a past mistake of short trailed stars? Do you wonder what those 3 hours of exposures during the Geminids might have looked like if only you had a tracker? Maybe 4 years ago you were new to astro and didn't have one. Perhaps you now have skills, but it will be really tough to get back to that special place? Or your tracker is busy with a telephoto shot and you have a second camera sitting on a tripod waiting for aurora. Here's how drive-less tracker processing can give them new life.

Figure 1. Left: a single noisy 13-second exposure. Right: Sequator stacked the following 10 images in the time-lapse, both land and sky, and merged them in under five minutes. Unless noted, all images by the author.

Cautionary note: Separately tracking and stacking the sky then blending it with a stacked foreground will remain the best method for some time. 5 two-minute guided exposures at an optimal ISO has less noise and greater dynamic range than 30 twenty-second shots at a higher ISO. If you're a newcomer or only putting your images on-line or screen at low res, you'll prefer the easy, no-fuss done-in-a-couple-of-minutes land/skyscape stackers. As you gain experience and your threshold of acceptable quality rises, you may notice the limitations more, opting for a tracker and the mere five minutes it takes to polar align. Every year the advancing tech and sensors will make the difference less obvious.

The following apps certainly make it easy (drag , drop, and click) so I recommend that you give these a try first.

Figure 2. Zoomed-in section showing trails (top), and a single frame after de-trailing (bottom).

Trailing & De-trailing

Trails appear when the exposure is long enough to reveal the sky's rotation for a particular camera-lens configuration. Imagers quickly become familiar with the "500 rule", where the exposure multiplied by focal length must be less than 500 for a full frame to have minimal to imperceptible trailing. Fig 2. top is a result of late-night careless math "If 10sec x 50mm is ok, so must be 13sec x 40mm." For cropped sensors try the "300 rule".

No one will see the trails if the image is for a web page or post, but on an 20x30-cm enlargement print, these defects will typically garner disappointment and a sneer.

Figure 3. Schematically taking trailed stars (a), copied in de-rotated positions, here vertically displaced to reveal the offsets (b) , then compositing them with darken (c). The "true" field (d) is not completely recovered.

After successfully overlaying two images taken 5 minutes apart during my de-rotation experiment, I immediately realized I could hide these trails by de-rotating a few seconds "ahead" and "behind" and compositing them with "darken".

In densely packed zones and with close double stars, it is not possible to "retrieve data from under the trail" as revealed in (c), but the cosmetic repair is much more appealing to the eye. In a pinch for those situations where you simply cannot retake the shot with better technique, de-trailing lets you recover from an "only if..." situation.


De-rotating the sky

Opportunity meets preparedness: my Star Adventurer tracker was out for repair but I was hoping to get it back in time for the Orionids. While I was discussing potential plans with my frequent meteor observing companion Bruce McCurdy, he recounted for me his bittersweet memories of the 2018 Orionids, on the shore of Lake Annette, near Jasper. It was only a couple of hours from the shower maximum, absolutely clear, he had his camera capturing a time-lapse of this gorgeous view of Orion perched above a mountain chain, reflected in a mirror-lake. But alas, not a single meteor! With an older camera at ISO 1000 and the individual pictures being JPGs, an enlargement seemed out of the question because it would reveal limitations. A year ago, I had learned how to use the panorama generating software Hugin to take images from an equatorially mounted dual fisheye (360) camera tracking the Sun and reproject them into a topocentric, zenith-up view suitable for displaying on a planetarium dome. It occurred to me that I could invert the reprojection sequence to track the sky and therefore stack the noisy JPGs into a smoother, higher contrast final image. I had hoped to find an existing application, but my internet search terms did not match the "right" tags, so I saw nothing of interest. Unaware of the apps noted above, I adapted my pre-existing script to fit this situation.

What an amateur astronomer does: places the camera onto an equatorial mount, angles the polar axis up by the amount of their latitude, turns it horizontally to point north, tilts the camera to make the horizon flat to an edge, and lets the mount rotate. Conceptually, I follow this same sequence, but after the rotation I reverse the tilting-rotation sequence to bring the view back to earth.

The challenge was how to actually do this using software. I was inspired by the following diagram from Guy Ottewell. I regularly refer to his excellent "The Astronomical Companion" large format book during my monthly zoom "Introduction to Stargazing" sessions.

Figure 4. Reproduced from The Astronomical Companion by Guy Ottewell, (used with permission). 1.

There it is! Tilt the image so north is up, lean it back it by the latitude to put the pole at the center, de-rotate by the angle the earth has turned since the first exposure, drop it back down, and finally perform a de-tilt . The panorama software Hugin (http://hugin.sourceforge.net/) , easily imports an image, automatically decoding the EXIF data to extract the lens focal length, its type, field of view, and the camera sensor particulars for scale. Provide Hugin with the 5 axis roll commands, carefully choosing which of yaw, pitch, or roll is used at each step in the particular order, get the signs right, and it outputs the final view in a minute or two per image.

Fig 5. 38 25-second images at ISO6400 composited using "lighten". Because the pole is not at the center of fisheye lens (on the cropped Canon 60Da sensor) the star trails are not circular, a trade-off between sharpness, distortion, and cost, inherent in any lens design.

Fig 6. The same 38 images processed in Sequator. It did a very respectable job handling the distortion, the light pollution reduction, and the merging of the stationary ground and stacked sky. Since "remove dynamic noises" was checked, the departing car lights (and meteors!) were removed.

Figure 7. A comparison of star shapes at the very top right edge of the frame. The single image shows lens aberrations at the most open f/3.5 of this relatively inexpensive Opteka 6mm fisheye. The de-rotated approach is nearly perfect, while Sequator's handling is only slightly inferior (I did not spend time trying to make the backgrounds identical since their stacking and curve processing are different). As long as the Sequator image is viewed on-screen or not overly enlarged, the result is quite pleasing. The comet at right is 46P Wirtanen.

Counter Points

In one sentence, the opposing philosophy is utterly sensible: "just do it right in the first place." That shot of the winter sky from the Geminids? One can do much, much better by getting a tracker, stopping the lens down a notch, and heading out next December. It's possible to argue that it might be cloudy the next four years, but that's a pretty thin premise. A $400 tracker is too much? Given it will last for more than 10 years, the prorated annual cost is less than that of the gas to drive to a star party. A simple tripod is less fuss than pointing an equatorial at Polaris - so is not tuning a guitar before you play; those two actions take almost the same amount of time, and you'll be more pleased with the result. If you're never going to make enlargements, being happy with posting reduced images online, well, ok. If it's unlikely you will get a second chance to reshoot the stars above Uluru, then definitely de-trail and stack them for a great personal keepsake.

Conclusion

So yes, a beginner with little equipment can get away with using only a tripod, and can quickly create surprisingly nice images for webpages. It is possible to repair trailed images, and for those cases your tracker is being used for another target, drive-less stacking works reasonably well. But please don't try and convince yourself that deliberately limiting your image quality is your final goal.

  1. Guy Ottewell, The Astronomical Companion ISBN 978-0-934546-60-7. [http://www.universalworkshop.com/

Appendix - Details

Dozens or even hundreds of images can be reprojected in batch mode. In this case it was executed on a Windows platform running ActiveState Perl, using CPAN astronomical coordinate and time modules. Thank you to Thomas Modes for providing me with the hugin panotools command-line methodology. The config file for panotools that contains the projection and transformations is a ".pto." Contact the author of this article for a copy of the full code. Human-readable process:

  1. Tilt the view to put the north celestial pole "up," usually beyond the top of the page. The formula for this parallactic angle is given in celestial navigation references and luckily is a standard output from astronomical software libraries, requiring inputs for the latitude, longitude, elevation, and time. A field de-rotator on a large Alt-Az mount uses the parallactic angle to turn the camera body by the appropriate amount and direction. For Hugin, this is a roll.

  2. Pitch the view so that the north celestial pole is at the zenith, by 90-latitude.

  3. De-rotate (Hugin roll) by the angular equivalent of the time difference between the current and original image. Given that one sidereal day is 23h56min = 360 degrees, then 60 seconds = 0.2507 deg. If we're facing north, then we de-rotate clockwise instead.

  4. De-pitch to return the north celestial pole to its original place.

  5. Finally, de-roll by the original parallactic angle to return the foreground to nearly horizontal. At first I thought I had to keep changing the parallactic angle as time progressed, but because everything is rolled/pitched relative to the first image, we use that initial value.

In Perl pseudo-code:
foreach time do {
$roll1 =initial parallactic angle
$pitch1 = -1.0 * (90 - $Declination)
`\\bin\\pano_modify.exe --output=inirollpitch.pto --rotate=0,$pitch1,$roll1 $tripod_pto`
$roll2 = $HAfirst - $HAnow; # hourangle difference = de-rotate angle (negative generally)
`\\bin\\pano_modify.exe --output=roll2.pto --rotate=0,0,$roll2 inirollpitch.pto`
$depitch = -1.0 * $pitch1

`\\bin\\pano_modify.exe --output=depitch.pto --rotate=0,$depitch,0 roll2.pto`
$deroll = -1.0 *
$roll1
`\\bin\\pano_modify.exe --output=total_reproject.pto --rotate=0,0,$deroll depitch.pto`
# re-project via the command line:
`\\bin\\nona.exe -m TIFF_m -o $imgfin total_reproject.pto $imgini`

} # end loop

Before running this script I generated the pto for my desired output projection and canvas size, giving enough room for the gradually angled de-rotated images.