Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Experimental Solar Physics Limb darkening in solar image Photon transfer curve of a CCD detector

Khan Muhammad Bin Asad Astromundus University of Rome Tor Vergata, Italy 8 June 2011

Contents
1 Limb darkening in solar image 1.1 Introduction . . . . . . . . . . 1.2 Theoretical basis . . . . . . . 1.3 Scientic objective . . . . . . 1.4 Working procedure . . . . . . 1.5 Results . . . . . . . . . . . . . 1.6 Discussion . . . . . . . . . . . 2 2 2 3 3 4 5

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

2 Photon transfer curve of a CCD detector 2.1 Introduction . . . . . . . . . . . . . . . . . . 2.2 Theoretical basis . . . . . . . . . . . . . . . 2.3 Experimental setup . . . . . . . . . . . . . . 2.4 Working procedure . . . . . . . . . . . . . . 2.4.1 Acquiring images . . . . . . . . . . . 2.4.2 Processing images and plotting PTC 2.5 Results . . . . . . . . . . . . . . . . . . . . . 2.6 Discussion . . . . . . . . . . . . . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

7 . 7 . 7 . 8 . 9 . 9 . 9 . 10 . 11

3 Appendices 13 3.1 Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Appendix B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 1

Limb darkening in solar image


1.1 1.2 Introduction Theoretical basis

Limb darkening is the gradual decrease of the intensity in a stars image as we move from center of the image towards the limb. It occurs because of two eects: 1. Density of the star decreases with increasing radius. 2. Also temperature of the star diminishes with increasing radius. So when we look at the center we can look through deeper layers wheras as we go towards limb our line of sight penetrates upper and upper layers. Deeper layers have more temperature thus more brightness. So At center we see brighter layers, thus the image becomes brighter and towards limb we see cooler and fainter layers thus diminshing the brightness of the image.

Figure 1.1: Pictorial representation of an ideal case of limb darkening. The outer boundary is the radius at which photons emitted from the star are no longer absorbed. L is a distance for which the optical depth is unity. High-temperature photons emitted at A will just barely escape from the star, as will the low temperature photons emitted at B. Solar image near B will seem fainter. Limb darkening is just a projecttion eect due to our line of sight. It can be explained in a more scientic way. In the linear plane parallel approximation, the intensity of light coming from a star can be written as, I = a + b cos and S = a + b = cos 2 (1.1) (1.2)

Here is the angle between the path of radiation and the surface of the star on the sky. At center = 0 and at limb = 90 , thus optical depth, varies from 1 to 0. At center I = a + b and at limb I = a . If b > 0 then, intensity is high at the center and lower towards the limb. So, limb darkening exists because the continuum source function, S , decreases outward, as decreases. As we look towards the limb, we see upper photospheric layers which are less bright. A more general formulation can be done If we consider quadratic terms. In this case center to limb variation of solar intensity can be written as, I (0, ) = a0 + a1 cos + a2 cos2 I (0, 0) (1.3)

From measured values of this variation we learn that, the optical depth at the centre of the Solar disk varies from 0.90 at 3737 to 0.68 at 16550. The eect is more pronounced at the A A blue end of the spectrum and less pronounced at the red.

1.3

Scientic objective

Limb darkening is an unwanted eect. So after getting the calibrated solar image, but before starting any analysis, we need to remove limb darkening. During this experiment we got some calibrated images of Sun. Our objective was to remove limb darkening using IDL. IDL, short for Interactive Data Language, is a programming language used for data analysis. It is especially popular among astrophysicists.

1.4

Working procedure

