671 Remote Sensing– Homework 1
Programs to use: IDL*, Orion Camera Studio (free web download), Matlab, MicroObservatoryImage (free web download), Python, Photoshop (16-bit) or any other image processing program you are familiar with.
*IDL is the preferred programming language here only because I’ve written and will provide the programs that you need to do the homework.
In conducting this lab, students should learn the following terms and be able to use them in the homework write up:
Integration time
Dark current/Bias Frame
Readout
Readout noise
Thermal noise
Lab exercise 1: Let’s get to know your CCD
This lab presumes that you have already read the StarShoot G3 MonochromeCCD. If you have not read the manual do that now. The images have to be acquired on a PC but once acquired you can migrate to any platform to do the analyses using one or more of the following: Orion Camera Studio (PC), IDL, Matlab, MicroObservatoryImage, python, Photoshop (16-bit), etc.
1)Take a set of dark frame images. Dark frames or also called bias frames are images where no light reaches the CCD.Take the images at room temperature with integration times of: 0.1, 1.0 and 10 seconds. Make sure binning is 1x1, fast readout is not checked, cooler off, and lens cap on.
2a) View each of your images (using atv program in IDL). Describe your observations (e.g., image dimensions, DN values, uniformity, non uniformity, etc.). Include quantitative descriptions and comparison when ever possible. (IDL commands are in orange)
IDL> atv,'dark01sec.fit' ;this displays the image in the ATV
For instance you might plot the min, max, mean and standard deviation of each image. You can use atv widget to do the min/max and standard deviation.You can use atv image statistics to do some of the statistics for this lesson. In the ATV widget go to the "imageInfo" tab and select "Statistics" the statistics defaults to an 11 by 11 window in the center of the image. You’ll probably want a larger window than that to get good stats; you’ve got 437,664 pixels in the image. Below, after 2b, I’ve listed how to get stats for an image without using the atv widget.
2b)Check the image header information of each image and report CCD temp for each integration time. Also report pixel size, and array size for one image. Header information is found under the ImageInfo tab. If the pixels of this CCD were bigger, say, 16µm on a side what would change about ourdata (e.g., what’s the good and bad of big versus small pixels)?
Open the image in IDL
IDL> image=mrdfits('dark01sec.fit')
Where “image” is just a variable so call it what ever you want and
Dark01sec.fit is the image you want to read in
This assumes dark01sec.fit is in your current working directory or IDL path
To view the image variable in IDL type:
IDL> tvsl,image
To get mean and variance (which is standard deviation squared) in IDL type:
IDL> print,moment(image)
moment returns a four column array which consists of the:
(1)average, (2) variance, (3) skewness, (4) kertosis.
You can query the min and max of an array by typing
IDL> print,mim(image) or
IDL> print,max(image)
but keep in mind there could be a bad pixel or two that would give you spurious min or max values.You can get a 100x100 pixel box in the center of the image by including the following [326:425,241:339]when you type the min, max, or moment commands. The first two digits separated by the colon are the x-range, and the second two numbers are the y-range.
IDL> print,min(image[326:425,241:339]) or
IDL> print,max(image[326:425,241:339])
3) Plot a histogram of each image. Compare and contrast each image histogram. To plot a histogram you can do the following:
To get plot a histogram in IDL in two steps:
IDL> result=histogram(image,LOCATIONS=xbin, min=400, max=800);locations sets the binning between min and max values you can query the min and max values of an array. Locations are given by MIN + v*BINSIZE, with v=0,1,...,NBINS-1.The min/max values I provide here should be good for this exercise.
IDL>plot,xbin,result;where xbin are the locations set in previous line and are your x values for the plot and result is your y values.
Where “result” is a variable so call it what ever you want. Just call it the same in both places
NOTE: that a semicolon used in IDL (like I used above) denotes the beginning of a comment. Any text following a semicolon on a give line is ignored by IDL
To compare the plots you can do one of at least two things:
A)This first is to over plot the data for multiple histograms. So for instance if you take the lines above and modify them to
IDL> image2=mrdfits('dark1sec.fit')
IDL> result2=histogram(image2,LOCATIONS=xbin, min=400, max=800)
IDL>oplot,xbin,result2
B) Or you can write the data out as a text file to plot in excel or other program.
IDL> bothxy=lindgen(2,401); makes a long integer array that is 2 columns by 401 rows. Do aprint,size(xbin) and print,size(result2)to make sure the number of columns is the same and use that number to set the size of this array called bothxy
IDL> bothxy(0,*)=xbin;writes the xbin array to the first column of the bothxy array
IDL> bothxy(1,*)=result2;writes the result2 array to the second column of the bothxy array
IDL> openw,2,'filenamefortext.txt'
IDL> printf,2,bothxy,format='(2(" ",i," "))';type the word format and everything after it exactly as shown. You’re making a 2 column space delimitated file and writing the bothxy array into it.
IDL> close,2;this write the file filenamefortext.txt in your current working directory
4) Take a second set of dark frame images with the same integration times as before (i.e., 0.1, 1.0 and 10 seconds) but this time with the CCD cooler on and set at 10 degrees below the ambient CCD temp. Make sure binning is 1x1, fast readout is not checked, and lens cap on.
Repeat questions 2-3 (this makes questions 5 & 6)
7)Make a comparison between images of the same integration timebut with different temperature settings (i.e. from the ambient temp and cooled CCD temp). Compare your observations for quantities such as min, max, mean, standard deviations and histograms.
8)Why does cooling the CCD improve the noise? Based on the reading, are all wavelengths affected equally?How much is the noise improved by cooling the CCD array?
For questions 9 and 10 you may want to read chapter 2 of Handbook of CCD astronomy.
9) Read out noise is something that affects CCDs. But how can you determine this observationally. Go back to one of the images you looked at in question 2a.Print the image and draw an arrow representing the direction you think the CCD is reading out. Explain how you came to this conclusion.
10) Now measure how much readout noise there is. Use the two idl programs attached this email to create text files that average an image of one integration time but at both temperatures. Compare how the data look in the column and row directions. The programs average in one direction or the other.
To start the program, have it in your current working directory or IDL path. For instance:
IDL> column_avg_4fits
The program will run and ask you how many files you want to column average (just pick one for now) and then it will ask the file name you would like the program to read in. Give the complete file name (e.g., 10sec_cooled7C.fit) and be sure the file is also in your current working directory or IDL path. The txt file that is output in this case would be 10sec_cooled7C.fitcolumn_average.txt.
Plot these data (column average and row average) in excel or other program and describe what your observations. What effect of the data indicates the readout direction?Based on readout direction, which direction does the serial direction or output register read? Draw on cartoon of our 752x582 CCD below if it helps.
1