86
Chapter 1: Introduction to GoodLook Suite Purpose, file formats, and overview of workflow Back up your computer before using. This suite remains experimental. Reliability is unknown. It could corrupt your system or personal records and data. It is offered for free, on the understanding that you will take steps to protect your system and data. This document is set out as a tutorial. It is intended to be read in sequence, from start to finish, trying things out as you go. The manual is intended to be read on the screen, not printed. It is most convenient to use two screens, running the GoodLook suite on the primary screen, with the manual on the secondary screen (extended desktop) or on another computer. The GoodLook suite (including Mushroom and Prometheus) together provide all you need for basic to moderately advanced deep sky astronomical image processing. GoodLook displays, explores, and enhances astronomical images. Tools include wavelet noise reduction, background flattening, and deconvolution. Mushroom creates and applies master bias, dark, and flat calibration frames. It converts Bayered images into colour images. Prometheus registers and stacks images with sub-pixel accuracy. Hardware The minimum hardware set is not known, but GoodLook works fine on 32 or 64 bit versions of Vista or Windows 7. It works on a single core 1

Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

  • Upload
    ngoliem

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Chapter 1: Introduction to GoodLook SuitePurpose, file formats, and overview of workflow

Back up your computer before using. This suite remains experimental. Reliability is unknown. It could corrupt your system or personal records and data. It is offered for free, on the understanding that you will take steps to protect your system and data.

This document is set out as a tutorial. It is intended to be read in sequence, from start to finish, trying things out as you go. The manual is intended to be read on the screen, not printed. It is most convenient to use two screens, running the GoodLook suite on the primary screen, with the manual on the secondary screen (extended desktop) or on another computer.

The GoodLook suite (including Mushroom and Prometheus) together provide all you need for basic to moderately advanced deep sky astronomical image processing.

GoodLook displays, explores, and enhances astronomical images. Tools include wavelet noise reduction, background flattening, and deconvolution.

Mushroom creates and applies master bias, dark, and flat calibration frames. It converts Bayered images into colour images.

Prometheus registers and stacks images with sub-pixel accuracy.

HardwareThe minimum hardware set is not known, but GoodLook works fine on 32 or 64 bit versions of Vista or Windows 7. It works on a single core machine but much better on a machine with at least 4 cores. (Reason: Image update is multi-threaded, even for monochrome images. Wavelet noise filtering and deconvolution are multi-threaded for colour images). GoodLook itself only uses 2GB of memory but a machine with at least 8Gb is suggested. A 1920 x 1080 or larger screen is strongly recommended.

1

Page 2: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Supported File Formats

The GoodLook suite can read or write any of the following:

Uncompressed 16 bit TIFF. Excellent for capture. Uncompressed 32 bit floating point FITS. Excellent for capture but twice the disc space. Good

for just-stacked images. Uncompressed 8 bit TIFF. Only good for finished images. JPEG. Only good for emailing finished images.

If at all possible, capture your astroimages, darks, and flats as uncompressed 16 bit TIFF or as uncompressed 32 bit floating point FITS. Never capture as JPEG.

GoodLook can NOT read:

Canon CRW, Nikon NEF, or any other proprietary formats Compressed images other than JPEG

If you cannot capture as uncompressed 16 bit TIFF or as uncompressed 32 bit floating FITS, you may be able to use software that came with your camera, or possibly a general purpose program such as Adobe LightRoom to convert to a format that GoodLook can read. For example, if you have captured as a Nikon NEF file, use LightRoom to export your entire batch of images as 16 bit uncompressed TIFF. Be aware that Adobe PhotoShop 5 out of the box appears to import NEF files as 8 bit, which is useless for astrophotography.

Why uncompressed? There are too many compression algorithms out there to support them all. Uncompressed images load hugely faster than compressed images. Disc space is cheap but life is short.

Warning: Windows Photo Viewer will compress a TIFF file if you rotate it. Use GoodLook to view and/or rotate your images! If you accidentally compress a file, you must use PhotoShop or similar to uncompress it.

2

Page 3: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Suggested Directory Structure Where should you keep your original images, your calibration files, your calibrated images, and your processed images?

The GoodLook suite works best if you keep files of the same type together. For example, keep all your shots of the Horsehead taken through an H-alpha filter on a particular night together in one directory. I use a deeply nested hierarchical structure. At the top level it looks like this:

Calibration Galaxies Clusters Star-Forming Regions Supernova Remnants Wolf-Rayett Planetary Nebulae

Within, say, the Galaxies subdirectory, I then add further subdirectories, as the occasion arises, for Grand Spiral, Dwarf, Irregular, and so forth. Then under Dwarf, I would have a further subdirectory for Barnard’s Galaxy, another for the Sculptor Dwarf, and so forth. And finally, under Barnard’s Galaxy, I would have separate directories for each filter used (because they will be stacked separately from the others, and because they require different flats), and for each camera temperature (because they will require different darks):

Galaxieso Dwarf

Barnard Clear R G B H-alpha

Similarly, the Calibration directory has subdirectories like this:

Calibrationo Unbinned

Bias Dark Flat

o Binned Bias Dark Flat

3

Page 4: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Then, within say the Calibration/Unbinned/Dark directory, I would have subdirectories for darks of different durations and temperatures:

Calibrationo Unbinned

Dark 1hr -20C 1hr -12C 30min -18C

The dozen or so 1 hour darks done at -12 degrees will all go together, and so on.

Reason

The reason for this approach is that it makes it easier to bulk-process two important steps: calibration (and possible Debayering) with Mushroom, and registration and stacking with Prometheus.

4

Page 5: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Chapter 2: Exploring images with GoodLookThis chapter concerns displaying and exploring images with GoodLook. Sophisticated enhancement (wavelet noise filtering, deconvolution, etc) will be discussed in a later chapter. For the moment, we will concentrate on just looking, so we won’t save our changes.

Some Goals

Very rapidly explore images full-screen, in the pitch dark, with the minimum of intrusive clutter, making GoodLook suitable for presenting astronomical images at a meeting.

Flick easily between the full image and actual-pixel views (and beyond) of salient features. Keep underlying images unstretched for as long as possible. Apply strong nonlinear

on-screen stretch in real time while exploring.

Finding an image

Run GoodLook. In the middle of the screen, you will see a standard Windows Explorer navigation panel. It will wake up pointing to whatever directory you last visited using Mushroom, Prometheus, or GoodLook.

Navigate to a directory containing some images that you would like to look at. For simplicity, they might be JPEG holiday snaps, or finished astrophotos in one of the formats that GoodLook can read (JPEG, 8 or 16 bit uncompressed TIFF, or uncompressed 32 bit floating point FITS).

If required, use the Windows Explorer View Menu icon to set the view to Large Icons. Windows 7 can show icons of TIFF images, but not FITS. Vista is even less obliging.

At this point, you can cut, paste, drag to another place, or delete files one at a time, in the usual Windows Explorer ways.

Double click on the icon of the image that you wish to view (or single click and then [Open]). GoodLook will now show you the image, full screen. GoodLook is designed to be fast at displaying an uncompressed 16 bit TIFF from a cold start.

Note: If you only have unprocessed astrophotos to look at, you will have to jump ahead to the section on enhancing the darks, or you will probably see only blackness.

Navigating within an image

Zoom: Zoom in and out at any time using the mouse wheel. You can zoom in to 8:1 beyond individual pixels. GoodLook interpolates very smoothly between pixels.

Full Image: Press the Spacebar at any time to go back to the full image. Pan: Use the mouse to Left-Drag the image at any time left, right, up, down. While dragging,

GoodLook shows a rough and ready preview.

5

Page 6: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Centre Object at Actual Pixels: Better than dragging is to Double-Click on any item of interest in the image. This will go to actual pixels, centred on the item. Use the mouse wheel to zoom in and out, or the space bar to go back to the whole image.

Toolbars

GoodLook always runs full screen, and on your primary monitor only. Across the top and bottom are full-width but very narrow toolbars. These fade in slowly if you hover the mouse over them, and fade out again when you move the mouse away. That way they don’t distract from your image.

Press F1 to lock the toolbars in place, and activate context sensitive hint mode. In Hint mode, hovering over any item on the top or bottom toolbar displays its purpose. Press F1 again to go back to normal mode.

6

Page 7: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Top Toolbar

Bring up the top toolbar, either by pressing F1 or by hovering the mouse at the very top of the screen. Starting from the left, are:

A green box marked [1] that when clicked will apply a double stretch. See below. A checkbox to automatically clip the black point to the second centile. Images straight out of

the camera may have a milky gritty background due to dark current, skyglow, and airglow. The checkbox will fix this. (In real life, use partially stacked edge clipping, wavelet noise reduction and background flattening before clipping the black point).

A slider to progressively enhance the darks, at the expense of bright contrast. The slider applies an arcsinh (pronounced arcsynch) stretch. This is probably the best stretch for most deep sky images. It hugely brightens the darks without too much loss of contrast in the brights. Hitting Enter resets it. Images straight out of the camera are likely very dark (after suppressing milky background). The stretch slider will fix this, at the expense of making them much more gritty again.

Double-clicking on the knob of this slider brings up a graph of the actual arcsinh stretch, with a numeric display of the dark boost, mid-tone contrast, and bright contrast.

Another checkbox to dynamically rescale whatever is displayed on the screen. This changes in real time as you zoom and pan. Try it.

[Hold]. This button commits the existing dark point, stretch, balance, and saturation, resets the relevant sliders and checkboxes, and recalculates histograms – a kind of Apply button for these controls, to make what’s on the screen the basis for moving forward.

Sliders to linearly increase or decrease red, green, blue. On a monochrome image, any one of these sliders will double the image brightness. All three will therefore increase brightness 8 times. Hitting Enter resets them.

[A]. This button performs an automatic colour balance. See final chapter. A slider to adjust saturation of a colour image. Hitting Enter resets. Various other controls not relevant now: [*] removes boxes you have placed with Ctrl-Left-

Click around stars etc, [D] deconvolution, [C] cropping, [H] removing hot and cold pixels, measuring FWHM, [B] removes background gradients, and so forth. These will be discussed later.

7

Page 8: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Bottom Toolbar

Bring up the bottom toolbar, again either by pressing F1 or by hovering the mouse at the very bottom of the screen. From the left, are:

[Open]. Clicking here will bring up the Windows Explorer navigation panel, enabling you to click on a different image icon, or to browse other directories.

Boxes showing the number of the current image (in alphabetical order of file name) and the number of images in the directory, eg [5] of [9].

The name of the file, eg [Tarantula.TIF]. If you press F1 to lock the toolbars, this box says [Hint Mode]. Just click on it to get the file name back.

[<Prev] displays the preceding image in this directory, in alphabetic order of filename. [L] locks zoom and pan across images. This is very useful for comparing a small area of

interest (eg a tiny background galaxy) under high zoom across a number of similar subframes. The button goes yellow when locked. Click again to unlock.

[Next>] displays the next image in the directory. [FILTER] is not relevant here, but applies wavelet noise filtering to an image. This will be

