1.CCD Image Calibration

1.1 Introduction.

A raw CCD image contains a ton of data. Some of it is good (signal) while some of it you don't want (noise). To get the best data, you must do your best to reduce or account for(说明) the noise sources in your data while maximizing the signal from your stars.
Signal
The signal in your system is the starlight(星光) itself and nothing else. Those photons that left the star many years ago land on your CCD chip and are converted into electrons. These electrons are counted and then displayed on your screen and stored on your computer in binary form. But that trip from CCD to monitor is a dirty one.
Unwanted Signal
The unwanted signal in the system mostly comes from the sky (both cosmic rays(宇宙线), and optical light from the sky), the telescope (vignetting(渐晕), reflections), the CCD chip (dust donuts, hot pixels, dark current), the CCD charge-detection node (readout noise), and the computer (timing). All of these can be accounted for or otherwise corrected with some elementary image processing steps and calibration.
Image Processing to the Rescue
Through careful processing you can mitigate(减轻) the effects of those sources of unwanted noise. Sometimes you can merely diminish it (read-out noise) and sometimes you can completely eliminate it (cosmic rays). Calibration can be a very tedious and time consuming process. It is also one of the areas of CCD observing where experience helps out the most. In the beginning you may be a poor calibrator. Don’t sweat it. As time goes on you'll get better and find the best system for you. There are many creative solutions to these problems. There are three important image corrections that all CCD observers should be familiar with. These corrections involve the creation of extra images that try to represent the behavior of the system in the absence of signal. These images can then be used to correct your data frames. They are known as bias frames, dark frames, and flat fields. Bias Frames help compensate for read-out noise and interference from the computer. Dark frames compensate for the thermal properties of the CCD chip and flat frames compensate for imperfections in the light path. All three are applied to your science frames to give you images that best represent the actual image of the field without the imperfections(不完美,缺陷) and noise of your telescope and camera. On the next page, you'll see examples of these frames, and how correcting them can improve your data images (and the resulting photometry) In arithmetic terms, the production of a calibrated frame is simple: you subtract the Bias and Dark frames from the Raw data image, and then divide the result by the normalized Master Flat: Calibrated = (Raw – Bias – Dark) / Master Flat One you have a properly calibrated science frame, then you can begin doing science with your image.

1.2 Bias Calibration

The first step in calibration is to prepare a bias frame. A bias frame is an image with zero exposure time taken with the shutter disabled. The image will consist only of read-out noise and noise caused by interference of the computer. What a bias frame does is set the zero point of the CCD output and the pixel scales to the same value. This makes the final image more accurate since the zero points are equal and no nonlinear pixel values exist. Bias frames will have very little signal in a modern, healthy CCD camera with quick readouts (larger and older cameras will have more signal). They will have virtually(实际上) no effect on the visual appearance of the image (astrophotographers rarely bother with bias frames). In fact, you may find that the bias value changes by less than one ADU per pixel. In that case you should take the average value of all the pixels in the frame and apply that average to every pixel. What this does is correct for statistical "accidents". A bias frame will also take into account thermal current that collects while the frame is being downloaded to your computer.
Taking Bias Frames:
Not all CCDs can take pure bias frames. Some CCDs just are not designed to take an exposure without using the shutter. In those cases you can make a pseudo-bias(虚假的偏移) by taking an exposure with the shutter at the shortest possible exposure length and your system completely blocked of any light. If your camera can take a bias frame, it is likely already setup in your software. A bias frame is a 0 second exposure. After you take it, inspect it for artifacts. In theory, the field should be uniform. But in reality you'll notice some changes in amplitude. If you notice any patterns, they were likely caused by a spurious(伪造的) noise source (computer CPU chip, home electrical surge, etc.). Take a number of bias frames and determine whether you are operating in a "noisy" environment or not. The more bias frames you take, the better the result. The readout noise in the bias frame will decrease by the square root of the number of frames you take. In very sensitive cameras you may want to take as many as 50 frames! A good rule of thumb is to take as many bias frames as you take darks. If you found that you are working in a noisy environment then you should median combine your bias frames, otherwise average your frames together to make a master bias. You can test your bias frames by plotting a histogram of the ADU values of your pixels (Figure X). The result should have a roughly Gaussian (“normal”) distribution with the range related to the read noise and gain of the detector. Applying Bias Frames Since the bias consists wholly of noise, simply subtract it from your CCD image. This removes bias noise from your final image. It’s that easy! Now you are ready to move on to darks.

1.3 Dark Frames

A dark frame measures the thermal noise of your CCD. It is an exposure where the shutter is opened but no light is allowed to hit it so it only measures the energy from the CCD itself (dark current). This is normally done by placing a dust cap on the telescope and then covering it with a blanket, cloth, or something opaque to light. Darks also compensate for hot pixels, which are defects in the CCD chip that makes pixels look like they are permanently "on" or "lit". Darks are very easy to take and are the most important calibration step so there is no reason not to take darks. Taking Darks: The Handbook of Astronomical Image Processing (Berry & Burnell, 2000) recommends the "Image-Times-Five" rule. The more dark frames you take, the more accurate the frame and the lower the noise. A good rule of thumb is to make sure the total exposure time of all your dark frames equals five times that of the image you are calibrating. So if you are taking a 2 minute image, you can do five two-minute darks or ten one-minute darks. Inspect each frame to make sure that cosmic ray events do not contaminate them. They will appear as a bright spot on your dark frame. It depends on altitude, physical size of the CCD chip, and exposure time but in general expect about 1 cosmic ray event every few minutes of exposure time. When you have a bunch of darks, average them together to create a master dark. (You can skip the cosmic ray inspection by median combining at least 3 frames instead of averaging them; but then your final dark will have slightly more noise.) The dark frame also contains readout noise (see prior section on bias). Readout noise does not scale over time, so your dark frame right now is unscalable. That is a pain if you plan to take exposures of different lengths during your observing session because then you must take a ton of dark frames to match the integration time (times five!) of each image. If you were able to take a bias frame, then you can subtract that from the master dark frame. Now you can scale the dark frame to the integration times of your various images. As the CCD temperature changes during the night, the dark current will adjust. Except in extreme circumstances, you do not need to take darks for each image. One option is to take your dark frames in the middle of the observing session. Another plan is to take some of the darks at the beginning, some in the middle, and some at the end. This is more work, but will be more precise. As with everything in photometry, you have to balance the work you put in with the quality of the results you need. For a more detailed discussion of dark frames see Chapter 7 of Arne Henden’s book. A flat frame compensates for obstructions, reflections, and other problems in the light path. This is the path light travels from the time it enters the telescope to the moment it strikes the CCD chip. Dust on optical surfaces, reflections from baffles or poorly aligned optics, vignetting, and other noise sources can interfere with your final data. Flat fielding is the most difficult calibration routine. There are many things to watch out for and many ways to do it. In fact, some people call it an art because it is so intricate and there are so many creative ways you can do it. The key is to be patient and realize that your first few flats will likely not turn out well. Take your time and with experience you'll be able to master the master flat! The Concept A flat field is a picture of what's wrong with your system in regards to the path of light. You will see dust donuts, light gradients, reflections, and more. Now that you have an image of what is bad, you take an image of the star. That image is an image with good (star) and bad (noise). You remove the flat field from the image and you are left with only the good. Trim the fat, so to speak. Taking Flats The first thing you have to do is take flat darks. These are dark frames taken to be applied to the flats. So you want to match the integration time with that of your flat, not that of your final image. These darks will be separate from your image calibration darks. Other than that, the dark frame procedure is exactly the same. The goal is to take an image of a uniform light source (the "flat" field). So the first thing you need is just that – a uniform light source. This is the most difficult part of taking flats. There is no fool-proof(简单的) method of creating the uniform field. How you do it will likely depend on your physical location, mechanical ability (handyman factor) and your level of patience. Here are some of the most popular light sources for flat fields: (1) Domes: Shining a light on the underside of the roof of a closed dome. (2) Twilight: For about 15 minutes at dusk and dawn, a photometric sky can be a uniform blue. • (3) Light boxes: These are boxes with a light inside that fit on the outside of the telescope's central opening. (4) T-shirts, et cetera: All sorts of creative ideas have been used to create uniform fields, from white cotton t-shirts to film screens to the sides of houses. The limit is your imagination. Usually the light source will be a dimmable bulb so that the light can be adjusted for the filter you are shooting through. Different filters transmit different amounts of white light so what may be a good source for a V filter may be a weak source for an R filter. If you don't have a dimmable bulb you can adjust the image exposure time, but then you need to take a new set of flats. (This can get complicated pretty quickly!) The light source should be reflected off uniform surfaces before entering some type of diffusing screen. For example, you may want to shine a light on a white poster board which reflects through to a piece of translucent plastic before going into the telescope. The more times you reflect the light, the more uniform the field will be. Once you have a uniform field, expose your CCD to about 1/2 of the full well depth of your pixels. Take at least 16 flat field images, this is the lowest number required in order to avoid adding noise to your final calibrated image. For .01 mag accuracy photometry(光度计) keep your signal to noise ratio to 500:1 or better. The exposure time will differ based on what filter you are using since each will pass a different fraction of the light source. Every time you change an element in the light path, such as removing a filter, you change the light path so you have to take new flats. So you can't take a flat with a V filter, then take it off and put on an R. When you do that the V filter flats should be discarded. This is not only because objects in your optical path have moved, but also because filters will have different responses to your light source. In fact, one time an AAVSO observers spent an hour trying to take flats with an I-filter before realizing that the light source was fluorescent, thus emitting almost no IR light! Applying Flats: The procedure for applying a flat field correction is straightforward. First, you create the flat: 1. Average all your flats. 2. Average or median combine all your darks made specifically for the flats. 3. Subtract the averaged dark from the averaged flat What you have left is your master flat. Congratulations! This flat will be good as long as you don't change anything in the optical configuration of your system. Now you can begin taking data (images). Divide the flat into each image after you have dark subtracted it. For a more detailed discussion of flat fields see Chapter 8 of Arne Henden’s book.

1.4 Noun interpretation

hot pixel:
(1) The term "hot pixel" may also refer to a type of defective pixel (坏点)or a pixel that is extremely bright, which can be used as something ironic (2)A hot pixel is a common defect found in the majority of digital cameras. You will often find hot pixels in your image during a long exposure shot with a high ISO. It’s normal to have these and they will come and go over time. Hot pixels (in a photograph) aren’t a problem; you can fix the image very easily in Lightroom or Photoshop. These are caused byelectrical charges(电荷) that leak into the sensor wells, and they will get worse and appear more frequently when the sensor itself is hot. Typically these are only found upon inspection of the image in post-production. It’s very rare for a hot pixel to show up on your camera’s LCD screen. Reference1:https://www.premiumbeat.com/blog/what-is-a-hot-pixel-and-how-can-you-remove-one/
full-well capacity:
(1)The full well capacity of a sensor is the amount of electrons a pixel can hold before the charges overflow into the neighbouring pixels or drain into the silicon substrate if the camera offers antiblooming. (2)决定 SENSOR 动态范围大小和灵敏度的硬件条件 (3)CCD里面称为阱深,对应着sensor的动态范围,若一个象素的电荷超过它,其内的电荷就会流到临近电荷产生影响在拍摄时曝光过度或高亮的光源,会产生很大一块饱和的白色区域就是因为这个原因引起的
heat current
A heat current is a kinetic(运动的) exchange rate between molecules, relative to the material in which the kinesis occurs. It is defined as {\displaystyle {\frac {dQ}{dt}}} \frac{dQ}{dt}, where {\displaystyle Q} Q is heat and {\displaystyle t} t is time.

ADU,Gain

1.Gain on a CCD camera represents the conversion factor from electrons (e-) into digital counts, or Analog-Digital Units (ADUs). Gain is expressed as the number of electrons that get converted into a digital number, or electrons per ADU (e-/ADU). 1.In fact, you may find that the bias value changes by less than one ADU per pixel 2.A bias frame is an image with zero exposure time taken with the shutter disabled 3.A bias frame will also take into account thermalcurrent that collects while the frame is being downloaded to your computer 4.4.7e-/ADU 5. R filter V filter

Reference

1.CCD Image Calibration https://www.aavso.org/files/image_calibration-v1.pdf