# 1.8. Calculating gain: step-by-step¶

## 1.8.1. Setup¶

• To avoid confusion, please close all open image windows.
• Pick two bias images and open them in separate windows.
• Pick two flat images of the same type (flood or twi) and the same filter and open them in separate windows.

## 1.8.2. Calculating gain¶

For the gain we will need to:

• Select the same region in each image
• Find the average pixel value in that region in each of the four images.
• Calculate the difference between the two bias images
• Calculate the difference between the two flat images
• Find the standard deviation of the pixel values in the same region in each of the difference images.

Let’s do that:

Todo

1. Write down the names of the images you chose.
2. Select a region and write down its width, height, and x and y position.
3. Find the average pixel value in that region in each image you have open. Write them down, clearly indiciating which measure goes with which image.
4. Calculate the difference between the two bias images.
5. Calculate the difference between the two flat images.
6. Measure the standard deviation in the region you chose in each of the two difference images. Write the result down, clearly indicating which measurement goes with which difference image.
7. Calculate the gain for the CCD using the formula in Howell’s book.
8. Calculate the read noise for the CCD using the formula in Howell’s book.