discussed later. [::] debayers an image from a one-shot colour camera. See below. The next three boxes show the raw underlying RGB values for the point under the mouse. The bar graph shows the black-point clipped and stretched RGB values for the image as

displayed on the screen. To show unstretched values, hit the Enter key. To show unclipped values, uncheck the relevant check box on the top toolbar.

[L] and [R] rotate the image 90 degrees. [F], [T], [t], and [j] save the image in various formats (see below). Two white boxes showing the pixel coordinates in the underlying image. [Exit] closes GoodLook.

Navigating between images

As described above, the [<Prev] and [Next>] buttons on the bottom toolbar move to the alphabetically previous or next image in the current directory. The RIGHT ARROW and LEFT ARROW keys do the same thing.

Also as discussed above, the [Open] button on the bottom toolbar opens the directory navigation dialog box which lets you select a file manually or go to another directory. The ESC key does the same thing.

8

Page 9: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Saving an imageOn the bottom toolbar, [F], [T], [t], and [j] save the file in various formats. The image is always saved with original filename, plus the letter E (for Enhanced), plus a number indicating the degree of stretch.

[F] 32 bit uncompressed floating point FITS. Lossless, but twice the size of a 16 bit TIFF. [T] 16 bit uncompressed TIFF. Generally, intermediate work should be saved this way. If you

want to explore your image at a meeting using GoodLook, save as a 16 bit TIFF. [t] 8 bit TIFF. Half the size again. It is not possible to do much further enhancement or even

to stretch it further. Not so useful now we have cheap fast terabyte drives. [j] Very lossy but hugely smaller file. Great for emailing a copy to a friend, but of no use for

anything else.

Bayered images from a one-shot colour cameraBefore we can use or look at an image from a one-shot colour camera (whether it is an actual photo of a faint fuzzy, or a flat, dark, or bias frame) we must understand about debayering.

A bayered colour CCD sensor has each pixel made up of four sub-pixels in a square array, typically like this:

R G R G R G G B G B G B

R G R G R GG B G B G B

Is your one-shot colour camera image bayered?Open an image taken with your one-shot colour camera in GoodLook. If the image is bayered, you will see a monochrome image. If you zoom in, you will very clearly see the above 2x2 pattern in the grey.

Debayering with GoodLookDebayering in GoodLook is only for a look-see or to assuage curiosity. (Normally, we will painlessly debayer images in bulk, at calibration time (see Chapter 3), using Mushroom.)

GoodLook has a button with four dots on it [: :] on the bottom toolbar, representing the 2x2 pattern. Clicking this button debayers the image, i.e. shows it on-screen as a colour image. Clicking [T] on the bottom toolbar would then save as a regular 16 bit colour TIFF.

There are many bayering schemes. At present, GoodLook Suite only correctly debayers the RG/GB pattern and the BG/GR pattern. Use Mushroom to select the correct pattern for your camera.

9

Page 10: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Enhancing dark detail

Above is a stack of 1-hour exposures of NGC 1365 through red, green, and blue filters. Notice the dark enhancement slider on the top toolbar. The knob is at far left, which leaves the image unchanged. At first glance you can see only stars. The super-bright active galactic nucleus is just visible to right of centre.

To bring out dark detail, drag the knob of the Dark Enhancement Slider progressively further and further to the right:

10

Page 11: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

The little graph shows the applied arcsinh nonlinear stretch. The three boxes at the bottom of the graph show the resultant change in contrast in the darks, mid-tones, and highlights respectively. The darks have been enhanced (brighter, more contrast) a whopping 39.3 times, as indicated by the curve being extremely steep at the left of the graph. Moving the slider yet further to the right will increase the dark enhancement up to a maximum of 100 times. This makes the background start to look noisy and gritty and is probably excessive.

Necessary loss of mid-tone and highlight contrast

If the curve is steeper at the left, it must get flatter elsewhere. The mid-tone contrast is down to 32 percent of that in the original image, and the highlight contrast is down to 16% of that in the original image. This seems unfair, but it is a mathematical necessity. Assuming that even one star in the incoming image is fully exposed, then any stretch that enhances the darks must reduce the mid-tone and highlight contrast.

11

Page 12: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Double stretch

Click the little button marked [1] at the left of the top toolbar. This will apply a double stretch, as shown above. As in the earlier example, the slider was set to enhance the darks 39.3 times. This is still the case: the double stretch applies two weaker stretches to achieve the same final enhancement of faint features such as background galaxies. The noise in the background will also be unchanged. However, the mid-tones will become brighter. This can produce a more striking image, but the unavoidable cost is a further reduction in highlight contrast. This will result in near burn-out of bright stars and galactic centres. Again, it is a property of any nonlinear stretch, in any program whatsoever, that if you make the mid-tones brighter, you will lose contrast in the highlights.

Temporary versus permanent changes

Consider the conceptual difference between:

Temporarily enhancing dark detail on-screen, so that you can see that there is really something there and not just a black screen, but not saving the result. This is reversible simply by returning the slider to the far left, and can be done as often as you like, just for a look-see.

Permanently enhancing dark detail, by moving the slider to the right, saving the result (for example by clicking [T] to save as a TIFF), opening the saved file, and continuing to work on that. That is generally one of the very last steps, after aligning and stacking, removing hot pixels, wavelet noise reduction, background gradient removal, setting the black point, and deconvolution. Once you’ve stretched an image, you can’t unstretch it.

12

Page 13: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Dark Point Clipping

Above is a (strongly stretched) single 1 hour uncalibrated image of the horsehead. The background is grey due to the presence of an hour’s worth of integrated dark current. Below is the same image with the black point checkbox checked:

The darks are now much darker. It can be useful to temporarily clip the black-point when initially exploring an image. Permanently clipping the black point (i.e. clipping and saving the result) too early will usually clip off far too little or too much, due to noise and background gradients. We must

13

Page 14: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

filter and perhaps flatten the background before permanently clipping the black point. This is discussed in the final chapter.

14

Page 15: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Chapter 3: Calibration of raw images Using Mushroom to handle darks and flats

Why do darks and flats ?

The left panel shows a (greatly stretched) 1 hour raw image of the Horsehead, in H-alpha. It is very milky due chiefly to integrated dark current, and gritty due to hot pixels. The right panel shows the same image, under the same conditions, after subtraction of the master dark frame.

In addition, division by a master flat frame corrects for vignetting (concentric darkening far from the centre) and dust doughnuts.

Overview of Calibration Files

Crucial to good astrophotography is taking and maintaining a large library of calibration files, including darks, flats, and bias frames. They represent a great deal of up-front work, before you can do anything much, but they are extremely reusable.

15

Page 16: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

A dark is what the camera sees with eyes shut tight (eg DSLR with lens cap on, or astrocamera with shutter closed). Longer exposure, higher temperature, and binning all cause greater integrated dark current and therefore a brighter dark frame (and a milkier image). Therefore, each imaging session must be matched to a set of dark frames that were done under the same conditions of temperature, duration, and binning level.

You can reuse your darks across different objects and different filters, but not across different temperatures or different binning levels.

A flat is what the camera sees if it looks at a matte, non-directional evenly lit screen. The flat captures information about vignetting (less light reaching the corners of the chip), dust doughnuts due to dust on filters, CCD chips and their covers, and systematic differences between pixels.

The flat at the right is real. GoodLook has clipped the black point and stretched the image to exaggerate the vignetting and dust doughnuts.

Each imaging session must have a set of flat frames done (or in your library) at the corresponding binning level. Unless you keep your CCD and filters astonishingly clean, you will also need a set of flats for each filter (eg clear, blue, H-alpha, etc) at each binning level.

You can reuse your flats across different objects, different exposure durations, and different temperatures. If you see dust doughnuts – large, faint grey rings - on your images even after calibration, you need to re-do your flats.

A bias frame is an arbitrarily short dark. Bias frames are not black, but are typically a few hundred counts above zero. We will call the special dark frames that go with our flats as bias frames, because in general they are very short. For example with my camera I typically take 1 hour image frames, and therefore 1 hour darks, but my flats typically require only a second or so. A bias frame of a tenth of a second will work fine. Bias frames can be reused across flats for different filters.

Numbers of darks and flats: an effort-based analysis

Including more flats in your master flat, more darks in your master dark, more bias frames in your master bias frame, will always reduce the noise in the final image, but by less and less as you do more and more.

The actual trade-off between effort and return for increasing numbers of flats and darks is very complicated. Calculations in text-books get bogged in the maths of noise and forget about the marginal effort. We note that if you work at a really dark site on a moonless night:

16

Page 17: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

The noise in one dark frame is the same as the noise in the dark background of a Faint Fuzzy frame. If they were both as hard to take, the sweet spot would be to take about as many darks as you take Faint Fuzzy frames. But darks take less work, and can be built up in a library for negligible additional effort. Consequently, at dawn twilight after a night of imaging, I schedule a couple more dark frames at the same temperature to add to the library and to the master dark. Over time I build up a large number of darks for negligible marginal effort.

The effort to take a single flat is rather high, but once you are set up, especially if you have a light-box, the effort to take a whole lot more is small, and you only have to do it once. Bias frames are essentially effortless. Consequently, a reasonable approach is to take lots of both, many more flats and bias frames than Faint Fuzzy frames.

Conversely, if your site is very light-polluted, or the moon is up, or you are photographing an intrinsically extremely bright object, readout noise and dark current noise have much less impact on signal to noise ratio, and the additional return on effort for doing extra darks and flats is much less.

As the camera ages, throw out your oldest darks – say anything over 3 months. If you see new dust doughnuts, take new flats, because the dust has moved.

17

Page 18: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Making a Set of Flats

A master flat quantifies what the camera sees if it looks at a perfectly evenly illuminated surface. It helps compensate for:

Vignetting: the fact that less light reaches the corners than the centre of the frame. Dust doughnuts: Dirt on optical surfaces, especially on the front of the CCD, on its chamber

window, and on filters. Pixels of systematically varying sensitivity.

Flats using the twilight sky

Cool the camera to reduce noise. Focus the scope accurately at infinity. Dust doughnuts change if you are out of focus. Place a sheet of translucent white cloth reasonably tightly over the front of the scope. With the sun down but before the stars come out, point straight up. Doesn’t matter if there

are clouds about so long as they’re not moving fast which can mess up exposure times. Take a test exposure. Eyeball the brightness of the centre of the image. Start when you can

get a mid-grey around 30,000 counts (but between 20,000 and 40,000 counts) with an exposure around 0.1-0.2 seconds. Too short and shutter artefact and/or directional light may be an issue.

Ideally you want a set of ten to twenty. The sky brightness will change very rapidly, and you will have to keep increasing the exposure.

Keep taking flats until the exposure exceeds about 10 seconds. Too long and integrated dark current noise may become an issue.

Pre-dawn, start at 10 sec and work down. Safety hint: don’t shoot into the rising sun.

Artificial light source for flats

