Taking
and Processing a Digital CCD Image
A lot of
observational astronomy is spent on taking images. Since the 1990’s, these
images have almost always been digital images. Film is just about obsolete in
astronomy. This is good – digital pictures are free, free free! And you get instant (sort
of) gratification too. Now, digital cameras like you buy at
The Goal: I want an 8x10 color photo of your object, framed, and with a printed piece of paper which has the following: Your name, the name of the object (e.g. “the Orion Nebula”), the telescope used, the CCD camera used, the length of the exposure and number of exposures in your stack (e.g. “10x5min exposures” would mean you stacked ten 5-minute long exposures for the final image). And, all the software and steps in Photoshop you used to get to your final masterpiece. For Astro 9, you shold mount your pictures on mount board at a minimum, or spend $6/eq at Long's for frames. For Astro 8, you must frame your (single) picture. You must submit the 8x10 final print on nice photo paper. Then, I can add it to our on-going gallery of images. Framed pictures can be displayed either a local art exhibits, and most definitely they will be used to decorate our new observatory building. Look in the Good Times or Metro and you’ll see what art is being exhibited around the local coffee shops and other artsy places. We’re going to be one of them, I hope! You can even put your phone number on the informational tag with “prints for sale” and maybe you can make a little $$ of this enterprise! In any case, you’ll have a stunning and cosmic piece of art you can place on your wall and brag about to all your friends when you entertain at your place. And too, we can all admire it at the end of the course.
1. Getting Your Images
So, with Rick's help you've now gotten your raw images, at the telescope, using the ST2000XCM CCD camera. This camera has a CCD chip array of 1600 x 1200 pixels. This array is broken into 800 x 600 array of 2x2 pixels. In each 2x2 sub-array, you have 4 pixels. Two are covered by a green filter, one is covered by a red filter, and one by a blue filter. Since all colors can be de-composed into the three primary colors red/green/blue, each 2x2 pixel has all the color information for that location on the original image. Nice!
Turning Your Raw Images into Color
If you want to begin working on your images at home, it's easy to do. You'll need to download and install two pieces of free software...First, go to SBIG's software webpage and download CCDOPS version 5. Don't worry about installing drivers. That's only if you plan to use CCDOPS to run the camera. You only want the software in order to do some initial processing of your raw images.
If you're not working at home on your images... Astro 8'rs, you’ll find your images on the computers at the back of the room 705 classroom in the c:/astropix/a8spr08 folder (or whatever sub-folder looks appropo for your class). For Astro 9'rs, bring a memory stick and I'll give you your images in class or right after they're take at the observatory. The images are stored in a proprietary format designed by the Santa Barbara Image Group – the company that makes the camera. These file names will terminate with a “.st2k” file type designation. Now launch CCDOPS to begin...
Double-click on the
CCDOPS5 icon (gray colored) on the Windows desktop
Click File | Open and browse to the first of your image files to open it. CCDOPS will first put up a box with all kinds of information, some of which you'll need to record in your notebook: the date and time, the chip temperature, and the length of the time exposure. You need to also write down the telescope used - you can't trust the telescope info in the box since we don't enter that information into the computer. Ask Rick what telescope you used if you're not sure, but you should've recorded it at the time you took your images.
Date:______________________________________________
Times:______________ _______________ _______________
Object:____________________________________________
Telescope:__________________________________________
Chip Temperature:____________________________________
Then just hit the enter key and your picture will appear, in black and white. A little contrast box will appear, and at the bottom click to select 1:2 in the Mag box. Now your image should shrink so you can see the whole picture. Before you start doing the dark-subracting and flat fielding below, take note - you NEVER save the dark-subtracted and/or flat-fielded image! If you do, you'll over-write your raw image and then it'll be GONE. You do your dark subtract, your flat field, and then your color conversion and only THEN do you save it. OK, let's begin...
Subracting the Dark Frame: First thing you need to do is to subtract a dark frame from each of your individual pictures (usually I have you take three 5-minutes images). A dark frame, recall, is a picture of pure blackness. The pixels will then contain pure thermal noise which, on average, should be similar to that in your actual image.We set the thermo-electric cooler inside the camera to cool the chip, likely to -25C or -30.0C depending on the night air temperature, and this reduces thermal noise by about a factor of ~250 from being un-cooled. By subtracting the dark frame you subtract (to first order) the thermal noise from your image. Click on Utility | Dark Subtract and select the proper dark frame. It'll have a name like dk5-30.st2k. ( my naming convention; the "dk" means its a dark frame, "5" for 5 minutes, and "-30" for -30C temperature) and the location of the dark frame is in c:/astropix on computers in 705. Ask Rick to make sure you have the right one! If you use the wrong dark frame you can wreck your picture. After dark-subtracting, you may think your image is way too dark. No, it isn't; the image is just fine. Don't worry about it - trust me!
Next, you may have to flat field your picture. Generally, if you used the 8" f/4 LXD75 scope, you won't flat-field your picture. If you used the Megrez or one of the camera lenses, then you will. Ask Rick! Flat-fielding your image corrects it for the fact that the edges get a little less light than the middle, and also for differing pixel sensitivity. Your image should be a little smoother and "flatter" in lighting after doing this properly. Ask Rick which flat field you use. At the time you take your pictures at the observatory, you should note how the camera is tilted on the end of the telescope. Click Utility | Flat Field and select the proper frame (like flatmeg180.st2k perhaps; ask Rick) and click on its name; you should see your picture improve a bit more. Now you're ready to convert to color...
On the top toolbar, click on Utility | Single Shot Color | Process. (Now, don't be tempted to mess around with the other controls in the box that appears - color balance etc. You'll do ALL your image adjustments up in Photoshop later. Make sure you click the "defaults" button if somehow the other controls aren't yet already centered right in the neutral middle.) OK, under method you click on sRGB + gamma (this method attempts to preserve detail in both the brightest and dimmest areas of your image. This is especially useful if your image is of a nebula) and click Process at the bottom of the box. Now, in my experience, sRGB + gamma usually gives the best results. But for pure star clusters without nebulae,you might try DDP as the method. Experiment and be sure that you have the best one. Your goal is to preserve the most detail in the picture in both the bright and the faint areas - Now, Don't worry that you may not think it's perfect!! - that'll come later, in Photoshop. You want to preserve detail and don't worry if it looks too bright or hazy or whatever. OK, after you click, in a moment, your picture turns to color! Now you must save it to the disk. Click on File | Save As and under save as type choose TIFF. Also make sure the folder it wants to save to is the same folder the original image is in (e.g. c:/astropix/a8spr08). Repeat this for all of your images. Your images should now be color TIFF format images, with a .TIF file type.
Stacking Your Images
Digital pictures are great, but they are more prone to noise, as even a few random electrons kicked loose in a pixel will show up as a falsely bright pixel. This can be reduced by taking several images and then stacking them, since the noisy pixels tend to appear in different places on different exposures. This is one reason why you took several images instead of one single long image. Another reason you took several is so if something went wrong during an exposure (airplane, cloud, power failure…etc.) you wouldn’t lose the entire image. I’ve sometimes tried to take long images, only to get wrecked by a Windows glitch at the wrong moment. I learned my lesson.
OK. This step needs a different piece of software, so close CCDOPS (click the red “x” at top right) and on the Windows desktop click on the green icon Registax 4. Now you should see the program window open up. In the upper left, click on Select and browse to the right folder. Now you need to open up all of your images at once, so here’s how you do it – click on your first image, then shift-click on your next, and your next, etc until you’ve clicked on all of them. They should all be highlighted. Now click Open. You may now see a pop up box asking “Image seems to be in colour. Process in colour?” if so, answer yes.
Now, you should see a cross on your image, moveable with the mouse. It’s asking you to select a star to use as an alignment anchor. It will stack all images without rotation, trying to identify that same star on each photo. To successfully stack, your star needs to be fairly easy to identify. That means, it should be clearly the brightest in its local area, and it should be in an uncrowded area, if possible. Try not to pick something close to the edge, but hopefully close to the center. If you’re imaging a star cluster, finding an uncrowded area near the center may not be possible, but being uncrowded is more important than being at the center. Click on your chosen alignment star, and it should grind for a second or two and then pop up a box with an expanded view of your star and some other stuff. In the Quality Estimate area of the toolbars, for Method try Classic. Next to that, under Lowest Quality use 0%. This means Registax will keep all images with quality greated than 0% (i.e. it'll keep all images. That's what we want)
OK. You’ve set the parameters for your first attempt. click on the Align button on the upper left side of the toolbar area. It should grind through and show your different images as it aligns them. Now click the Limit button and it should try to reject any images that are not good enough. At the bottom left of the screen it'll say how many of your frames are in the final stack. Make sure it's all of them. Cross your fingers and toes and click the Optimize & Stack button. This will actually stack them together. It'll take several seconds or longer. When its done, it'll show your stacked image and a bunch of controls for 'wavelet processing' on the left side. Does it look good? Did it stack successfully? You can tell if it failed because it’ll be as if you're seeing with “double vision” ( or triple, quadruple…). Now if the stacking failed… go back to the select button and start over. Try enlarging your alignment box size (see in the toolbar area. 32, 64, 128, 256, 512 are your choices. If your images are really offset from each other, this might be necessary. The other main thing to try is using a different star. Keep trying until it works! Notice that there are functions for changing the brightness and contrast and color, but don’t use them. Keep the colors and contrast bars right in their default position - the center. Remember, you'll be doing your image processing in Photoshop, your goal now is just to preserve the maximum range and detail so Photoshop has good raw material to work with.
If the stacking succeeded… Click Final on the upper toolbar. Then click on Save Image at the bottom left of the screen. A box will pop up and ask for a filename. You should name it after your object and your name and add “stack” at the end of the name. In other words, it should have the same name as your individual images, but with "Stack" instead of "-1" or "-2" etc. For example, if you photographed M35, call it M35James-stack. Now, you have to be careful because that filename may already be used. If so, you’ll have to pick a new name. If you’re not careful, you might overwrite and destroy someone else’s previous image of this object! (like mine??) That will not make you popular! OK, you’ve picked a good name and in the same box, below you’ll see Save as Type. You want to choose TIFF(16bit *RGB). This will preserve the maximum bit depth.
On to Photoshop and Creating Your Masterpiece
Close the Registax program and click on the brown icon for Photoshop 7 . Photoshop is SO great! You can do ANYTHING in Photoshop! I still know only a small fraction of its possibilities. We’ll start you on your path and then you can explore and experiment ad infinitum. Let’s just make sure you’ve got the basics that will be most important for tuning your picture. You can read an alternate version of my Photoshop basics instruction page here.
Look at the toolbar at the very top row of the screen. Click File | Open and navigate to your image and click on it. You’ll now see your picture presented.
Click Image | Adjustments
And you’ll see a long menu of possibilities, including Curves and Levels. The most important thing to adjust is the levels. Now, each pixel already has a light value associated with it. By adjusting your levels you are adjusting what pixel value corresponds to what brightness on your screen. A good rule of thumb is to have your lowest pixel values be black and your brightest be white, but for sky photos, an even better guide is to make your sky a very dark gray. It should not be pitch black, because then you’re losing some of your faintest pixels. To get fancier and maybe get better control of exactly what pixel values will correspond to what brightness, try the Curves command.
You may be hesitant to play around… what if you wreck your hard-won photo? Not possible! Photoshop doesn’t save anything until you tell it to. Even then, you can always save it with a different name and thus preserve your original. This is always a good idea. What if you don’t like what you did? Easy. On the top toolbar…
click on View and on the menu below it, make sure History is checked.
Then in the far right windows you’ll see one for History and you’ll see a chronological list of your changes so far. Right-click on the first one you don’t like and it’ll let you Delete it (this will also delete all later changes). And you’ll be back to where you were before you made that change.
In the same menu, also try adjusting your color. If you’re
shooting a shot with an nebula, you can pump up the
colors with the Hue and Saturation command.
Another thing which you will almost certainly want to do is to compose your photo properly by cropping it. A good rule of thumb is the “rule of thirds”; your photo may have a primary subject and a background. Your primary subject should take up roughly 2/3 of the photo and the background 1/3. Or if there’s a horizon, the horizon should be 1/3 of the way from one edge. But creative types can violate this rule, so don’t be obsessive about it. But it should have some kind of harmony and balance when you’re done. If the good stuff is all on one side and a lot of emptiness is on the other, you’ll want to crop it. Click Image | Crop and you can move the dotted rectangular borders enclosing your cropped image to suit you. If you crop out too much, your final photo will be magnified, but it will also look grainier, so be careful. It’s tempting to crop out everything but your primary subject and make it fill the frame, but it may not make a good final photo (unless you print as a 3x5 and hang it above your sofa so no one can get a close look at it!).
Sometimes a photo works better in portrait and sometimes in landscape, and sometimes your subject may look better if it’s rotated. You can adjust this. Click Image | Rotate Canvas. If you rotate it, you’ll notice that some skinny white triangles appear around your picture. To get rid of them you’ll have to crop them out.
One more thing which is often appropriate to do is to sharpen your photo. If the focus is a little soft, you can make your edges sharper. Click on the top toolbar Filter | Sharpen | Unsharp Mask and play with the parameters to see if you can improve your photo. Be careful, you can easily oversharpen and make it look phoney. You can try Filter | Noise | despeckle to reduce graininess. Or a more extreme version of this goal is to use Filter | Noise | Median and try different pixel numbers within that command.
Photoshop Actions
You can smooth out the graininess in your image by using "actions"; these are macro's that you will find under the "actions" menu, right next to the "history" menu, on the right side of your screen. I like 'make stars smaller', and 'space noise reduction', and 'local contrast enhance', and most of these you can click more than once and go further. You click on the action you want, then click the little black triangle at the bottom of the 'actions' box - then you'll see it work hard for a few seconds and voila'! Your action is accomplished!
Going Crazy…
By all means, feel free to get my attention and ask for help in accomplishing something. But do NOT ask me "does that look OK?" Hey, it's YOUR photo, your artistic creation. Would Picasso ask me if his painting was "OK"?? Instead, say something like "I think the sky is too bright and grainy. How do I fix that?". That shows me you have some idea of what the ideal image should look like and just want help in what commands can accomplish it. I'm not going to grade you so much on your artistic vision. I'll grade you on your dedication to making an image that fulfills your vision and records the steps you used to get there. Now, having said that, I don't want a bizarre and disturbing Jackson Pollack thing. You should have in mind the following guiding thought - "how can I make this image look like it was taken with a BETTER telescope, under DARKER skies, with a BETTER camera, with LESSnoise, and with BETTER artistic composition in placing the borders?" If you want to create something wild and unrealistic, that's OK, but save that one for your own gallery at home. I want a good image that's faithful to the true object you photographed.
You can do a ton of different things in Photoshop. Many will not be appropo for an astrophoto. The photo you turn in should be made by keeping the following goals in mind.... "what would my photo look like if I had a bigger scope, in a darker sky, with sharper clarity of the atmosphere, etc etc.". In other words, I want the best and most realistic image. But you can play around and see what else you can get, just for fun. Or maybe you’ll stumble across an incredible technique and produce Great Art. Click Filter | Artistic and there’s a whole toolbox of different things to try. Myself, I love watercolor paintings and sometimes try this even on astrophotos. You can also add "star of bethlehem" spikes too, under the "actions" menu. Really cheesy, but there you go. Just explore. But the results are strictly for your own wall at home.
Sizing Your Image for Printing
Now, before you can have your picture printed, you have to make sure your image is the right size and resolution. In Photoshop, click Image | size and in the resolution entry type in 135 pixels per inch. Look at your photo and see if it is taller than it is wide, or wider than it is tall, and make the size as close to 10x8 or 8x10 inches as possible. If you can, crop it to make this happen. If that will mess up your aesthetics, then don’t, but then when you frame it you’ll have to have a mount board frame inside your main frame. The easiest way to submit your photo for printing is to do it over the web, right from the back of the room computers if you like. In our limited experience, we've gotten good results from Bay Photo, and they have an outlet just down the street from Cabrillo (Bay St. and Soquel, across from AJ's gas station). Go to the Bay Photo Express Print link to get started.
OK – A good observer will always document what he’s done and present the steps leading to his final results. Record below all the relevant data for your final photograph.
Image Subject:_________________________ in constellation:__________________
Date:_______________________
Time:______________________
Then describe what you did to get to the final raw image, before you used Photoshop. For example, such a description might read like this: “3 images of 5min exposure each. Taken with CCDOPS5, dark subtracted. Single-shot color processed in CCDOPS5, using DDP transfer function, and saved as a 16bit TIFF file. Stacked in Registax3 without image adjustments.”
Now, further describe what you did in Photoshop to get to your final photograph.
Photoshop Processing: