Gradient Removal for MaxIm DL 3 and CCDSoft v5
from New Astronomy Press


This is a plug-in that removes linear and radial gradients from CCD images.

About The Gradient Removal Plug-In

Most gradient removal tools try to fix gradients by analyzing the background of the image. Many images don't have adequate backgrounds area for this (nebulae, for example), and many have more than one gradient. This plug-in takes a different approach. Gradients are caused by light, and light obeys the laws of physics very nicely. The plug-in uses this simple fact to clean out gradients more effectively.

Order online:
Gradient Removal - $39.95
Supports:
  • CCDSoft v5.0.72 or later
  • Maxim DL 3.07 or later
When you order online, you will receive an email with a password to unlock the 30-day trial version. Current version: 2.2.4.

The plug-in takes your input on the strength and direction of the gradient, and models the natural light fall-off across a virtual image space in order to calculate the correct removal at each pixel. The virtual space is larger than your image, and this allows the plug-in to calculate the correct results right into the corners of the image.

To make the clean-up process as friendly as possible, you can try some settings, undo them if they aren't perfect, and then try again. The human eye is an excellent device for measuring gradients!

BONUS: I've included an image despeckler into the plug-in. You can use it to remove hot and cold pixels that remain after image reduction/calibration. Instructions on using it are included below.

New features/fixes in version 2.2.1:

  • Fixed obscure bug that caused error if mouse cursor was hovering near the spot where the image preview would appear
  • Changed scope of average/median calculation from a 3x3 grid to a 7x7 grid to give more meaningful results.

The Gradient Removal Plug-in is a single plug-in file that works for both MaxIm DL and CCDSoft. You must have at least version 3.07 of MaxIm or version 5.0.72 of CCDSoft, to use this plug-in. During installation, the plug-in copies itself to the appropriate folders for both programs.

Tips for using the Gradient Removal Plug-in:

  • Linear gradients are typically caused by light pollution, and will not be removed by flats.
  • There may be more than one linear gradient. Most locations have more than a single source of light pollution - work on  the most obvious gradient first. That makes any other gradients easier to see.
  • You can only remove one gradient at a time. If you make a mistake or don't like the results, use the Undo Last button to try again.
  • Measure the brightness levels of a gradient to get an idea of how strong it is. Enter your best guess at the amount of gradient, then click the Apply button. If your adjustment is too little, click the Undo Last button and try a larger number. MaxIm DL's Information window has an Aperture mode; it will tell you the average brightness value at the cursor position. For CCDSoft, you'll need to determine the average brightness yourself.
  • The radial removal option is useful if you do not have a flat for your image, or if your flat wasn't quite perfect.
  • You can also use the plug-in to correct gradients in your master flats. Use trial and error to find out how much gradient to remove. The amount you remove from a flat is often much larger than what you deal with in a single image. In one example, I had to remove a 500-ADU gradient from the flat to clean up a 25-ADU gradient the flat was leaving in the image. Experiment!
  • Imaging in color with the moon up can be tough because of the strong gradients. Use this plug-in to remove gradients from R, G, and B images before you combine them. The ability to be very precise about gradient removal pays a big dividend when working with color.

How to use the Gradient Removal Plug-in

  • Gradient amount - The maximum brightness level of the gradient. For example, if the left edge of the gradient is at 891 ADU, and the right edge is at 750, then the amount of the gradient is 891-750 = 141. That's the number you enter in this box. If you are dealing with a radial gradient, then measure the brightness of the center of the hot spot, and the brightness of a corner, to determine the amount of the gradient.
  • Gradient angle - Applies only to linear gradients. This specifies the direction of the gradient. An angle of zero corresponds to the 9 o'clock position on a clock, with the gradient being brightest at that position. In other words, if a gradient is bright on the left, and dim on the right, and runs purely horizontal, then the gradient angle would be zero. Angle values increase clockwise. 90 degrees would be a gradient that is brightest at the top (12 o'clock position), and so on.
  • Intensity - The range of legal values is 0.5 to 5. Smaller numbers result in a smaller area with maximum gradient removal, with a rapid falloff in correction as you move away from the zone of maximum removal. Larger number result in a larger area of maximum gradient removal, with a more gradual falloff in  correction as you move away from the zone of maximum removal. For radial gradients, large numbers give you a larger hot spot removal. For linear gradients, larger numbers give you more aggressive removal in the bright portion, and less in the dim portion.
  • Linear/Radial - You can use this plug-in to remove both linear and radial gradients. Linear gradients are just what they sound like: gradients that increase in a straight line from one part of the image to another. Click the Linear radio button to work on this type of gradient. Radial gradients typically have a bright spot in the center, and darker sides or corners. Click the Radial radio button to clean up this type of gradient.
  • Radial Origin - The X and Y values are the coordinates of the center of the hot spot. You can use your camera control program to find the coordinates of the hot spot. Pass your mouse cursor over the image and note the X (horizontal) and Y (vertical) coordinates of any point in the image. The origin (0,0) is assumed to be at the upper left of the image. Disabled for linear gradient removal.
  • Close - Closes the plug-in. Any changes that are already visible in the image become permanent.
  • Apply - Does a gradient removal with the current settings. You'll see an indication of progress in the "Status" area. When the gradient removal is done, you will see the result in the image.
  • Undo Last - Undoes the last gradient removed by clicking the Apply button.
  • Undo All - Undoes all gradient removals since you opened the plug-in.

Despeckler Features

Despeckling is a calculation-intensive approach to removing hot and cold pixels. Please be patient while it is working!

  • Sigma - Legal values are 1 through 3. The default value is 2.4, and will give balanced cleanup for most images. Low numbers make the despeckling more aggressive. Too aggressive of a setting can result in removal of dim stars (especially on binned images). Sigma defines the number of standard deviations by which the pixel must vary from its neighbors before it is fixed. A small number means that the pixel will be fixed more readily, and a large number means that the pixel must vary considerably before it will be fixed.
  • Strength - Legal values are 100 through 5000. Lower numbers are more aggressive. The strength setting determines how much a pixel must vary from the average background value before it is a candidate for fixing. Strength is the first test a pixel must pass; if it passes the strength test, then the Sigma test is applied. Strength measures the pixel against global conditions; Sigma measures the pixel against local conditions in its neighborhood.
  • Despeckle button - Click to apply despeckling.

Note: The Undo Last and Undo All buttons will undo despeckling. The Undo Last button will only undo the most recent operation, so if you despeckle and then remove a gradient, on the gradient removal will be undone.