The very rapidly changing sky brightness can be, to say the least, frustrating. To do flats at home on a rainy night, or in your closed observatory, you will need a source of light that is perfectly directionless and wider than the field of view.

I use a big box, made to slide over the front of the scope as it points upward (as shown on the right) with multiple incandescent torch bulbs at the top, and two cloth diffusers about 10 cm apart. The box is made of paper-covered styrene art board, and can be lifted by one finger but takes up a lot of space. The top is easily removable for changing the light bulbs.

Make sure the bulbs don’t get hot and set fire to the box. Work in the dark: stray light may be very directional. As before, use accurate infinity focus,

camera cold, and aim for mid-grey 30,000 counts (say 20,000 to 40,000), with an exposure around 1 second (say between 0.2 and 10 sec).

Aim for 10-20 flats, saved as 16 bit uncompressed TIFF or as 32 bit floating FITS.

18

Page 19: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Electroluminescent panels

Work for small instruments, and do not require a diffuser. They use very high voltages and large ones are expensive.

Flats for narrowband filters

For most narrowband filters, incandescent or halogen bulbs are required, as LEDs, electroluminescent panels, and fluorescent bulbs may not emit the relevant wavelengths.

General considerations

For a cooled camera, the temperature does not have to be the same as you are going to shoot your Faint Fuzzy at, but set it very cool to reduce noise.

Ideally, do a set for every filter that you are going to use. This is chiefly to handle dust on the filter.

If your camera can handle various binning levels, eg 1x1 (unbinned), 2x2, etc, you will need to produce a set of flats for each binning level that you intend to use. Binning is done in camera hardware before the read-out transistors. Trying to downsize an unbinned flat in software generally does not work.

Taking bias frames for the flats

Recall that a bias frame is a very short dark frame, taken with the lens cap on (DSLR) or with the shutter closed (astrocamera).

The bias frames for the flats have to be done at exactly the same temperature, and at the same binning level as the flats themselves.

In principle, they should have the same duration as the flats, but especially with a cooled camera and exposures of a few seconds or less, the exact exposure is unimportant. A library of stock bias frames at say 1 second exposure will work fine.

Rattle off a set of 10 or 20.

19

Page 20: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Using Mushroom to create a master bias frame for the flats.

Classical mushrooms have flat, dark gills on the under-surface, hence the name of the program.

Use Windows to put your matching 10 or 20 bias frames done at the same temperature as your flats in its appropriately named directory, for example MyAstrophotos\Calibration\Unbinned\Bias\-30c Unbinned.

Run Mushroom. The following dialog appears. For monochrome cameras and DSLR’s, leave “Debayering of Camera Images” at () None, and

ignore the Debayer Pattern, which will be greyed out. For One-Shot Colour cameras some once-ever setting up is required:

a. Select either Bilinear or Superpixel Debayering.i. Bilinear (recommended) maintains image size but interpolates colour

between pixels.ii. Superpixel is fast and artefact-free but halves image size.

b. Select the debayer pattern appropriate to your camera. If you get it wrong, the red and blue channels in your calibrated images will be reversed. If that happens try again with the other alternative. Your settings will be remembered next time.

Click on the top button on the right: Make Master Dark (bias) from Dark Set. A new window will pop up.

In the new window, click on Select Input Directory (Dark Set). A Windows Explorer window will open. Navigate to your recently created directory (eg

Bias\-30c Unbinned\). You should see your 10 or 20 bias frames that you took to match your flats. Double click on any one of them. It doesn’t matter which. Mushroom will automatically base the name of the master dark file on the name of the directory, but with the extension “.DK” added, in this case -30c Unbinned.DK. The file is really a 16 bit uncompressed TIFF, but it has the extension .DK so that Mushroom can automatically recognize it as a master dark later on.

Click Go. The master bias frame (-30c Unbinned.DK) will be generated within a few seconds, and the top panel will say Done. It will be in the directory in the directory that you chose, in this case Bias\-30c Unbinned\.

Close the Make Master Dark form.

20

Page 21: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Using Mushroom to make Master Flat from Flat Set and Bias Use Windows to put your 10 or 20 flats in an appropriately named subdirectory, for example

MyAstrophotos\Calibration\Unbinned\Flat\Clear Unbinned\. Run Mushroom. Select the same Debayering radio-button as you chose for your bias frames. Click on Make Master Flat From Flat Set and Bias. A new window will open. Click on the first big button, Select Input Directory (Flat Set). Navigate to the directory

mentioned in step (1). You will see your set of 10 or 20 flats. Double click on any one of them.

Click on the second big button, Select Bias File (*.DK) for this flat set. Navigate to the bias file (-30c Unbinned.DK) that we created earlier. Double click on it.

Click Go. Mushroom will take a second or two to mentally average all the raw flats, subtract the

master bias image, and then normalize the result to produce a master flat with a mean value of 50% white (32768 counts). It will save the master flat along with the other flats, with a name based on the directory, and with the extension .FLT (here Clear Unbinned.FLT).

In the above example, we pointed to the master bias file in its original folder. It is also possible, and perhaps desirable for documentation, to put a copy of the master bias file in with the flats. That is easy to do either using Windows or, if you are confident that you know what you are doing, from within Mushroom while you are in step (3) using cut and paste. Point to the copy in step (4).

Review so far:So far, we have:

Taken our flats and bias files Stored them in a suitable directory structure Converted the raw bias files to a master bias file *.DK. Used the master bias file to convert the raw flats to a master flat *.FLT, with a mean value of

50% white.

Conceptually we have done this at the front end, without even taking a single photo of our Faint Fuzzy yet, although in practice it can be done at any time. An enormous amount of work, but absolutely crucial to getting good deep sky images, and (if you don’t fiddle with your filters and get them dirty) we only have to do it once ever.

21

Page 22: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Taking Faint Fuzzy Photos

How long an exposure?Take the longest exposures you can get away with. For example, with our permanent set-up, Trish and I routinely take 1 hour sub-frames. Why?

A 1 hour exposure supplies 1 hour of data, and 1 unit of readout noise. 3600 1-second exposures provides 1 hour of data, and 3600 doses of readout noise. If you’re photographing something really bright, the readout noise is unimportant. If you’re photographing something incredibly faint from a pitch-black site, then 3600 doses of read-out noise is catastrophic. So take the longest exposures you can get away with. The practical limit is set by:

Integrated dark current. With an uncooled camera, the image will fog out after a few minutes of exposure.

Sky glow. From a hideously light polluted site, the image will white out after ten minutes or so.

Polar alignment. Unguided, unless your polar alignment is superb, you will get streaky stars after a few minutes. Guided, unless your polar alignment is superb, you will get field rotation after 20 minutes or so.

Things that go Bump in the Night. Cloud, wind buffet, guiding glitches, aeroplanes, friends with torches, flat batteries, crashed computers, and wicked wombats kicking the mount means that each extra ten minutes is an extra risk.

How many?

The more hours of exposure you can take, the better. Assuming your sub-frames are sufficiently long as described in the previous section, taking four times as many hours will halve the grittiness of the faintest features. Taking a hundred times as many hours will reduce the grittiness ten-fold. Goes with the square root of the number of hours.

I prefer to go for many hours, often across several nights, on the one object, to try to get really good faint grit-free detail, rather than flitting from object to object. The longer the exposure, and the less the grittiness, the better sharpening techniques like deconvolution will work.

To bin or not to bin?Astrocameras can generally combine the electrons in blocks of two-by-two pixels, in hardware, before the image is sent to the read-out transistors. That produces the effect of quadrupling the exposure, but at the expense of lower resolution.

Ideally, the size of a pixel (in seconds of arc) should be rather less than half of the FWHM of a star. The FWHM will be dictated by instrument quality, seeing, guiding, and tracking.

Always bin if:

The pixel size on your camera is much less than say half the FWHM.

22

Page 23: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

What you are photographing is so faint that you can’t get a good, grit-free stacked image in a reasonable time.

On my system, seeing on a great night is about 3.5 pixels FWHM, and in the final stacked image (which will include guiding and tracking) maybe 4.5 pixels. Thus it is tempting to bin if I’m after incredibly faint features, but not otherwise. I will always get a sharper result unbinned. Measuring FWHM using GoodLook is discussed later.

23

Page 24: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Measuring FWHM. Open your raw uncalibrated image in GoodLook. Click F1 to lock the toolbars. If you have a one-shot colour camera and your image appears monochrome with a

noticeable 2x2 texture to it, click the [: :] button on the bottom toolbar to debayer the image.

Double click on a non-burned-out star. Check that the centre of the star is less than say 50,000 counts, as shown on the bottom toolbar.

Ctrl-Left-Click on the star. A little box appears around the star. Use Ctrl-Mouse-Wheel (if required) to make it just a bit bigger than the star. If you like, you can do many stars. GoodLook will take an average. Delete a box with Ctrl-Right-click. Delete all boxes with [*] on the top toolbar.

Click [FWHM] on the top toolbar. This settles and sizes the box exactly on the star. The FWHM is displayed in pixels. (Strictly, GoodLook displays Full Width Half Flux, which is typically a very slightly larger number, but slightly easier to measure accurately.)

Taking Dark Frames for our Faint Fuzzy Photos

A raw (uncalibrated) photo of our Faint Fuzzy contains both a bias signal and an integrated dark current, that we must measure and subtract using a master dark file.

Dark frames must be taken at the same binning level, and at exactly the same temperature, as the photo of the Faint Fuzzy. In general, an increase in temperature of 6 degrees will double the dark current. Thus it is almost as bad to have a 6 degree mismatch in temperature as it is to not bother with darks at all.

Trish and I do our dark frames either on cloudy nights, or during astronomical twilight before dawn. If the camera is exposed to direct sunlight, light leaks in the camera will make it a waste of time trying to do darks. Also the cooling will be strained and may fail.

Try to keep to a few standard temperatures. That way, doing even a couple extra darks each night at one of your standard temperatures gradually builds up a huge library.

Bias frames are cheap, and only take a few seconds each. Darks take as long as the shots of the Faint Fuzzy. Consequently they are expensive.

How many do you need?

As a very rough guide, you will want to have at least one dark frame for every Faint Fuzzy frame. Thus if you take five 1-hour subs of the Tarantula, you will want at least five matching darks. If you are photographing something very bright, you need fewer darks, as there is more signal and the dark current noise (and patterned readout noise) matters less. If you are trying to photograph something extremely faint you need more darks. If your site suffers from extreme light pollution, darks matter less because the noise from the light pollution matters much more than the noise in the darks. If your site is pristinely black, you will take better photos with just one dark than you will with just one dark at a polluted site, but you will benefit from taking many more darks.

24

Page 25: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Making a master dark

The process of making a master dark from a set of dark frames is identical in all respects to the process of making a master bias frames. Here is a brief summary:

Run Mushroom. Select the same Debayering option as you selected for bias and flat frames. Click Make Master Dark (or bias) from Dark Set.

o Click Select Input Directory (dark set). Navigate to directory containing the dark frames that match your Faint

Fuzzy exposures for time, temperature, and binning, and double-click one of the flats.