The complete IDL program is given in appendix A. Several comments are added in the program. I will describe the procedure here according to the numbering of those comments. 1. Reading and resizing image: At the very beginning we read the selected solar image in IDL using read bmp command. Then the image is resized. We use rebin to resize the image. This command works because actual size is a mutiple iniger of the expected size. Resizing is necessary to see the image as actual size of the image did not match with the resolution of my computer. 2. Finding center of the image: The image is a box image, all pixels outside the Sun had values close to zero. Next step is to calculate the center of the Sun. This is done by the center of mass theory. As Sun can be considered spherically symmetric, its center of intensity should lie at the very center of the Sun. We calculate center of intensity of each row and then average the values, same is done for the columns. If n is total number of pixels along a row, x is the position of the pixels and I is the intensity value of a specic pixel then center of intensity () along a row can be found using the formula, x x=
n xn In n In

(1.4)

3. Shifting the image: After that the whole image is shifted to the calculated actual center of the Sun. 4. Calculating radius: Then, to nd the radius we use the fact that pixel values outside the sun are close to zero. In the for loop, while going from bottom to top along the 3

central column, we start a counter when pixel value becomes larger than 5% of the central intensity. The counter stops when intensity again drops below that limit. Thus the counter gives us diameter in both horizontal and vertical direction. Radius is obtained from these results. 5. Distance function: Then we create an image using distance function of IDL. dist gives an image whose intensity is directly proportional to its radius. So here intensity itself becomes an indicator of radius. Image created by dist is actually a combination of one quarters of four images. One complete dist image can be obtained by shifting this by one half of the total number of pixels. 6. Onion pilling the solar image: First we dene some annuli in the dist image with equal radial thickness. Outer radius of the outermost annulus is just the radius of the sun that we found. We take the index values of the pixels in one annulus and apply that to the solar image. Then we calculate the standard deviation and mean of those pixel values (intensities), i.e. in that annulus. But There maybe sunspots or faculae in that annulus. To remove these eects we take intensities within two times the standard deviation. Then we take mean of those intensities again. After that all the pixel values in that annulus are set to the mean intensity value. This process is repeated for all the annuli. Thus we get an image of the Sun with several annuli and values of all the pixels in one annulus are same, i.e. average intensity of that annulus. We set all the zero values of this onion-like image to be 1 to avoid dividing by zero. 7. Removing limb darkening: Now original shifted image of the Sun is divided by the onion-like image pixel by pixel. Limb darkening is removed in this way and we get a rened image. But as we divided all the intensities in an annulus by average intensity of that annulus, we get pixel values to be a bit more or less than 1, original intensity values are gone. To recover the original intensities we need to rescale it, in a way that tvscl command does intrinsically. For rescaling we multiply the image by the ratio of 255 and the maximum pixel value of the rened image. Finally we show this image in a window.

1.5

Results

Figure 1.2: In this image all the annuli created on the solar image are visible. All the pixels in one annulus have the same value and the value is the average intensity of that annulus.

Figure 1.3: Left: Original image of the Sun, limb darkening is visible. Right: Image after removing the eect of limb darkening.

1.6

Discussion

1. A more convenient way of nding the onion-like image using the distance function is to use equal area intervals instead of equal radius intervals. If we use equal area than all the regions of the image are scaled in a same way and true brightness of the Sun is reestablished more precisely. This can be done by simply dividing total area of the image by total number of expected annuli and using that as step in the for loop. 2. While nding radius we must be careful about any interruption caused by cosmic ray or other irregular but intense phenomena in the sky. If data about a cosmic ray exists in one of the pixels outside the solar image and if the pixel is in the central column or row than the counter will start counting before encoutering the edge of the Sun. Thus we will get a wrong value of radius. 3. Also to make our code more exible we should tell the program to start counting when intensity of a pixel becomes greater than some percentage of the central intensity. If we use a xed value as limiting value for the counter than the program loses its universal credibility. Also, to give a certain value we must be sure about the typical pixel values in the black region and also typical values in the limb of Sun. 4. This kind of program will work only if the source is spherically symmetric. Considering the Sun to be spherically symmetric we could take the image to be circular. And as it was circular we could nd a denite answer for the radius. In practice, radius should be calculated in all directions from the center and an average could be found from them. Also in the image we saw some extended intensity regions coming out from the photosphere of the Sun. They can be explained as prominences. 5. By making precise measurements of this form of limb darkening and comparing these measurements with the predictions of dierent models, in theory we should be able to deduce something about the relation of density and temperature with optical depth in the solar atmosphere. But one practical diculty of doing this is that it turns out that it is necessary to make quite precise measurements of the exact form of the limb darkening 5

