Saturday, May 3, 2014

Backyard astrophotography: Comet Lemmon

At the beginning of 2013, comet C/2012 F6 "Lemmon" graced us with a visit to the inner Solar System, reaching the perihelion (closest distance to the Sun) of his 11000 year orbit at the end of March. Due to the geometry of its orbit, at that time it was favorably located for southern hemisphere observers. So I took my camera and set off to spend a couple of hours in the cold night of Bariloche, with the slim hope of getting a picture I could be proud of. What I obtained easily surpassed my expectations...


The image shows the sky area between the constellations Phoenix and Sculptor, and comet Lemmon is the green fuzzy thing below and right from the center (you may want to click on it to see it full size). It was taken from here on March 11, 2013, around 21:40hs.

It doesn't look too great, uh? Well, here at the right you have a 100% crop of the comet area, including a 4 times enlargement of the head. Now it looks much better (again, click on it, I'll wait here). The head and tail are clearly visible, showing the characteristic greenish color of this comet. This particular color is due to cyanogen and diatomic carbon gases being released from the nucleus as it's heated by the Sun. Comparing the luminosity of the comet head with nearby stars, I would say its apparent magnitude was around 6.7 at the time. In the thumbnails below you'll find two other images. The first one is a black and white version with the brightness and contrast increased so the faint tail is more visible (the head gets overexposed). The smudge above the comet is NGC 55, an 8th magnitude irregular galaxy located some 7 million light years away. The second image shows a wider view of the area with all the stars of magnitude lower than 5.5 identified.

Granted, this is not the best image ever of the comet (Google is your friend, look for them), but what makes it more striking to me is the way I took it. I didn't use a telescope. I didn't use a tracking equatorial mount. I wasn't even in the best possible location: even in a high altitude and dark place like Bariloche, being at the shore of a wetland and below street lights is not astrophotography's definition of "best location". What follows next is a description of how I got away with it.

A humble journey into astrophotography