o Click [Go]

When making a Master Dark, Mushroom looks for hot and cold pixels. Hot pixels are ones that are systematically jammed on full white, or over-read so hugely that they are likely very noisy and we are better off without them. Cold pixels are ones that are either systematically jammed off, or under-read so badly that we are better off without them.

When reading each uncalibrated dark frame, Mushroom mentally replaces hot and cold pixels with the median of their eight immediate neighbours. The number of hot and cold pixels is written to the screen as each file is processed.

Review so far:So far, we have:

Applied the master bias file to our flats to make a master flat with the extension .FLT Considered trade-offs about how long an exposure to take, how many, binned or not, and

taken our Faint Fuzzy photos. Reviewed the uncalibrated photos. Taken a matching set of darks with the same exposure, temperature, and binning, and

created a master dark with extension .DK.

25

Page 26: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Calibrating an Image Set Using Master Flats and Darks

Broadly, calibration is the process of:

Debayering if required. Subtracting the Master Dark, to remove bias and integrated dark current, and any fixed

pattern in the readout noise. Dividing by the Master Flat, in order to correct for vignetting and dust on filters and CCD.

In more detail:

1. Run Mushroom. Select the same Debayering option as you used for bias, flats, and darks.2. Click on Apply Master Dark and Flat to Image Set. The following dialog box appears:

3. Click on Select Input Directory (Image Set). Navigate to the directory where you put your raw uncalibrated images, and double-click on any one of them.

4. Click on Select Master Dark File. Navigate to where you put your Master Dark with exposure, temperature, and binning level matching this image set. You should see your Master Dark file, eg 10 min -30c unbinned.DK. Double click on it.

5. Click on Select Master Flat File. Navigate to where you put your Master Flat with filter and binning matching this image set. You should see your Master Flat file, eg Clear Unbinned.FLT. Double click on it.

6. Choose a threshold for hot pixel removal. See below.7. Click [Go].

The darks and flats will be applied to the entire image set within a few seconds. The results will be stored in a subdirectory called Calibrated\. The original images will be left untouched.

26

Page 27: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Automatic hot pixel removal during calibration Even with hot pixel removal turned off, most warm-to-hot pixels are automatically fixed by

the dark subtraction process. However, especially in very long exposures or at higher temperatures, noisy or scalding-hot pixels do not remove well simply by dark subtraction. On my ageing 11 megapixel STL-1100M, I might expect the dark subtraction process to correctly handle about 5000 warm pixels, leaving about another 500 scalding-hot ones that are not fixed by dark subtraction alone. Setting the hot pixel removal threshold to say 1000 will remove most of these, with no detectable degredation of the image.

If you don’t want Mushroom to try to resurrect these residual scalding pixels, select “Off” for the hot pixel removal threshold.

When you press [Go], Mushroom will display the number of hot (and cold) pixels it removes from each frame. If you think too many were found, try a higher threshold and click [Go] again. If you think too few were found, try a lower threshold and click [Go] again.

Use GoodLook to open the Calibrated\ subdirectory, and to preview results so far. You will see that the images have lost much of their gritty background, and can take much more stretch before looking too gritty again.

Upsampling of dithered images.Tiny errors in tracking and guiding, or outright intentional shifts in scope position, will move the image by non-integer pixel amounts. This is called dithering.

There is a checkbox for up-sampling the images by a factor of two. Additional pixels are interpolated between existing pixels. The stacking of up-sampled dithered images can yield slightly sharper images than non-up-sampled images.

The benefit in the case of shallow stacks is minor and probably not worth the effort.

27

Page 28: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Summary So Far

So far, mostly working with Mushroom, we have:

Applied the master bias file to our flats to make a master flat with the extension .FLT Considered trade-offs about how long an exposure to take, how many, binned or not, and

taken our faint fuzzy photos. Reviewed the uncalibrated photos (with GoodLook). Taken a matching set of darks with the same exposure, temperature, and binning, and

created a master dark with extension .DK. Applied the master flat and master dark to the uncalibrated image set. Reviewed our progress (again with GoodLook).

The calibrated images are in a subdirectory of the raw uncalibrated image set, and they are now ready for stacking with Prometheus.

28

Page 29: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Chapter 4: Registration and Stacking of Images using PrometheusPrometheus takes two or more roughly registered images, which might be monochrome, RGB, or a mixture, and registers and stacks them with extreme sub-pixel precision. Prometheus registers and stacks at the same time, without producing a set of intermediate registered-but-not-stacked files.

As before, the goal is to be as simple as possible but no simpler, and for common operations to be very fast and easy.

Grand overview of where we’re headingWith a one-shot colour camera, once we’ve got our calibrated subs, processing is relatively straightforward: stack and then process.

With a monochrome camera and Luminance, Red, Green, and Blue filters, there are many ways of proceeding using Prometheus and GoodLook. Stacking and further processing can be done in many

29

Page 30: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

different orders. Here is my current favourite method:

In the above method, we stack the calibrated L, R, G, and B frames separately. We process the luminance stack to the point where we could publish it as a black and white image. Separately, we combine the R, G, and B into a single unstretched (ie pretty dark) RGB image. Whether we de-noise the individual stacked images or de-noise the RGB stacked image probably doesn’t matter much. We adjust colour balance and saturation in the RGB stacked image. Finally we combine the L and RGB.

Registration and Stacking with Prometheus

Assumed vs manual rough pre-registration The assumption of rough existing registration is for speed and the avoidance of surprises. It is usually valid for the most common (and tedious) case of a single imaging session. For images that are not already roughly registered, the images can be manually shifted, scaled, and rotated using the mouse, and then precision registered.

Quincunx transformA Quincunx was a Roman military formation in which four centurions enclosed the general in the middle. Think of the four outer soldiers as standing at the corners of the key frame, and the general as standing in the centre of the key frame. Each chap can move up-down and left-right, thus allowing ten degrees of freedom. Prometheus fits and applies two (just slightly more general) conic equations:

x’ = k0 + k1 x + k2 x2 + k3 y + k4 y2 + k5 xyy’ = j0 + j1 x + j2 x2 + j3 y + j4 y2 + j5 xy

where a pixel (x,y) in the incoming frame is transformed into a pixel (x’,y’) in the stacked image. This allows for horizontal and vertical shift (translation), horizontal and vertical stretch, rotation, shear, and trapezoidal deformation of the incoming image relative to the key frame.

Averaging vs. SumUnnecessary angst is spent on the difference between averaging the incoming frames and summing the incoming frames. Prometheus always sums on the stack, but then divides by the number of

30

Page 31: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

frames, to produce an average. Division by the number of frames has no effect on the signal to noise ratio. (Proof: Division by say 12 frames is the same as re-expressing a distance-in-feet as a distance-in-inches. It has no effect on the percentage accuracy of the measurement.)

The user can optionally provide a non-linear stretch before saving.

Monochrome, RGB, L+RGB, NarrowbandPrometheus can stack straight monochrome sets and straight single-shot RGB colour sets. It can combine a Luminance frame or set with an RGB frame or set. It can stack narrowband frames or sets sets as false-colour RGB.

The conceptual issues are best addressed with specific examples, starting from simple and tedious, and working up to complex and automatic.

31

Page 32: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Example 1: Simple monochrome stack

We take four shots of the Tarantula with a monochrome camera through a particular filter. It might be a clear filter, or blue, or H-alpha.

Loading our key frame1. Run Prometheus2. Click [Open] at the bottom left corner, and navigate to the directory containing the images

to be stacked. 3. Double click on the image that you wish to use as a key frame. (All the other images will be

registered to the key frame.)4. The chosen input image appears in the left half of the screen. The right half (output) is black.

Navigating the imagePrometheus uses exactly the same user interface as GoodLook for navigating the image:

Mouse wheel to zoom Double click on a feature to centre and go to individual pixels Mouse Drag to pan Space bar to go to whole image

Making the image brighterBelow the [Open] button are a [1] button, a dark point checkbox, and a stretch slider, which have exactly the same functions as described earlier under GoodLook. Use these to bring out just enough image detail on the screen so that you can see what you are doing. Always do this as it sets the sensitivity of automatic star finding.

The Stack to Control Group Find the group of controls labelled Stack to. At the bottom of the Stack To group of controls, you will see a panel with the word Mono, because Prometheus recognizes we have loaded a monochrome image. If we had loaded a colour image, it would say RGB.

You will notice that there are four coloured boxes marked [L], [R], [G], and [B], and each has an associated checkbox. Prometheus maintains four separate stacks, Luminance, Red, Green, and Blue (L, R, G, and B). We have great flexibility as to which sub-frames we send where. For now, notice that

32

Page 33: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

by default after loading a monochrome image, only the checkbox next to [L] is ticked. The monochrome incoming image will be sent only to the Luminance stack, and a monochrome image will result.

You do not change anything here at the moment: the default settings are fine.

Starting the Stack with the Key FrameIn the Stack to control group, click the [Start Stack] button.

Our incoming image is loaded as the key frame, to which all others will be registered, as in the diagram above.

The diagram also shows that Prometheus maintains four separate stacks, L, R, G, and B. Our incoming image is also loaded unchanged onto the L, or Luminance, stack. Two control panels across, you will see a display box labelled Stack. Notice that this display box says that there is now 1 image loaded. From that one image, there is one copy on the L stack, and none on the R, G, or B stacks.

Finding Stars in the Key ImageIn the Stack To control set, click Find Stars. Prometheus will search exhaustively for stars in the image, and put boxes around them. The number of stars found is now displayed in the Stack display box. The Find Stars button now says Delete Stars.

Changing the number of stars foundLook to see how well Prometheus has done finding stars. The rock bottom smallest number required for registration of images is five, but in practice a few hundred is a good number and a thousand or more is ok. The more you have stretched the image with the slider, the more stars it will find.

If too few have been found, say less than 50, click Delete Stars, increase the amount of stretch, and click Find Stars again.

If far too many have been found, and a lot of nebulosity has been labelled as stars, again click Delete Stars, reduce the amount of stretch, and click Find Stars again.

If Prometheus has done a pretty good job but there are just a few bits of nebulosity or say the nucleus of a galaxy falsely labelled as stars, CTRL-RIGHT-CLICK on the false boxes, one by one, until you are happy.

Advanced:

CTRL-LEFT-CLICK will add a box over a star on the right-hand image, for example if you delete one that you didn’t mean to.

CTRL-Mouse-Wheel changes the box size. Prometheus automatically sets the box size optimally for registration, but you might want to resize manually added boxes.

Manually selecting subsequent images for stackingIn the diagram above, there are three more images to be registered and stacked with our key image. The usual situation will be that all the images in the current directory are all to be stacked. In that situation we can proceed automatically. But first let’s consider the situation where the remaining

33

Page 34: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

images to be stacked are either scattered about, or there are others we do not wish to stack. In that case we must select the remaining images to be stacked manually.

Click [Open], find the 2nd image to be added to the stack, and double click on it. The desired image is loaded into the left hand panel.

Visually checking incoming image for approximate alignmentIf the second image was taken under the same photographic run as the first, it should be already approximately registered with it. Conversely, if the second image was done on another day, you may need to roughly manually register using the mouse.

Look at the left-hand, incoming image. Check to see whether the boxes around the stars that we found in the 1st frame are more or less over the stars in the new 2nd frame. The match doesn’t have to be exact. If the stars are anywhere inside the boxes, or even just touching, that will be fine. Prometheus will automatically find a good match, and with sub-pixel accuracy, often down to a hundredth of a pixel.

For the vast majority of cases, assuming the four images were all taken on the one night in a single run, everything should be fine.

Which box is which?If registration is badly off, it can be hard to see which box on the incoming image matches which star on the outgoing image. Ctrl-Left-Click on a large box over a bright conspicuous star in the right-hand (outgoing) image. This will highlight that box, on both images, in yellow.

Advanced:Rarely, you might want to temporarily add a large box of your own over a feature on the right-hand, outgoing image, such as a galaxy, to help with seeing the correspondence between the two images. Delete it before you actually ask Prometheus to add the new image to the stack.

Manually dragging the star-boxes on the incoming imageSuppose the images were taken on different nights, and the 2nd frame is badly out of registration with the first. We see that the boxes are all well to the right and well up from where they should be, but there is not much stretch or rotation. Ctrl-Left-Drag on a box on the left hand, incoming panel (not the right panel). The entire set of alignment boxes will move as a unit. Drag the boxes at least roughly over the stars in the incoming image. Don’t bother being too accurate. If you can get a few boxes near the centre of the screen to be roughly over their stars, that will work fine, even if some of the outlying ones are a tiny bit off, due to a small amount of rotation or stretch.

Manually rotating or rescalingSuppose there is not only a shift, but also a major rotation, because the camera has been removed and replaced between images. Or you may have changed cameras, or changed the optical system (or even the binning level, although this is best handled much earlier in Mushroom) resulting in a huge change in scale.

Use Ctrl-Left-Click to drag the correct box over a star on the left-hand image. This box will represent the centre of rotation and/or rescaling. Any star will do, but for preference select a more or less

34

Page 35: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

easy, central, and conspicuous star. The box over this star is now correct, but all the other stars will be wrong.

In the Mouse control box, click on Deform. Now choose another box, preferably around a conspicuous star near the edge, and very carefully Ctrl-Left-Drag on that box. Drag the box toward the star where it should be. The entire set will rotate, stretch or shrink about the previous roughly central star. Bring the chosen box onto its star. When you have finished, go back to the Mouse control box, and click on [Drag] again.

You may want to alternate a couple times between [Drag] and [Deform].

Clearing the transformIf you’ve made a hopeless mess, click [Clear Transform], go back to [Drag] mode, and start again.

Summary so far:We have:

Chosen a key frame Used Stack To check-boxes to specify that it is to be stacked to the Luminance stack only. Placed the key frame on the luminance stack. Automatically placed a few hundred boxes over the stars in the key frame. Removed any spurious boxes over nebulosity. Chosen a second frame to be registered with the key frame. This appears in the left-hand

window. Manually dragged and/or scaled and/or rotated the boxes over the left-hand window to

match the stars. For most long runs on a single night, this is not required.

Automatically precision registering and stacking the 2nd imageThis is the step we’ve been waiting for.

In the Add control group, click [This]. Prometheus finds the exact positions of the incoming stars within the boxes, and calculates the bi-conic (quincunx) transform required to transform the incoming positions into the key frame (stacked) positions. This can take a few seconds.

Prometheus now adds the (suitably shifted, rotated, stretched, skewed, and distorted) incoming frame onto the stack, divides by the number of images now on the stack (two), and displays the result. The main change that you will see is that the stacked image will be about 30% less gritty than it was before.

You will see under the Stack results panel, there are now 2 images on the luminance stack.The next two results panels (This Frame and Cumulative) will show the amount of translation, stretch, skew, and trapezoidal distortion represented by the quincunx transform.

Accuracy of registrationThe right-most results panel will show:

The effective number of pairs of stars matched. Bright clear stars count for much more than faint vague stars. Stars that are present on the incoming image but not on the key frame, or vice versa, do not count at all.

35

Page 36: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

The goodness of fit (R-squared) of the brightness of all the pixels in all the search boxes, between incoming and stacked search-boxes. With long clean identical exposures through the same filter, this number will be above 0.9 (ie 90% goodness of fit). Values less than say 0.7 (70%) can happen when stacking images taken through very different filters, or when the images are very faint and gritty. It does not necessarily indicate a bad fit.

To calculate the accuracy of the registration, Prometheus calculates the distance between the actual measured position of each boxed incoming star and the fitted position based on the reverse quincunx transform.

The accuracy for a single star is given as the standard deviation of the mismatch in registration of an individual star. Typical values will be around a tenth of a pixel. Although only measured on the boxed stars, this means that every single star in your stacked image should be within about a tenth of a pixel of its proper place.

The accuracy for the entire image is calculated as the standard error (standard deviation divided by square root of the number of boxes), and will typically be less than a hundredth of a pixel.

Manually stacking the remaining imagesManually open the third image, manually rough pre-register if required, and, on the Add control box, click [This].

Continue with all remaining images.

If you press [This] twice for the same image, you will end up with two copies of it on the stack.

Saving Click [Save FITS]

Only the common overlap is saved. Prometheus saves only the common overlap between all the stacked images. The output image will almost always be slightly smaller than any one input image. There is no possibility to make a panorama out of partially overlapping images.

Save the unstretched, unclipped image. We have usually been working with the image stretched to show dim features, and with the background clipped to black. Before saving, it is best to reset the stretch slider to the far left (unstretched). Uncheck the background clip-to-black box (to the left of the slider).

Reason: Clipping the background to black and then saving the stack at this point will be very wasteful. Generally, we wish to save the unstretched, unclipped image, because we are going to use GoodLook to do noise filtering, gradient flattening, deconvolution, hot pixel removal, etc, before clipping the background to black and before applying a strong stretch.

Saved Image. Prometheus will save the output image as a 32 bit floating point uncompressed FITS. It can be read by many specialist astronomical programs such as FITS Liberator, CCDStack, PixInsight, and of course Mushroom, Prometheus, and GoodLook, but it cannot be read by most generalist image processing programs such as PhotoShop or Windows Photo Viewer.

36

Page 37: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Automatically stacking an entire directory of monochrome imagesSo far, for teaching purposes, we have considered manually stacking a set of images which might be either:

Scattered about in different directories Mixed in with other images that we don’t want to stack Substantially out of rough registration

Far more common is the situation where we have a possibly quite large number of images all taken during a single imaging session through the same filter. This is much, much easier.

(1) Click [Open] to find and load the key image, and stretch to show some detail as previously described.

(2) Check the Stack to control box to make sure we are going to stack to the luminance stack only. Click [Start Stack] and [Find Stars] as previously described.

(3) In the Add control box, click [Others].(4) Prometheus will now go away and register and stack all the remaining images in the

directory that have not already been stacked.(5) Save the stacked image as previously described.

Registration FailureIf you have moved the telescope during the night, or removed and replaced the camera during the night, or combined images from more than one night, then you will almost certainly get a big bold bright red ALIGN FAIL message when Prometheus reaches the first image from the second half of the run. Just roughly manually pre-align as described earlier (by CTRL-LEFT-DRAGGING the boxes on the left hand, incoming image) and then click Add [This] or Add [Others] a second time, to try again.

Sometimes, Prometheus almost gets the alignment right but not quite, and you can see that the boxes are now very close. Just clicking Add [This] to re-attempt just the current image, or Add [Others], to attempt doing not just this image but any others in the directory that have not yet been done successfully.

Rarely, the alignment fails entirely and Prometheus leaves the alignment boxes in an unrecognizable mess. In this case, click [Clear Transform] before doing the manual pre-registration.

Very rarely, it may not be possible to align two images. One may prove to be an uncalibrated image which you are attempting to align in error.

37

Page 38: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Example 2: Simple One-Shot Colour Stack

The next most obvious example is the stacking of a set of colour images from a one-shot colour camera, or a DSLR.

Select and open the key image as before. Check the Stack to [R], [G], and [B] check-boxes, but don’t check the [L] checkbox. Click Start Stack as before. Prometheus will use the colour key image to create an internal

monochrome key frame. This is because there may be some chromatic aberration in the incoming images.

Click Find Stars as before. Prometheus will inspect the monochrome key frame to put boxes around the stars.

Stack the other images as before. Each incoming image will be registered to the monochrome key frame.

What if I accidentally checked the [L] box as well?If, in the above example, you had checked the [L] checkbox as well as the [R], [G], and [B] checkboxes, you would achieve the same result, but Prometheus would do some lengthy and unnecessary internal calculations along the way, creating a luminance channel from the sums of the incoming colour channels, and then using the luminance channel to determine the final image brightness, and the colour channels to determine the colour.

Chromatic abberationSometimes you might notice that in your original colour shot, the side of every star closest to the centre might be say red, but the side radially furthest from the image centre might be blue. By creating a monochrome key frame, Prometheus will stretch or shrink the colour channels very slightly in order to substantially reduce chromatic aberration in the stacked image.

38

Page 39: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Example 3: Monochrome camera, separate filters.

This example includes both ordinary colour and narrowband.

Our separate filters might be Red, Green, and Blue filters, or they might be H-alpha, O-III, and S-II filters, etc. We are going to make a colour image out of a monochrome input.

In our example, our first frame is to be mapped to red, the next two to green, and the fourth frame to blue. But in real life, the order doesn’t matter at all.

Find and load your first frame as usual. In the diagram. On the Stack to control box, tick only the [R] checkbox, and then [Start Stack]. click [Find Stars]. Now load the second frame. Uncheck [R] and check [G]. Click Add [This]. Load the third frame, which is also to be mapped to green. Click Add [This]. Load the final frame. Uncheck [G] and check [B]. Click Add [This].

You now have a colour image.

Example 4: Luminance and RGB

In this example, we have taken a luminance frame through a monochrome camera with a luminance (or perhaps a clear) filter, and we have taken red, green, and blue frames through corresponding filters.

Following the general techniques described so far, you can see how to use the four checkboxes to stack the luminance frame to the luminance stack, and the colour frames to the colour stack.

39

Page 40: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

The output image will use the luminance frame to set brightness, and the colour frames to set colour.

Apportioning of Luminance to the Colour ChannelsSuppose a particular pixel has:

L = 30,000R = 100G = 100B = 800

The total R+G+B is Sum = 1000 counts. The output image will have:

R = L x R/Sum = 3000G = L x G/Sum = 3000B = L x B/Sum = 24000

We notice that the sum of output R+G+B is now 30,000 counts. In other words, we have apportioned the luminance signal amongst the output channels pro-rata according to the percentages of red, green, and blue in the colour stack.

Reducing background colour noise in LRGB stacksAdvanced. If the RGB values are all very small, the above approach can result in colour noise in the background. This is probably best removed using wavelet noise filtering using GoodLook, in the RGB sub-stack prior to combining with L. However, there is a checkbox labelled Reduce Colour Noise stacking LRGB. When checked, 1000 counts of grey is added to the RGB channels prior to the above calculations. This has negligible effect on bright colour, but reduces colour saturation in the darkest areas. Previous versions of Prometheus have had this feature on by default. It may be withdrawn in future versions.

Example 5: Luminance and pre-stacked RGB

Where do the images come from?This example requires that we get a bit ahead of ourselves, and assume that you know how to use GoodLook to fully finish an image.

40

Page 41: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Assume you have worked as in Example 1 to create a monochrome stack of 20 images taken through a luminance (or perhaps clear) filter. For preference you have then used GoodLook to fully process the resultant luminance shot (Answer.FIT), removing noise with wavelet noise reduction, flattening the background gradient if required, setting the dark point, deconvolving, and applying a final nonlinear stretch. You have saved the result as Luminance.TIF.

Assume you have similarly stacked 5 red images and used GoodLook to apply wavelet noise reduction, flatten the background, set the dark point, deconvolve, but not apply a final stretch. Save the result as Red.TIF.

Same with a stack of greens, and a stack of blues.

Now we proceed as in Example 3 to combine the Red.TIF, Green.TIF, and Blue.TIF as a single colour image. We use GoodLook to carefully adjust the colour balance of this image and save it as RGB.TIF.

StackingWe now wish to combine our luminance image Luminance.TIF with our combined RGB image, RGB.TIF.

Open the luminance frame. Check [L] only. Click [Start Stack], and [Find Stars]. Open the colour frame. Check [R], [G], and [B] only. Click Add [This].

The job is done.

At this point, we will want to open the grand result (as always called Answer.FIT) using GoodLook, and make a final colour balance and saturation.

41

Page 42: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Chapter 5. Processing an Image using GoodLook.

Thus far, we have seen how to:

Use GoodLook to explore images. Use Mushroom to

o Select Debayering option.o Create master bias frames and flatso Create master darkso Apply master dark and flat to a set of images to calibrate themo Use GoodLook to preview raw or calibrated images

Find an image in a directory Zoom, pan, go to individual pixels, whole frame Measure FWHM (Full Width Half Maximum) Clip black point Apply nonlinear stretch Save in various formats including FITS, TIFF, and JPEG

Use Prometheus to register and stack a set of (calibrated)o Images from a monochrome camera, all through the same filter (as monochrome)o One-shot colour images (as RGB)o Images taken through different filters, including

R, G, B (as natural colour RGB) Narrowband, eg H-alpha, O-III, S-II (as false-colour RGB)

o Luminance with RGB (as RGB)

We now wish to process the results using GoodLook. We will assume that from here on, our images are all calibrated (and if bayered one-shot colour, debayered as part of the calibration process).

Processing a monochrome imageGoodLook provides additional tools to:

Crop off unsatisfactory borders Remove hot pixels Apply wavelet noise filtering, and modest contrast enhancement Flatten the background to remove gradients Set the black point Sharpen using deconvolution Apply final stretch and save

42

Page 43: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Cropping an image Open your image in GoodLook. On the top toolbar, towards the far right, click [C]. You will see a large box with four draggable corners. Drag the corners to the area you want to crop to. You can zoom and pan the image. When you are happy, hit the Enter key.

Removing hot and cold pixels

Click [H] on the top toolbar. The hot and cold pixel remover dialogue appears. Click [Go]. The hot pixels are removed.

Hot pixels are ones that are stuck on full, or over-reading so badly that they are effectively broken. Cold pixels are ones that are stuck on black, or under-reading so badly that they are effectively broken. The vast majority are removed automatically during calibration. Sometimes a few remain. The best time to remove them is immediately after calibration, before stacking, because registration can smear them about into a “snail trail”.

Algorithm:If a pixel exceeds at least seven of its neighbours by a specified threshold (default 1000 counts), in any channel (or in a channel that you specify), it is replaced with the mean of its eight neighbours. In the above example (actually an uncalibrated image), some 11384 hot pixels were found. Most of these would have been removed by calibration.

Channel If your image is coloured and the hot pixels are conspicuously in just the blue channel, select (B). The default is (Any) channel. This control has no effect on monochrome images.

43

Page 44: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Threshold Accidentally removing pixels that aren’t really hot usually has little effect on the image, but for maximum safety, set the threshold to the highest value that does the job. The default threshold of 1000 works pretty well for most calibrated unstacked images.

Manual Spot RemovalPhilosophically, this comes close to finger-painting, and should be done sparingly. If a hot pixel has been blurred by Debayering or by Stacking, automatic removal will not work, as it will look a bit like a small sharp-edged star.

Such hot spots are often conspicuous in colour images because they are of a single intensely saturated colour. For safety, select just the affected colour channel.

Place a box around it with Ctrl-Left-Click. Resize with Ctrl-Mouse-Wheel. Make the box a bit over twice the size of the hot spot. Then click [Zap]. The middle half of the box (ie ¼ of the area) will be replaced radially inward with pixels from the rest of the box.

UndoClick [Undo] to reverse the effect of the most recent [Go] or [Zap]. There is only one level of undo. To return all the way to the original file, losing all changes so far, click [Reload] on the top toolbar.

44

Page 45: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Wavelet noise filtering

Brief Theory

Wavelet TransformThe above figure shows a wavelet noise transform. The original image is a small part of NGC 1365. The images in the top row to the right of the original show the effects of repeated blurring at ever larger scales. (Tech note: The blurring is done using a 5 element a-trous kernel)

The images in the bottom row shows the successive differences between the images in the top row. For example, Difference 8x8 is Blurred image 4x4 – Blurred image 8x8.

The difference images show all the information at the specified level of detail, no larger, no smaller. In any properly sampled astronomical image, the 1x1 difference is almost entirely noise, with some contribution from stars. The remaining difference images show ever larger features.

Strictly, the difference images have a mean value of zero. However, to show them to you, they are represented with mid-grey as zero.

Reverse wavelet transform.If we add the five difference images to the last blurred image, we get the original image back again.

Structure vs. noiseGenuine structure at a given image scale (for example 2x2) will show in the corresponding difference image as values very far from zero. Therefore, pixels in any given difference image with a value close to zero simply represent noise at that image scale.

Measuring the noiseWith the exception of a handful of stars, the 1x1 difference is almost entirely due to noise. To measure the noise, GoodLook rejects the brightest 25% of pixels in the 1x1 difference, as being likely due to stars, and takes the standard deviation 1x1 of the remaining pixels.

45

Page 46: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Noise thresholdsWhat do we mean by close to zero? By default, GoodLook regards anything in the 1x1 difference image within +/- 1.8 1x1 as being noise, and anything beyond that as being structure. Noise thresholds for the other image scales are exponentially less:

Image scale Noise threshold1x1 1.80 1x1

2x2 0.45 1x1

4x4 0.18 1x1

8x8 0.09 1x1

16x16 0.05 1x1

These values are chosen empirically to work well.

Noise filteringTo remove the noise from a particular difference image, GoodLook simply subtracts the noise threshold from any positive values, and add the noise threshold to any negative values. This does not “threshold” the noise, but rather “folds the noise out”, which produces less artefact. Once we have done this, we simply apply a reverse wavelet transform to obtain the filtered image. Wavelet noise filtering using this method can work astonishingly well.

It is generally far superior to for example using a Gaussian blur, because the noise in the image exists at every scale. A fine Gaussian blur removes genuine fine structure but leaves medium and coarse noise. A broader Gaussian blur removes both fine and medium structure, but leaves the coarsest noise, and so on.

Applying the noise filter

Click on [Filter] on the bottom taskbar. The set of controls shown above pops up. To apply the default filter:

Click on [1: Transform]. For a large colour image, the transform can take ten or twenty seconds. A progress bar (or bars, for RGB colour image) will indicate progress.

46

Page 47: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Click on [2: Measure Noise]. The RMS noise 1x1 in the 1x1 difference image is written to the row of four boxes immediately below. Here the noise is 461 counts. (The other 3 boxes are for colour images).

Click on [3: Apply]. This “folds out” the specified amount of noise from each of the 5 difference images, and then applies the reverse transform to produce the finished image. Although much faster than the forward transform, still takes several seconds. Again, a progress bar (or bars) indicates progress.

The above image shows our section of NGC 1365 before and after applying wavelet noise reduction at the default settings. Look closely at the dark background. The background is far less gritty, but there is no change at all in the FWHM of the stars.

Overall degree of filteringDragging the bottom left slider, on the row marked All and column labelled “Filter Noise”, reduces or increases the amount of filtering, from none at all up to double the default.

Gritty is not sharp; smooth is not blurryA failing of the human visual system is that we tend to mistake a gritty background for a sharp image. The wavelet filter does not change the FWHM of the stars, and it does not blur away fine detail. Rather it reduces the strength of doubtful detail. The default settings will remove most noise, but will slightly reduce the strength of the finest faintest genuine features.

Finding an optimum settingExperiment with reducing the overall strength of filtering until the noise is just acceptable, or until features that you know for other reasons to be real are starting to disappear. If one’s goal is artistic or popular rather than scientific, one might prefer a less strong degree of filtering.

Much faster to experiment on a cropWhen finding the optimum position for the overall degree of noise filtering slider, it is best to work on a representative crop of the image, say 300x300 pixels or so. Take a crop. There is no need to save the cropped image. Now click Transform, then Measure Noise, then Apply. Now adjust the overall degree of noise filtering. When you are happy, click Reload on the top toolbar to reload the original uncropped image. Now click only Transform and Apply. Do not click Measure Noise or your settings may need re-tweaking.

47

Page 48: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Overall degree of sharpeningAfter subtracting the noise from the difference images, we are left with noise-free structure only. We can now increase the contrast of the image without increasing the noise by simply multiplying the de-noised difference images by a small amount, say 1.2 to 1.5. In deep sky images, only a very small amount of sharpening can be done this way before the image starts to posterize, and to develop alarming Panda Eyes around stars, shock fronts, etc.

“Folding out” the noise, as opposed to just thresholding the difference images, results in a very slight loss of contrast due to weakening of genuine features. GoodLook applies a very small compensatory increase in contrast.

The bottom right slider (row marked All, column marked Sharpen) adjusts the overall amount of this compensatory sharpening.

When finding the optimum position for the overall degree of sharpening slider, it is again best to work on a representative crop of the image.

48

Page 49: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Advanced controlsThis section can be safely skipped on first reading. The intention is that apart from the overall degree of noise filtering and possibly the overall degree of sharpening (contrast enhancement of the noise-free image), already described, the other controls do not need to be touched to produce a pretty fair image.

The main use of the remaining controls is to help understand the wavelet transform, by generating and displaying the various filtered images and difference images.

The other use is for very advanced micro-adjustment of the filters.

In either case, since the wavelet transform is pretty slow on a large image, it is best to work on a representative crop, say 300x300 pixels perhaps, in order to get immediate response.