very close to the limb to be able to distinguish convincingly between dierent models. To create a perfect model for explaining limb darkening we should not assume a hard and fast photosphere surrounded by an atmosphere of uniform source function; rather, we should suppose that the source function varies continuously with depth. 6. In the end we could also discuss something about the possibility of detecting limb darkening of stars other than the Sun. The future will tell whether advances in technology, such as adaptive optics, may enable us to observe the limb darkening of other stars directly. Other methods are possible. For example, the detailed light curve of an eclipsing binary star undoubtedly gives us information on the limb darkening of the star that is being eclipsed.

Chapter 2

Photon transfer curve of a CCD detector


2.1 Introduction

Main objective of this experiment is to calibrate and optimize a CCD detector system without knowing technical specications in detail. Calibration is done by removing systematic eects caused by the detector system itself. To remove these eects we need to judge the performance of the system. Judgment of performance is usually done by transfer curves. There are 4 operational categories of mainstream performance transfer curves, namely- charge generation, collection, transfer and measurement. Among all the transfer curves of these 4 categories photon, x-ray and QE transfer curves provide 90% of data required to judge the performance. Photon transfer curve, associated with charge collection, is the most versatile one among them. In this experiment we nd the photon transfer curve of an ideal CCD using uniform images of dierent exposure times created by a LED source. From the PTC we could measure the gain of the whole CCD system, read noise and the full well capacity. We also nd the linearity plot, i.e. exposure time vs. signal in DN. Linearity of the CCD can be found by linear least-square regression analysis. We did not do the analysis as our main objective was to calibrate the system with PTC. But we saw the plot and found it to be almost linear.

2.2

Theoretical basis

Ratio of output and input is called a transfer function. Transfer curve plots this function, i.e. output vs. input. Results of the test tools developed to allow CCD performance to be expressed in absolute units (number of electrons) are often presented in the form of transfer curve. CCD transfer function can be obtained from the following diagram,

Figure 2.1: Typical CCD camera system. Internal gain functions, signal and noise parameters are shown

S(DN ) = QEI i ASN ASF ACDS AADC P

(2.1) (2.2)

Its very dicult to calculate individual gains in this function precisely. Instead PTC can be used to measure the whole gain, g(e /DN ) = (ASN ASF ACDS AADC )1 and G = 1/g. Noise sources in CCD are: Photon shot noise, readout noise, dark current, bias frame, fano noise, xed pattern noise. We dont need to consider Fano noise because it is appreciable only from soft x-ray regime when photon energy becomes more than 10 eV. Fixed pattern noise (Pixel response non-uniformity, PRNU) is same for a specic image, we get rid of this by subtracting one image from the other image of same exposure time. Dark current and bias frame are removed when we subtract the dark image from the mean of the original images. So nally only two noise sources remain: shot noise and read noise. As they are statistically independent total noise can be written like,
2 2 2 Ntot = Nshot + Nread

(2.3)
2

(GNtot ) = (GNshot ) + (GNread )

(2.4)
S G,

But total noise is just the observed variance. Mean number of photoelectrons is shot noise is just the square root of this, so Nshot =
2 tot = G S + (GNread )2 S G.

and

Finally we get, (2.5)

In this nal equation variance and mean signal are the observables. If we plot these two quantities for many exposure times we will get a curve with a sharp cuto near full well capacity. This is PTC. If we t the PTC linearly then the slope of the linear t will give us gain, G, and the intercept with y-axis will give the readout noise, (GNread )2 .

2.3

Experimental setup