First thing first: this is not an astrophotography tutorial by any means. I'm far from being qualified to do that. This is just a collection of ideas I hope can help other people in my situation, shooting the sky with the instruments I have at hand. It will get a bit technical at some points, but I think it's good to have a basic idea of why things are done like that (and anyone can point out if I'm wrong somewhere...). It will also focus on deep space objects, so keep in mind that some points might not be relevant to "brighter" things like planets. What I've found after a couple of sessions (and specially after processing these images) is that taking good pictures of the sky can be surprisingly easy if done right.

Astrophotography is no different from any other photographic style: you need to get the right amount of light to the camera sensor. The problem here is that the "available amount" of light is usually much lower than the "right amount" of light. We can fight this limitation both during picture taking (getting the most possible light) and afterwards during image processing (basically using image stacking). Even if camera hardware is a very important factor, most of the time it is as a trade with image processing. The better the hardware available, the less processing is needed for the final image. I'm currently using a Canon 5D Mark II, and its full frame sensor is a great advantage in low light (lower noise). The pictures in this post were taken with a Canon EF 100mm f/2.8 USM Macro Lens, which is very sharp wide open and maximizes the amount of light available for the image. But I'd say that any current DSLR with a decent lens is enough, if one is prepared to spend the needed time taking and processing the images.

When we take pictures under normal lighting we learn that "the lower the ISO, the less the noise". One thing that surprised me when I started researching this subject was that the lowest ISOs are usually not the best choice in astrophotography. When photographing the night sky, you're normally taking a wildly underexposed image. Under those circumstances in many cameras the signal-to-noise ratio (S/N) will be limited by read noise, the noise introduced by the analog-to-digital converter (ADC). Crucially, the ADC sits behind the sensor amplifiers, so read noise it's independent of ISO. In terms of read noise it's much better to take a picture at ISO 800 than to take it at ISO 100 and push the exposure 3 stops in post-processing, because in the second case you're multiplying the read noise by 8. On the other hand, at very high ISOs the dynamic range starts to drop due to the maximum pixel capacity, which harms very low signals. The result is that the ideal ISO is somewhere in between (and it's camera-dependent). Typical numbers I've seen for the 5D Mk II optimal point are ISO 800 and 1600, I personally prefer the former (see note 1).

The only other variable under our direct control is exposure time (assuming you use the widest "decent" aperture of the lens). The statistics of light detection means that the S/N gets better as the square root of the signal (it follows a Poisson distribution). This is called photon-count noise. For a fixed ISO, the longest the exposure time the higher the signal and the better the S/N (others noise sources aside, see note 1 and note 2). But then we hit another limitation: the sky is moving! As with any other moving subject this limits how long we can expose the sensor before the movement blurs the image, and it depends on focal length and pixel size (note 3). I've found a useful small app that allows one to estimate the maximum exposure time given those variables plus the sky object declination. The best thing is to test different times around this starting point, and look for the longest we can live with given the subject in the picture (a wide view of the galaxy is more forgiving than a star cluster at the same focal length). You can see in the pictures of the comet that star trails begin to be apparent for these 5 second exposures at 100mm. Although the effect is not dramatic on the comet itself, maybe a shorter 4 second exposure would have been a better choice.

Image stacking

Once we've decided which is the best camera configuration, it's time to get the picture. Or pictures, actually. Unless our subject is relatively bright, a single exposure will look extremely noisy like this:


This is exactly the same sky area of the first image, but corresponds to a single unprocessed picture. Comet Lemmon is inside the circle. To the left there is an animated version so you can better judge the change between both images. There are basically two types of noise affecting the unprocessed image. The first type is deterministic, and is produced by the slightly different dark current at each pixel that result in different background levels (you've probably heard of "hot pixels" before). The second type is random noise, and is the result of the combination of read, thermal, and photon-count noise. Both types of noise are present in every image we take, but only dominate the final result when the useful light signals are very low.

An important part of astrophotography image processing is to get rid of this noise, and there are defined and proved ways of doing it. For example, to reduce random noise one relies on statistics: if we average N pictures, the typical random noise in the final image is reduced by a factor square root of N. This process is called "image stacking", and can drastically increase the dynamic range of the image. Average 10 pictures and the noise reduces by 3.3 (1.7 stops), average 100 and the noise reduces by a factor of 10 (3.3 stops). Notice that, due to the involved square root, the real benefit of doing this reduces as the number of pictures is increased. In practice, a number of shots between 10 and 100 is normally the best compromise between noise reduction and time required. As the sky rotates between shots, the images must also be correctly aligned before the average is done. I use the free program DeepSkyStacker to automatically align and stack the pictures (see note 4).

To remove the deterministic part of the noise, on the other hand, we should do a "dark frame subtraction": we subtract from the sky picture (the "light frame") a second picture taken with the lens cap on (the "dark frame"). This dark frame must be taken at the same ISO, camera temperature and exposure time as the light frame, because dark current depends on all of that. Dark frames suffer from the same random noise problems as light frames, so we must also do an average of several dark frames to avoid introducing extra noise into the final image. This master dark frame should consist of at least the same number of shots as the light stack (see note 5). You can either take the dark frames in between light frames or to take them all together at the end. I prefer the former (5 light, 5 dark, repeat) to be sure any temperature variation along the session is properly taken into account, but I must be careful not to move the camera when covering the lens. DeepSkyStacker automatically processes all the dark frames to produce a master dark frame, and then subtracts it from each light frame before aligning and stacking them. After DeepSkyStacker has exported the final 32bit FITS file, I use SAOImage DS9 to separate the three color channels and I feed them to a small command line program called STIFF, which produces a gamma corrected 16bit TIFF. I do all of this in Linux, running DeepSkyStacker under Wine.

In this case in particular, the final comet image is a stack of 50 light frames 5 seconds each (equivalent to a total exposure of 4 minutes and 10 seconds) and 50 dark frames. As I said before, they were taken at ISO 800 with an aperture f/2.8 and at a focal length of 100mm, in a full frame DSLR. The processing should have given me around 7 times more dynamic range (2.8 stops extra) with respect to a single picture. Looking at a digital star map (Stellarium) I can easily spot stars down to 12th magnitude in the final image, which under the circumstances I think it's amazing.

Note 1: There are couple of extra points to take into account. If exposure times are very long (several minutes), thermal noise dominates S/N. This is proportional to the square root of both exposure time and ISO, so it should be constant for a constant exposure value (a longer time is compensated by a lower ISO, and vice versa) (see also note 2). The second point is that in many cameras it seems only the full stop ISOs (100, 200, 400, ...) are real hardware amplifiers, the others are just digital corrections implemented after the ADC or directly in software. So there is usually no advantage in using non-full stop ISOs here.

Note 2: The dark current (the source of thermal noise) has another harmful side effect: it fills the pixel with non-photon produced electrons, which reduces the dynamic range and lowers the S/N for very long exposure times.

Note 3: Of course, the ideal solution here is to use a tracking equatorial mount, which matches the rotation of the sky so is looks still to the camera. However, good small equatorial mounts are expensive enough to require a certain level of astrophotography commitment (which I don't have at the moment), and inexpensive mounts are not solid enough to support a DSLR with a (possibly) big lens attached. Probably a do-it-yourself barn door tracker is the solution, I'm yet to build one (for example, this one or this other). However, take into account note 2.

Note 4: I feed the program with the original RAW files from the camera because then it works on the images before Bayer Matrix interpolation is done. This should minimize the cross talk of noise between colors with respect to working on already developed 16bit TIFF files (in any case the later must be linear, not logarithmic).

Note 5: How much noise is introduced by the master dark frame will depend on how photon-count noise compares to the other two noise sources (dark frames have only read and thermal noise). If photon-count noise is the dominant noise source then using a similar number of dark and light frames won't significantly increase the final noise. But if read or thermal noise dominates (which can happen for very short or very long exposures), then a similar number of darks will introduce around 1/2 stop of extra random noise in the subtracted image. In this latter case, a bigger number of dark frames should be considered. Notice also that most modern DSLRs can perform in-camera dark frame subtraction (they call it "long-exposure noise reduction"), but there are practical and theoretical reasons to do it manually if many pictures are involved. If you're doing it manually, you must make sure this option is disabled on the camera.

(esta entrada en español)

Saturday, August 24, 2013

Solar eclipse 2012

At the end of 2012 there was a solar total eclipse, visible from Bariloche during its partial phase. I took this series of pictures from the Bariloche Atomic Center, from the beginning of the eclipse until the Sun set behind the mountains around 20 minutes later.


All the pictures were taken at a focal length of 300mm, 1/8000s exposure time, aperture f/40, ISO 50, with a polarizer to reduce a bit the light (unfortunately I don't have a high density neutral filter, the Sun is still overexposed).

Note 1: The times in the last picture may be wrong by a couple of minutes, I didn't check the camera clock before starting.
Note 2: Looking directly to the Sun through a camera is dangerous both for your sight and the camera. Do not try to take pictures like this if you don't know what you're doing.

(esta entrada en español)

Sunday, March 25, 2012

To infinity... and beyond!

One of the reasons why a couple of months ago I bought a "prime" lens for the camera (50mm f/1.4) was to do some astrophotography, and this weekend I could finally do a first test. Taking into account that it is a fixed camera, without sky tracking and from my backyard, it came out more than acceptable...


The picture is from the region between the constellations Crux (the Southern Cross) and Carina, as can be seen on the annotated version to the right. In principle, I had no particular reason to photograph that area of the sky more than it being the part of the galactic plane best positioned at that time (1AM of the 24/03). But after processing the images I was pleasantly surprised to find that, between other things, I had pretty visible in the center of the picture the Carina Nebula!

This is a crop from the central part of the image. Top right we have the eta-Carina Nebula (NGC 3372), to the left a globular cluster (NGC 3532), and the portrait is completed below by the Southern Pleiades (IC 2602).


Now I just need a simple and cheap way to do sky tracking and extend the exposure times...

PS for those interested in the technique: the picture is a stack of 75 exposures of 4 seconds (5 minutes total), f/2.0, ISO 800, plus 75 dark frames and 70 bias frames, processed in DeepSkyStacker. The camera is a Canon EOS 5D Mk II with a lens Canon EF 50mm f/1.4, mounted on a simple fixed tripod without tracking.

"Lucy in the sky with diamonds..."
The Beatles

(esta entrada en español)

Monday, November 21, 2011

Let there be light

Last week I started a night photography course at a school in Melipal (Comunidad Cíclope). The first lesson on the field was in the beach of Lago Moreno, at sunset. Between the ash in the air, the lights of the city and some light painting, these pictures came out...



"And God said, -Let there be light-, and there was light."
The Bible, Genesis 1:3

(esta entrada en español)

Friday, January 15, 2010

Dreaming awake



"-Last night I dreamed-, said LVX-1, calmly.
Susan Calvin said nothing"
Robot Dreams, Isaac Asimov

(esta entrada en español)

Thursday, December 24, 2009

Dakar 2009

The sound of the engine comes from far away, behind a gentle hill in the road. Grave and deep, it announces its arrival much before you see it. Slowly, from the roof to the huge wheels, it appears from behind the hill. Motorbikes and cars have passed by all the morning, but this is different. Your blood freezes and you feel small when the 8 tons, 3 meters high thing passes you at full speed, just meters away. A bit later the engine drops down the revolutions and the big mass waves a little under the powerful braking, but not for long: a quick turn to right and it accelerates again to disappear in the distance. Welcome to the awesome spectacle of the Dakar's trucks...


After calling off the 2008 edition of the traditional raid París-Dakar due to terrorist threats in the African part of the route, the organizers (ASO) took a risky decision: to move the 2009 edition to South America. Organized together by Argentina and Chile, the Dakar 2009 went through the wonderful landscapes of both countries in a route that took it from Buenos Aires to the Patagonia, through the Andes and to the driest dessert in the world, and back to the departure point two weeks later. Two weeks that will stay in the history of the competition because the risk taken by ASO was rewarded with a resounding success, specially between the public: in a country where motorsport runs trough the veins of the majority, millions rushed to the roads to see the passing of motorbikes, cars and trucks. I was among them and this is a little sample from the last stage for you to enjoy.

You are warned, however: you can see, listen and read everything at your disposal, but nothing and nobody can transmit you nor prepare you for the power of a massive truck in full competition...



"A challenge for those who go. A dream for those who stay behind."
Thierry Sabine

(esta entrada en español)

Wednesday, March 25, 2009

Chantilly, but not the crème...

The Château de Chantilly is located 40km to the north of Paris and it represents a nice Sunday visit. Not too much showy, of simple lines in the outside, it is surrounded by spacious gardens of several styles (including mazes), and by one of the few big French forests still standing. In spite of its name, the famous crème wasn't invented here, but its renowned creator (François Vatel) served during many years as grand chef and parties organizer at this place.


(the two first pictures belong to the church Saint-Vincent-de-Paul, near Gare du Nord, from where the train to Chantilly leaves)

"--I SHOULD see the garden far better,-- said Alice to herself, --if I could get to the top of that hill: and here's a path that leads straight to it... at least, no, it doesn't do that...-- (after going a few yards along the path, and turning several sharp corners), --but I suppose it will at last. But how curiously it twists! It's more like a corkscrew than a path! Well, this turn goes to the hill, I suppose... no, it doesn't! This goes straight back to the house! Well then, I'll try it the other way.--"
Through the Looking-Glass and What Alice Found There, Lewis Carroll

(esta entrada en español)

Saturday, February 28, 2009

French Moon

The Moon is the same everywhere, but even so she doesn't stop of attract me as a photography subject. In the night of Cargèse, from a window, the Moon was falling over the sea...


The last image has labelled the most visible features in the pictures (the assignment is a little dubious in the area of Clavius). The sources I've used in the identification were the amateur site Observatorio ARVAL and the free program Virtual Moon Atlas.

(esta entrada en español)

Saturday, December 6, 2008

Mediterranean sunset

First weekend in Cargèse (Corse), and first afternoon at which I really had the time to go to take pictures of the sunset. Even if the clouds ruined a little the view, a nightfall over the Mediterranean is always worthwhile...


The tower that appears in some of the pictures is the Tour D'Omigna, one of many scattered throughout the coast of the island since the Genoese domination (XVth century).

(esta entrada en español)