The remaining five sliders in the column marked Filter Noise adjust the degree of noise removal from the five individual difference images. The only reason for using them would be if the distribution of noise in your image was statistically very unusual.

The remaining five sliders in the column marked Sharpen adjust the degree of contrast enhancement in the individual difference images. Notice at no enhancement is applied to the 1x1 difference, as image scale is almost entirely noise.

The five sets of three radio buttons,o If set to the left, turn off filtering for that difference image.o If set in the centre, apply filtering for that difference image.o If set to the right, set that difference image to zero.

The checkbox marked de-Panda prevents the sharpening process from placing black rings around stars and shock fronts. It is checked by default. Uncheck it can enhance some forms of dust detail, but will result in panda eyes around other features.

To see a particular difference image:o Click the button marked >> to set all difference images to zero. You will now see only

the 16x16 filtered (Residual) image.o Uncheck the Residual checkbox. You will now see a uniform featureless grey.o Check the right-most of the three radio buttons only on the row whose difference

image you wish to see. To see the 1x1 filtered image

o Click the right-most of three radio buttons on the 1x1 row.o Click the left-most of three radio buttons on all subsequent rows.o Check the Residual checkbox.

To now see the 2x2 filtered image, then 4x4 filtered image, then 8x8, then 16x16:o As above, but also check the right-most button on the subsequent rows, one by one

until they are all checked. To custom adjust the noise in say the 2x2 difference image:

o Click the button marked >> to set all difference images to zero.o Set the button for the 2x2 image to the middle position of three. This shows the

filtered, sharpened (contrast enhanced) version of the 2x2 difference image.o Check or uncheck the Residual checkbox as you see fit.

49

Page 50: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

o Adjust the Filter Noise slider for the 2x2 difference image only.

50

Page 51: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Background gradient removal

The above image has a linear gradient in the background, from brighter at bottom left to darker at top right.

CausesHorizontal, vertical, or diagonal background gradients can be due to:

The moon Light pollution (eg distant cities, local lights) Airglow (which is brightest just above the horizon)

A radial gradient is most likely due to inadequately done flats to correct for vignetting.

Quite complex gradients can be due to

inadequately done flats to correct for shadowing by off-axis guiders etc stray light bouncing off internal surfaces light leaks on camera seals

CureBy far the best cure is to find the cause and fix it, e.g. extinguishing stray lights, use aluminium tape to fix light leaks, work on a moonless night, building a better flat screen and doing more meticulous flats, flocking or baffling internal reflective surfaces, but there will always be very subtle stray gradients whose cause is indeterminate.

Removal Before attempting gradient removal, first use (gentle) wavelet noise removal to get a

reasonably grit-free background. Click on [B] on the top toolbar. The background gradient removal dialog appears. GoodLook

places some 1000 boxes, each individually draggable with Ctrl-Left-Drag, scaleable with Ctrl-

51

Page 52: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Mouse-Wheel, deletable with Ctrl-Right-Click. New boxes can be created with Ctrl-Left-Click.

Measuring evenness of the backgroundAfter placing the boxes, the median brightness of the boxes is calculated as a measure of background brightness within the box independent of small stars. The RMS error of the median is displayed. A large value indicates that the background differs from box to box. To recalculate the RMS error, click [Measure] at any time.

Auto-culling of boxes Click [Cull] once or twice. Boxes more than 2.5 standard deviations above average are automatically deleted, as probably being over galaxies, nebulosity, or bright stars.

Removing the gradientSelect Order 1 from the Order radio-group. A first-order polynomial in x and y with cross-product,

Median = k0 + k1 x + k2 y + k3 xy

is fitted to the gradient using multiple linear regression. Then click [Apply] The gradient is then removed, and the RMS error recalculated. A very large drop in RMS error indicates successful gradient removal.

Usually it is necessary to do a first cull to get rid of boxes over strong features, click [Apply] to get a rough fit to the background gradient, and then do a second [Cull] and [Apply] to fine-tune.

To see the improved image without the boxes, check the [Hide] checkbox. Uncheck to reveal them again.

Clicking [Delete], or just closing the Gradient Removal dialogue box, permanently removes all the boxes, and clicking [Auto] (or reopening the dialogue box) replaces the full set.

52

Page 53: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Removing more complex gradientsSetting Order to 2, 4, or 8 will remove progressively more complex gradients. Order 8 fits 64 terms (all powers of x and y up to 8, plus cross-products) using multiple linear regression. This takes several seconds to do the fitting, and even longer to remove the gradient.

Use the lowest order that does the job, because high orders may distort genuine subtle nebulosity. If you see unexplained dark regions in the background, either cull away more around bright features, or reduce the order. However, be assured that gradient removal should not actually lose features. It will never remove fine detail such as shock fronts, no matter how faint.

Once you have satisfactorily removed the gradient, click [*] on the top toolbar to remove the boxes, and close the gradient removal window.

Monitors and apparent gradientsA trap: Most home-office monitors produce a strong apparent gradient. The Samsung 2443 and most laptop screens for example appear darker at the top and brighter at the bottom. This effect is entirely due to the viewing angle. Look down from above and everything will look much brighter. (This “hardware gamma” can even be useful). Tilt the screen back, so you are looking up from below, and everything will appear much darker. GoodLook will not, and should not, compensate for defects in the monitor.

Setting the black pointBy now we have, as and if required:

Calibrated and stacked all images through a particular filter. Used wavelet noise filtering to remove background grittiness Used the gradient removal tool

When viewing, and especially when using the gradient removal tool, it is useful to use a large nonlinear on-screen stretch and/or clip the on-screen black-point (using the slider and check-box at the left of the top toolbar). This only affects the display, not the underlying image.

Now is the time to formally clip the black-point in the underlying image.

Uncheck black-point clipping and set the stretch slider to the far left (unstretched) Recalculate the image histograms, either by:

o Saving your work so far to a new file and reopening it, oro Clicking [Hold] on the top toolbar. This will recalculate the histograms.

Check black-point clipping again. The background should go very black, without losing any hint of real features.

Removing satellite trailsIdeally, this should be done on individual calibrated but not stacked images. However, some fluency with GoodLook is required, so we have left it till now.

53

Page 54: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Start by rotating the image with [L] or [R] on the bottom toolbar, so that the satellite passes more from top to bottom than left to right. (You can rotate back again when you are done). Make the satellite trail more visible using the top toolbar.

Place a very small box on the satellite trail, using Ctrl-Left-Click. Place another very small box further along the trail. Click [B] to open the background gradient removal dialogue box. At the bottom of the dialogue box, under Satellite Trails, click [Zap].

At this point, GoodLook iteratively estimates the wriggling path and brightness profile of the satellite trail, and then removes that wriggling profile from the image. GoodLook does not simply clone background material over the trail. Thus small stars and galaxies are preserved where they are crossed by the satellite.

You have only removed the trail between your two boxes. Use the same process to remove the rest of the trail. If the background varies greatly in brightness, for example due to strong nebulosity or a large intervening galaxy, either (a) work in small segments as described above, or (b) experiment with placing as string of five or six little boxes along the trail. The [Undo] button will undo just the most recent [Zap] if things go wrong.

GoodLook will not remove every last hint of the satellite, but will greatly improve things. If the image is part of a stack of say 4 or more, the faint residue will not show.

54

Page 55: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Deconvolution

TheoryThe image of a star should be a mathematical point. The jet stream, the hot air in front of your mirror, diffraction, imperfections in your optics and focus, and imperfections in guiding and tracking will tend to smear a star out. The measure of the amount of smearing is the FWHM, or full-width, half-maximum.

Point spread function.The measure of the exact nature of the smearing is the point spread function, or PSF. This is just the image of a non-burned-out star, normalized to have a total brightness of exactly 1.0.

The whole image, including galaxies, dust lanes, shock fronts, every single pixel in the image, not just the stars, is smeared out by the point spread function. This process of blurring is called convolution.

God’s Own Photo Convolve with PSF Your Photo

Q: If we were able to take a guess at “God’s Own Photo”, how would we know if we were right?A: Convolve the guess with the PSF, and see if we get the photo we actually took.

Correct guess Convolve with PSF Your photo exactlyNear guess Convolve with PSF Almost your photo

--------------------------Slight difference

Deconvolution is the process of repeatedly making a guess, finding a slight difference, and using that difference to make a better guess.

Sadly, there are actually an infinite number of guesses, which when convolved with the PSF, yield exactly the photo you actually took. (Analogy: Fred was born at midnight. The time now is 10:23pm. How old is Fred? He could be 53 years, 17 days, 10 hours and 23 minutes, or a whole bunch of other times. Better analogy: What are the coordinates in millimetres of a sand grain on the 19 th square on a chess board. Best analogy: What, exactly, is a Good Life ?)

There are at least four kinds of guessing wrong: guesses which when convolved with the PSF yield the photo as taken, but which are not the One True Photo.

Panda Eyes Noise Stringy bits joining stars Sequin stars

Panda EyesDeconvolution, like most forms of sharpening, puts black circles (Panda Eyes) around stars. Doing a very strong nonlinear stretch before deconvolving tends to reduce Panda Eyes but introduces other

55

Page 56: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

problems. The usual solution is to simply check a box that says that the result (final guess) should never at any pixel be darker than the photo-as-taken. The problem with this is that while shock fronts can get brighter, it is impossible for dust lanes to get darker. Consequently, if you really want to see the dust lanes in the Sombrero, you might have to put up with Panda Eyes.

NoiseDeconvolution always amplifies noise. The less noise you have in your image, the better it will deconvolve. Cool the camera. Do really good clean darks (and flats). Take really long exposures. Take lots of them. Work at a dark site. But once you’ve done all that and there’s still noise, use gentle wavelet noise filtering before deconvolving, and if required after deconvolving. Don’t use Van Cittert’s deconvolution, which is atrociously noisy.

Stringy bitsDeconvolution involves automated repeated guessing. Each guess is called an iteration, or a pass. Typically we might do five, ten, twenty, perhaps rarely a hundred iterations or passes. But each amplifies the noise, and each tends to produce artifacts such as stringy bits joining stars. When deciding on how many iterations to do, don’t get seduced by the goal of a tiny FWHM. Stop before you get stringy bits.

Sequin starsIf a star has gently fading edges, deconvolution can sharpen it. Really bad seeing tends to produce disc-like stars (sequins). Deconvolution can do little to help with sequin stars. In fact, it tends to cause them. Stop before your stars look like Liberace.

GoodLook provides four different kinds of deconvolution: Van Cittert. Fast, rough and ready, good for moon and planets but very noisy with deep sky

objects. Included only because it is easy. One-Step Gradient. Much less noisy. Possibly best for dust lanes (especially with Panda Eye

prevention turned off). Richardson-Lucy. Absolutely the best for stars. Assumes Poisson noise distribution, as found

in an uncalibrated unstacked image. Mueller. Assumes normal noise distribution, as found in a deep stack.

If I were to choose one, it would be Richardson-Lucy, despite the statistics not being quite right, it seems to make a good guess most of the time.