(a) At one side of the platform there was a LED source xed to a stand that could be moved only towards left or right. Two wires were connected to the LED from the power source. At the power source there was a voltmeter to measure the voltage. (b) On the other side of the platform there was a CCD detector. It was xed on a stand that can be moved from top to bottom and front to back and vice versa.

(c) Between the CCD and the LED source a biconvex lens was xed. The lens stand could be moved towartds left to right and top to bottom and vice versa. (d) Several plastic tubes were provided to close the path of light rays so that they cant escape. (e) CCD detector was connected to a computer. Commands to close or open shutter and take pictures were given using a software installed in the computer.

2.4
2.4.1

Working procedure
Acquiring images

(a) CCD, lens and LED stands were moved up and down so that the three components are horizontally coplanar. (b) One of the two wires from LED was connected to a source and the other one was connected to ground. Thus LED was illumanated. Light level was controlled by the voltage regulator. A white paper was placed in front of the LED source in roder to diuse the light. In fact, we dont want any focusing of light, diused light is necessary for uniform image. Lens was placed in a position where distance between lens and detector is less than the focal length of the lens in order to acquire an uniform image. Distances from detector to lens and lens to LED were adjusted for maximum possible uniformity. (c) After adjusting the distances for uniformity we adjust the voltage given to the LED in order to optimize the number of measurements. If voltage is very high the CCD will saturate sooner and we will not have sucient number of measurements to plot the PTC eectively. Voltage was xed at an intermediate level where exposure time at saturation was large enough. But exposure time at saturation should not be very large, as then we will have very small number of incident photons at low exposure times. (d) Then we started taking images varying exposure times, but at a xed voltage level. Starting from 5 milliseconds we went till the saturation when full well capacity is reached. After nding saturation we backed o a little and took some more measurements to get a smooth curve near saturation so that we get an exact value of full-well capacity. Then we took some more values after saturation. (e) For each exposure time rst a dark image, with CCD shutter closed, was taken. Then two normal images were taken. All the images were saved in tif (tagged image le) format with clever naming convention. Then data processing was done by IDL.

2.4.2

Processing images and plotting PTC

IDL codes are given in the appendix with necessary comments. Here I am listing the main processes: (a) All the signal and dark image les are read in IDL. Two oating arrays are dened with necessary number of elements. (b) A vector is dened where all the values of exposure times are written according to the sequence maintained in the directory.

(c) A table is created where I can write values of mean signals, total variane and exposure times. (d) I nd the mean of two signal images and subtract dark frame from it pixel by pixel. Then I nd the mean of all the pixel values and get the mean signal for each exposure. For total variance I subtract one signal image from another and divide it by 2 because when 2 identical frames subtracted random noise component of the are resulted frame increase by a factor of 2. While dierencing xed noises are canceled out, only random noise components remain. Then I nd the variance of this and get total variance. Mean signal, total variance and exposure times are written in the previously opened le. (e) A oating array is created where data from the table were stored to plot in IDL. (f) First, the linearity plot is created by plotting exposure time in x-axis and mean signal in ADU in y-axis. Then photon transfer curve is created by plotting mean signal in x-axis and total variance, i.e. noise, in y-axis. (g) Linear tting is done. The t is plotted over the PTC upto the full well capacity. (h) Parameters from linear t are printed in IDL with their corresponding errors.

2.5

Results

Figure 2.2: Linearity plot. A linear t is errplotted to show how linear it is. From the graph we can see that maximum deviation from the original value is very low. By least-squared regression analysis it could be found that non-linearity is very low, but we did not do that.

10

Figure 2.3: Left: Classical Photon transfer curve that is shot noise limited, noise is plotted against mean signal. From the linear t we can calculate gain, readout noise and full well capacity. Right: Total variance of the signal is plotted against mean signal. As images are not subtracted we get the total noise including xed pattern and shot noise. Log-log plot is made to show dierent regimes more clearly. We can directly print out the values of y-intercept and slope of photon transfer curve that will give us read noise and gain respectively. Also mean signal in ADU at the peak of the curve gives full well capacity. Values that we get by printing lint in IDL are, G = 0.127964 0.000242272 and (GNread )2 = 4.51561 0.467813. From these values we can calculate the following, (a) Detector-CDS-ADC Gain, g =
1 G

