CCD cameras do not have viewfinders, so it is necessary to focus using the sensor itself. The problem with this is the image on the computer screen often updates far too slowly for "real time" focusing adjustments. At low light levels, the exposure time required may be too long. Even where a bright target is available, the digitization circuits are often deliberately slow to give the best low-noise performance; in other cases, simply transferring a large volume of data to the computer takes some time.
When the screen updates only a few times a minute, it becomes extremely difficult to tell which way to adjust the focus. Two techniques can be used to speed up the update rate. The first – binning – combines together four or more pixels into one ”super-pixel”, producing a smaller, brighter image that can be downloaded faster. This is great for coarse focus, but the loss of resolution makes fine focus difficult. The second method – subframing – requires you to pick a small area of the array and only read out that region. This also speeds up the download rate, but reduces the area available. Despite their disadvantages, these techniques are essential for efficient focusing.
Since all stars are effectively at infinity, you can focus on a bright star prior to moving to your fainter target. Pick a star that is high in the sky to minimize atmospheric turbulence ("seeing"). Also pick a star that allows an exposure time of roughly 1 second; this provides good signal while minimizing blur caused by seeing. For many instruments a roughly 5th magnitude star is satisfactory.
Another problem is the color Bayer array in "one shot color" cameras. It is impossible to accurately focus, or make focus measurements, on a raw image. You have to either convert the image to color first, or use binning to remove the Bayer array.
MaxIm DL provides tools for manual focusing. You can view the quality of focus both graphically and numerically. Of particular interest is the Half-Flux Diameter and Full-Width Half Maximum measurements, which tell you the diameter of a star image. The focus is simply adjusted for the minimum star size.
To speed up the focusing process, it is helpful if the focus is approximately correct before you start. A useful technique is to parfocalize an eyepiece with the camera. First carefully focus the camera using the standard techniques. Next, without changing the focus settings on the telescope, remove the camera and replace it with an eyepiece. Depending on the eyepiece, it may be necessary to use an extension tube. Without adjusting the focus setting, slide the eyepiece in and out until focus is achieved. Now mark the point of best focus on the eyepiece barrel. The best way is to make a small metal ring with setscrews that can be locked in place. The next time you need to focus, use this special eyepiece first, and visually adjust the focus to the approximately correct position. Now only a small refinement is necessary.
In the past, manual focusing was the most tedious and time-consuming part of imaging sessions. However, this has changed with the advent of reliable autofocus techniques. The built-in SharpStar™ autofocus feature in MaxIm DL can reliably focus as well as or better than manual focusing, but does require the use of a highly repeatable digitally controlled focuser, such as a RoboFocus, JMI SmartFocus, or Optec TCF-S. FocusMax http://focusmax.org is a highly recommended and widely-used free autofocus tool that is compatible with MaxIm DL.