Out-of-round starsDeconvolution with GoodLook can improve out-of-round stars due to very minor tracking errors, providing they’re not too hard-edged, and are all out-of-round in the same way. It won’t help with field rotation or coma in the corners for example.

Before thinking about deconvolution

Before attempting deconvolution, it is generally best to:

Take a long enough exposure but don’t burn out. Deconvolution works best on long, high signal-to-noise exposures. It cannot recover burned out features.

Calibrate images.

56

Page 57: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Remove Satellite trails. Align and stack all images taken through the same filter set Do gentle wavelet noise reduction. Deconvolution tends to exaggerate noise. Remove any gradients in the background Set the black point.

Selecting stars for calculating the Point Spread FunctionTurn off on-screen nonlinear stretch. This is because we want the brightest non-burned out stars that we can find. Zoom in to actual pixels (eg double-click somewhere promising).

Use Ctrl-Left-Click to put a little box around a non-burned-out star. The centre must be less than 65535 counts. Use the Ctrl-Mouse-Wheel to make the first box just a bit bigger than the star.

(Other useful commands: use Ctrl-Drag to drag the box, or better, Ctrl-Right-Click to delete the box and Ctrl-Left-Click to create a new one elsewhere).

Click [FWHM] on the top toolbar to measure the FWHM of the star. On my system I get a value of around 4 to 6 pixels, which corresponds to 2 to 3 seconds of arc. When you click [FWHM] GoodLook will resize the box correctly and exactly re-centre the box over the star.

Put boxes around another 5, 10, perhaps 20 stars. Click [FWHM] from time to time. A really sudden upward jump means you picked a dodgy star. Perhaps it is a galaxy, or a double. Delete it.

Try to pick stars in the black background, not over bright nebulosity.

When you are happy, click [D] on the top toolbar. This will bring up the deconvolution dialog box:

In the above partial screen capture, there are boxes around five suitable stars. The bright star at 2 o’clock is too bright. The thing at far right is a small galaxy and is not suitable.

57

Page 58: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Preparing to deconvolveOn the deconvolution dialogue box, click [Set]. This will create the point spread function from the selected stars (very fast), and then convolve it with the photo as taken, which will take ten or twenty seconds, longer for colour. Under the [Deconvolve] button are four progress bars, one for monochrome, and three for colour.

When the progress bar (or bars) have completed, choose which of the four forms of deconvolution you wish to use. Unless you have reason to do otherwise, choose Richardson-Lucy.

Now click [Deconvolve]. GoodLook will commence twenty deconvolution rounds (iterations, passes). The number of the current pass (from 1 to 20) will be displayed on the button. Watch the following:

The FWHM. Reducing the initial value by say 20% will produce a well-worth-while 20% reduction in the size of the non-burned-out stars, and therefore a 40% increase in their apparent brightness. Thus reducing the FWHM from say 6 to 4 would be an excellent achievement. There is no point reducing the FWHM below say 3.5 pixels.

The grittiness of the background. The longer you deconvolve, the worse it gets. Artefacts such as stringy stuff between stars, or a generally “glassy”, “over-cooked” look.

To stop the deconvolution at any point, for example after 5 or 10 rounds, just click the button again. If you decide you’ve stopped too early, you can restart where you left off by clicking the [Deconvolve] button a third time, and so on. The iteration counter will start again at 1.

Final Finishing TouchesIn broad outline, by now, we have used:

Mushroom to prepare and apply master darks and flats to our images GoodLook to remove satellite trails (and perhaps to scrap any really dodgy images). Prometheus to register and stack all our images.

o If we are using a one-shot camera or a DSLR, we have stacked all our images into a single frame.

o If we are using separate Red, Green, and Blue filters, we could stack the whole lot into a single RGB, but to gain more control, we’ve probably stacked them as three quite separate exercises into three quite separate stacked images.

o If we’re using separate luminance, red, green, and blue filters, we could again have stacked the whole lot into a single RGB, or perhaps into a luminance image and an RGB image, but we’ve more probably stacked them into four separate images.

GoodLook to:o Gently wavelet noise filtero Remove background gradients if relevanto Set the black pointo Only now, deconvolve, but not to the point of generating artefact in the nebulosity

Now, if we are using separate RGB Use Prometheus to combine the red, green, and blue into a single RGB Use GoodLook to:

58

Page 59: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

o Adjust colour balance and saturation. Don’t stretch just yet if we are going to combine with luminance.

If we are using a separate luminance set,

Use GoodLook to stretch the Luminance frame to produce a good final monochrome image that we would be happy with in its’ own right.

Use Prometheus to combine the luminance data and the colour data to produce an RGB image.

In GoodLook, apply final nonlinear stretch and perhaps a final tweak of colour balance and saturation.

If, instead of RGB, we are working with say H-alpha, O-III, and S-II, I prefer to:

Fully process each set as a finished, stretched, image in its own right. Use Prometheus to combine into a final RGB image. Use GoodLook to adjust colour balance.

Colour Balance The three sliders with red, green, and blue knobs on the top row adjust colour balance. Moving a knob to the far right doubles the intensity of the indicated colour. On an already

strongly stretched image, this will burn out the highlights. Moving to far left reduces that colour channel to zero. To avoid burn-out, it may be

necessary to reduce red and green rather than increase blue for example. The slider with the knob marked [S] adjusts saturation. Moving toward the right removes

grey. Moving toward the left adds grey. Pressing Enter sets the sliders to their neutral point.

59

Page 60: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Automatic Colour Balance

The image on the left is a deep stack of M83 as taken through R, G, and B filters. The image on the right shows the same image after automatic colour balance.

Filter, remove background gradients, and set black point as described previously. Without dragging, double-click on the button of the green colour adjustment slider. The root mean square (RMS) colour is adjusted to neutral. The RMS colour pays most

attention to stars and bright features, largely ignoring the background.

To use only a particular region or regions of the image (eg part of the background star field, or a galaxy) as the colour reference, place one or more boxes over it using Ctrl-Left-Click. Set box size with Ctrl-Mouse-Wheel. Delete with Ctrl-Right-Click. Delete all with [*] on the top toolbar.

If you place no boxes, the whole image is used. If you do place boxes, they are used as the reference, but the entire image is balanced.

Monitor and printer limitations A white star will always look brighter than a fully saturated coloured star. For example a fully

saturated maximum blue will show on the screen as 255 counts. Maximum white is 255 blue plus 255 red plus 255 green, and will therefore show as three times as bright. Hence in general we let the centres of very bright stars burn out to white.

Many laptop monitors off-the-shelf have a strong colour cast. Consider hardware calibrating your monitor with for example a Spyder ™. This has two purposes:

o Your on-screen images will look roughly how they will look on someone else’s calibrated screen. Beware of friends with uncalibrated screens who give advice.

o If you send your images off to be printed on a calibrated printer, they will also look right when printed.

Printers work by subtracting light. Monitors work by producing light. An image will almost always look more brilliant and vibrant on the screen in a darkened room, and darker and less

60

Page 61: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

colourful when printed, even when both the printer and the monitor are calibrated. A good monitor is the better device. Printers especially have trouble with near-blacks. You may have to adjust the dark parts of your on-screen image to be just a little bit brighter than looks best on-screen in order to print well. (Seek expert advice on this point).

Calibration of multiple screens Devices such as the Spyder work by loading a colour calibration profile into the video card. If you have two screens, for example a laptop screen and an external screen (or a projector),

you can use the Spyder to produce calibration profile for each screen (or projector). However, since in general you have only one video card, only one of the screens can be in

calibration at any one time. Thus if you had a laptop screen which uncalibrated tended to be blue, and a projector which uncalibrated tended to be orange, if you loaded the calibration curve for the projector, the laptop screen would look even more blue than usual. Conversely, if you loaded the calibration curve for the laptop screen, the projector would loo even more orange than usual.

Rotating the palette On the top toolbar, there is a button marked [P]. This button rotates the red, green, and blue

channels in an image. This is especially useful with narrowband images, where the assignment of colours to for

example H-alpha, O-III, and S-II is quite arbitrary. The popular “Hubble” palette assigns colours in spectral order of the underlying filters. Thus S-II is mapped to red, H-alpha to green, and O-III to blue. If you click [P] once, it will rotate the mapping by one colour, so that S-II becomes blue. Click again and S-II becomes green. A third click brings you back to the beginning.

Rotating the palette can completely change the emotional response to an image, and allow you to see it “in a new light”.

Colour blindness Eight percent of males are colour-blind. Their red-receptors are only partially effective. One

in a thousand (such as myself) has no red receptors at all, so that purple and blue are the same colour; pink grey and turquoise are the same colour; lime and yellow are the same; mid-green brown and orange are the same; pure red and dark green are the same. If you are colourblind you see red at about 40% strength with your green receptors.

If you are colour-blind, you may have great difficulty seeing S-II in the Hubble palette, or seeing the red glow of star-forming regions in galaxies. Rotating the palette once will display these in blue, and a second rotation will display them in green.

You may also find it helpful to explore S-II (mapped to red) in narrowband images by using the colour sliders to temporarily turn off the green channel.

61

Page 62: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Saving as a JPEG for email Now it is time to save our image as a JPEG for emailing to colleagues. Press [J] on the bottom

toolbar. GoodLook will save with JPEG compression quality set to 90%. For our 11 megapixel colour

images from the 20 inch PlaneWave, this will give images typically in the range 0.5 to 1.5 megabytes depending on the amount of detail in the photo itself. There is utterly negligible loss of image quality at this compression level.

Warning to those using other packages: using a still higher quality will not improve an intrinsically unexceptional photo, but will make for a large file, take a long time to download, and inflame the recipient.

Pour the coffee and cognac. Ring the bells. We are done.

Secret Easter EggDouble clicking on the Hot Pixel icon [H] on the top toolbar will bring up a window for the measurement of RMS noise. Place zero or more boxes in the usual way on an area of background where you wish to measure the noise. Click [Update].

The data automatically update as you move from image to image, or after using the noise filter.

Notice that the noise calculated by the wavelet noise filter is for the entire image after removing any large-scale information, and is a true measure of underlying noise. The Easter Egg is only useful over a sufficiently small hand-chosen region of background where there is no image structure, but it is much faster.

62

Page 63: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

63

Page 64: Hardware - The Astronomical Society Suite.docx  · Web viewgroup of controls, you will see a panel with the word . ... What are the coordinates in millimetres of a sand grain on

Copying or giving away the softwareDue to the experimental, preliminary, and unstable nature of GoodLook, Mushroom, and Prometheus, support and version control need to be kept under wraps in order to avoid subsequent muddying of the waters for a more stable version. Therefore, please do not give out copies of GoodLook, Prometheus, or Mushroom without permission from me.

Copyright Mike Berthon-Jones 2013. Mike Berthon-Jones asserts his moral and legal right to be identified as the author of Mushroom, Prometheus, and GoodLook, and of this manual. You may not sell GoodLook, Mushroom, or Prometheus, or pass it off as your own work.

64