= (7.81 0.0146) e /ADU

(b) Readout noise by extrapolating linear t, Nread = (17 1) electrons (c) Full well capacity, = 3258.25ADU = 25447 electrons From the results we can understand the following aspects of CCD: (a) Response of the CCD is quite linear which is very good for detection. (b) Full well of the CCD is reached at quite high signal level, i.e. it has a high dynamic range. Small dynamic range is not shown just because we did not take much measurements at small exposure times. (c) In the log log plane two dierent slopes can be seen. For FPN slope is 1 while for shot noise slope is 0.5. At read noise regime slope should be constant, but we dont see this regime well because we did not take reading at short exposure times.

2.6

Discussion

We had to measure read noise just by extrapolating the linear t which wont give the very exact value. If we could take a very large dynamic range, and took measurements at very small exposure times than we could have observed the attening of PTC at read noise regime, as slope at this regime is theoretically zero. Intercept of this attened portion with the y axis would have given us the read noise.

11

Also our rst PTC is shot noise limited, that means classical. Because, we canceled the xed noises by subtracting one image from another. In the second image we took total variance and plotted that against signal and got the total noise PTC. In that curve FPN regime has a slope of almost 1 and at shot noise regime it is 0.5. In the total PTC dark non-uniformity is also present. But in that case dark non-uniformity dominates over FPN, because dark non-unifomity is 10% of the total noise whereas FPN is just 1%. An important aspect to note is that, dark current does not hamper the PTC. PTC only depend on how the charges are collected, not how they were generated, as long as they exhibit shot noise characteristics. In fact, a PTC can be plotted only by dark current counts that is called dark transfer curve. Photon transfer is the rst test performed to determine the overall health of a new CCDtelescope system. Because it gives some amazing results for calibration and optimization, such as: (a) Well behaved PTC means the system is capable of making very precise measurements. (b) It magically gives the conversion constant to convert DN (digital number) or ADU (analog to digital unit) to absolute units, i.e. electrons. (c) When some problem is dtected in CCD-telescope system PTC is plotted again to nd non-linearity and noise. (d) It can be used to even calculate the quantum yield gain, i in this way: If K = (ASN ASF ACDS AADC )1 and J = (i ASN ASF ACDS AADC )1 then i = K . When > 4000, i = 1 but when < 4000, i > 1. K can be found J from optical PTC and J can be found from soft x-ray PTC and then i is calculated comparing these two PTCs. There are always room for improvements. Noise statistics could be improved by taking 3 signal images instead of 2. In that case each one has to be subtracted from other, 3 distinct variances should be calculated and nal variance will be the mean of them.

12

Chapter 3

Appendices
3.1 Appendix A

IDL code for removing limb darkening. pro limb ; 1 . Reading image image=read bmp ( / home/md/ i d l / Images /20031025 0 6 4 1 0 5 . bmp ) rimage=r e b i n ( image , 5 0 4 , 5 0 8 ) x=504 y=508 z =256 p=200 q=p+1 ; 2 . F i n d i n g c e n t e r o f t h e image f o r j=p , yq do b e g i n s=0 f o r i =0,x1 do b e g i n a=i l o n g ( rimage ( i , j ) ) s=s+a endfor d=t o t a l ( rimage ( , j ) ) r=s /d endfor x c e n t e r=mean ( r ) print , xcenter print , xcenter ; finding y center f o r j=p , xq do b e g i n s=0 f o r i =0,y1 do b e g i n a=i l o n g ( rimage ( j , i ) ) s=s+a endfor 13

d=t o t a l ( rimage ( j , ) ) ry=s /d endfor y c e n t e r=mean ( ry ) print , ycenter print , ycenter ; 3 . S h i f t i n g image t o t h e c a l c u l a t e d c e n t e r x s h i f t=x c e n t e r (x/21) y s h i f t=y c e n t e r (y/21) simage=s h i f t ( rimage , x s h i f t , y s h i f t ) set plot , x window , 0 , x s i z e =504 , y s i z e =508 t v s c l , simage ; 4 . F i n d i n g r a d i u s o f s h i f t e d image xc=round ( x c e n t e r ) yc=round ( y c e n t e r ) b l a c k =0.05 simage ( xc , yc ) d i a 1=0 d i a 2=0 f o r m=0 ,500 do b e g i n i f simage ( xc ,m) g t b l a c k then d i a 1=d i a 1+1 i f simage (m, yc ) g t b l a c k then d i a 2=d i a 2+1 endfor r a d i u s =( d i a 1+d i a 2 ) / 4 print , radius print , radius ; 5 . Image c r e a t i o n u s i n g d i s t a n c e f u n c t i o n dimg=d i s t ( x , y ) sdimg=s h i f t ( dimg , x / 2 , y / 2 ) window , 1 , x s i z e =504 , y s i z e =508 t v s c l , sdimg ; 6 . Onion p i l l i n g o f t h e Sun rad=0 img=f l o a t ( simage ) f o r i =0 ,30 do b e g i n i n d e x=where ( ( sdimg g t rad ) and ( sdimg l e rad +7)) sd=s t d d e v ( img ( i n d e x ) ) avg=mean ( img ( i n d e x ) ) n r i n g=where ( img l e avg+2sd ) o r ( img ge avg 2sd ) r i n g a v g=mean ( img ( n r i n g ) ) img ( i n d e x )= r i n g a v g rad=rad+r a d i u s /31 endfor img ( where ( img eq 0))=1

14

; 7 . Removing limb d a r k e n i n g r e f i m g =( f l o a t ( simage ) / img ) refmax=max( r e f i m g ) f i n i m g=r e f i m g ( 2 5 5 / refmax ) window , 1 , x s i z e =504 , y s i z e =508 tvscl , finimg end

3.2

Appendix B

IDL code for Photon transfer curve. pro p t c ; 1 . Searching the f i l e s , d e f i n i n g arrays f i l e s =f i l e s e a r c h ( / home/md/ i d l /16 5/.TIF ) n f i l e s =n e l e m e n t s ( f i l e s ) s i g n a l= f l t a r r ( n f i l e s / 3 ) n o i s e= f l t a r r ( n f i l e s / 3 ) ; 2 . A v e c t o r with a l l t h e e x p o s u r e t i m e s exposures =[100 ,10 ,110 ,114 ,118 ,122 ,126 ,130 ,135 ,140 ,150 ,160 ,170 , 180 ,190 ,200 ,20 ,210 ,220 ,230 ,30 ,40 ,50 ,5 ,60 ,70 ,80 ,90] ; 3 . Opening a t a b l e t o w r i t e s i g n a l , n o i s e and e x p o s u r e t i m e s close ,1 openw , 1 , / home/md/ i d l / tab . dat ; 4 . C a l c u l a t i n g mean s i g n a l and t o t a l v a r i a n c e f o r n=0 ,( n f i l e s /3)1 do b e g i n sgn1=r e a d t i f f ( f i l e s ( 3 n+1)) sgn2=r e a d t i f f ( f i l e s ( 3 n+2)) dark=r e a d t i f f ( f i l e s ( 3 n ) ) sgn1=c o n g r i d ( sgn1 , 5 0 4 , 5 0 8 ) sgn2=c o n g r i d ( sgn2 , 5 0 4 , 5 0 8 ) dark=c o n g r i d ( dark , 5 0 4 , 5 0 8 ) s i g n a l =( sgn1+sgn2 )/2 dark ; s u b t r a c t i n g dark frame m e a n s i g n a l=mean ( s i g n a l ) ; o f a l l t h e p i x e l v a l u e s v a r s i g n a l=v a r i a n c e ( s i g n a l ) ; t o t a l v a r i a n c e n o i s e =(sgn1sgn2 ) / s q r t ( 2 ) ; f i x e d n o i s e s o u r c e s c a n c e l e d out v a r n o i s e=v a r i a n c e ( n o i s e ) ; c a l c u l a t i n g t o t a l v a r i a n c p r i n t f , 1 , mean signal , var noise , v a r s i g n a l , exposures (n) endfor close ,1 ; 5 . C r e a t i n g f l o a t i n g a r r a y f o r IDL p l o t t i n g cd , / home/md/ i d l / n e x p o s u r e s= f i l e l i n e s ( tab . dat )

15

data= f l t a r r ( 4 , n e x p o s u r e s ) openr , 1 , tab . dat r e a d f , 1 , data ntab=data [ , s o r t ( data [ 3 , ] ) ] ; s o r t i n g and s e q u e n c i n g sgn=ntab [ 0 , ] ; d e f i n i n g which row means what n=ntab [ 1 , ] var=ntab [ 2 , ] time=ntab [ 3 , ]

; 6. Plotting s e t p l o t , ps d e v i c e , f i l e =/home/md/ i d l / l i n . eps , / c o l o r p l o t , time , sgn , psym=7,syms =0.5 , $ x t i t =( Exposure time [ ms ] ) , y t i t =( S i g n a l [ADU] ) , $ t i t =CCD l i n e a r i t y p l o t , $ x s t y =1.8 , y s t y =1.8 , x t h i c k =1.8 , y t h i c k =1.8 , t h i c k =1.8 , $ c h a r t h i c k =2, c h a r s i z e =1.4 , $ xra = [ 0 , 2 4 0 ] , yra = [ 0 , 4 0 0 0 ] l i n= l i n f i t ( time ( 0 : 1 4 ) , sgn ( 0 : 1 4 ) , sigma=a , y f i t=y , sdev=sdev , m e a s u r e e r r o r s=e r r ) e r r=s q r t ( abs ( y ) ) e r r p l o t , time , y+e r r , ye r r , l i n e s t y l e =0 p r i n t , c h i , prob device ,/ c l o s e d e v i c e , f i l e =/home/md/ i d l / p t c l o g . eps , / c o l o r p l o t , sgn , var , psym=6, $ / xlog , / ylog , x t i t =( Log mean s i g n a l [ADU] ) , $ y t i t =( Log t o t a l v a r i a n c e [ADU] ) , $ t i t =Photon t r a n s f e r c u r v e ( t o t a l n o i s e ) , $ x s t y =1.8 , y s t y =1.8 , x t h i c k =1.8 , y t h i c k =1.8 , t h i c k =1.8 , c h a r t h i c k =2, $ c h a r s i z e =1.4 , $ xra = [ 1 5 0 , 4 3 0 0 ] , yra = [ 7 0 0 , 1 . 5 e5 ] device ,/ c l o s e d e v i c e , f i l e =/home/md/ i d l / p t c . eps , / c o l o r p l o t , sgn , n , psym=6, $ x t i t =( Mean s i g n a l [ADU] ) , y t i t =( N o i s e [ADU] ) , $ t i t = C l a s s i c a l Photon T r a n s f e r Curve (PTC) , $ x s t y =1.8 , y s t y =1.8 , x t h i c k =1.8 , y t h i c k =1.8 , t h i c k =1.8 , c h a r t h i c k =2, $ c h a r s i z e =1.4 , $ xra = [ 0 , 4 0 0 0 ] , yra = [ 0 , 4 5 0 ] ; 7. Linear f i t t i n g l i n= l i n f i t ( sgn ( 0 : 1 2 ) , n ( 0 : 1 2 ) , sigma=l i n v a r , y f i t=l i n y f ) o p l o t , sgn , l i n y f , l i n e s =0 device ,/ c l o s e ; 8 . F i n d i n g t h e v a l u e s o f Gain and Read n o i s e print , l i n print , linvar end 16

You might also like