CCD Image Processing: CCD Image Processing: Issues & Solutions Issues & Solutions 1
Correction of Raw Image Correction of Raw Image with Bias, Dark, Flat Images with Bias, Dark, Flat Images [ ] [ ] − r x y , d x y , Raw File [ ] r x y , Dark Frame “Raw” − “Dark” [ ] “Raw” − “Dark” d x y , “Flat” − “Bias” [ ] [ ] [ ] [ ] − − f x y , b x y , r x y , d x y , Flat Field Image Output [ ] [ ] [ ] − f x y , b x y , Image f x y , Bias Image “Flat” − “Bias” [ ] b x y , 2
Correction of Raw Image Correction of Raw Image w/ Flat Image, w/o Dark Image w/ Flat Image, w/o Dark Image [ ] [ ] Assumes Small Dark Current − r x y , b x y , Raw File (Cooled Camera) [ ] r x y , “Raw” − “Bias” “Raw” − “Bias” Bias Image [ ] “Flat” − “Bias” b x y , [ ] [ ] − , , f x y b x y [ ] [ ] − Output r x y , b x y , [ ] [ ] Image − f x y , b x y , Flat Field Image [ ] f x y , “Flat” − “Bias” 3
CCDs: Noise Sources : Noise Sources CCDs • Sky “Background” – Diffuse Light from Sky (Usually Variable) • Dark Current – Signal from Unexposed CCD – Due to Electronic Amplifiers • Photon Counting – Uncertainty in Number of Incoming Photons • Read Noise – Uncertainty in Number of Electrons at a Pixel 4
Problem with Sky “ “Background Background” ” Problem with Sky • Uncertainty in Number of Photons from Source – “How much signal is actually from the source object instead of from intervening atmosphere? 5
Solution for Sky Background Solution for Sky Background • Measure Sky Signal from Images – Taken in (Approximately) Same Direction (Region of Sky) at (Approximately) Same Time – Use “Off-Object” Region(s) of Source Image • Subtract Brightness Values from Object Values 6
Problem: Dark Current Problem: Dark Current • Signal in Every Pixel Even if NOT Exposed to Light – Strength Proportional to Exposure Time • Signal Varies Over Pixels – Non-Deterministic Signal = “NOISE” 7
Solution: Dark Current Solution: Dark Current • Subtract Image(s) Obtained Without Exposing CCD – Leave Shutter Closed to Make a “ Dark Frame” – Same Exposure Time for Image and Dark Frame • Measure of “Similar” Noise as in Exposed Image • Actually Average Measurements from Multiple Images – Decreases “Uncertainty” in Dark Current 8
Digression on “ “Noise Noise” ” Digression on • What is “Noise”? • Noise is a “Nondeterministic” Signal – “Random” Signal – Exact Form is not Predictable – “Statistical” Properties ARE (usually) Predictable 9
Statistical Properties of Noise Statistical Properties of Noise 1. Average Value = “Mean” ≡ µ 2. Variation from Average = “Deviation” ≡ σ • Distribution of Likelihood of Noise – “Probability Distribution” More General Description of Noise than µ , σ • – Often Measured from Noise Itself • “Histogram” 10
Histogram of “ “Uniform Distribution Uniform Distribution” ” Histogram of • Values are “Real Numbers” (e.g., 0.0105) • Noise Values Between 0 and 1 “Equally” Likely • Available in Computer Languages Histogram Noise Sample Mean µ Variation Mean µ Mean µ = 0.5 Variation 11
Histogram of “ “Gaussian Gaussian” ” Histogram of Distribution Distribution • Values are “Real Numbers” • NOT “Equally” Likely • Describes Many Physical Noise Phenomena Mean µ Variation Mean µ Mean µ = 0 Values “Close to” µ “More Likely” Variation 12
Histogram of “ “Poisson Poisson” ” Distribution Distribution Histogram of • Values are “Integers” (e.g., 4, 76, …) • Describes Distribution of “Infrequent” Events, e.g., Photon Arrivals Mean µ Variation Mean µ Mean µ = 4 Values “Close to” µ “More Likely” Variation “Variation” is NOT Symmetric 13
Histogram of “ “Poisson Poisson” ” Distribution Distribution Histogram of Mean µ Variation Mean µ Variation Mean µ = 25 14
How to Describe “ “Variation Variation” ”: 1 : 1 How to Describe • Measure of the “Spread” (“Deviation”) of the Measured Values (say “x”) from the “Actual” Value, which we can call “ µ ” • The “Error” ε of One Measurement is: ( ) ε = − µ x (which can be positive or negative) 15
Description of “ “Variation Variation” ”: 2 : 2 Description of • Sum of Errors over all Measurements: ∑ ∑ ( ) ε = − µ x n n n n Can be Positive or Negative • Sum of Errors Can Be Small, Even If Errors are Large (Errors can “Cancel”) 16
Description of “ “Variation Variation” ”: 3 : 3 Description of • Use “Square” of Error Rather Than Error Itself: ( ) ε = − µ ≥ 2 2 x 0 Must be Positive 17
Description of “ “Variation Variation” ”: 4 : 4 Description of • Sum of Squared Errors over all Measurements: ∑ ( ) ∑ ( ) ε 2 = − µ 2 ≥ x 0 n n n n • Average of Squared Errors ∑ ( ) − µ 2 x n 1 ∑ ( ) ε 2 = ≥ n 0 n N N n 18
Description of “ “Variation Variation” ”: 5 : 5 Description of • Standard Deviation σ = Square Root of Average of Squared Errors ∑ ( ) − µ 2 x n σ ≡ ≥ n 0 N 19
Effect of Averaging on Deviation σ σ Effect of Averaging on Deviation • Example: Average of 2 Readings from Uniform Distribution 20
Effect of Averaging of 2 Samples: Effect of Averaging of 2 Samples: Compare the Histograms Compare the Histograms Mean µ Mean µ • Averaging Does Not Change µ • “Shape” of Histogram is Changed! σ ≅ 0.289 – More Concentrated Near µ – Averaging REDUCES Variation σ 21
σ Averaging Reduces σ Averaging Reduces σ ≅ 0.205 σ ≅ 0.289 0 . 289 σ is Reduced by Factor: ≅ 1 . 41 0 . 205 22
Averages of 4 and 9 Samples Averages of 4 and 9 Samples σ ≅ 0.096 σ ≅ 0.144 Reduction Factors 0 . 289 0 . 289 ≅ ≅ 3 . 01 2 . 01 0 . 096 0 . 144 23
Averaging of Random Noise Averaging of Random Noise σ REDUCES the Deviation σ REDUCES the Deviation Samples Averaged N = 2 N = 4 N = 9 Reduction in 1.41 2.01 3.01 Deviation σ σ σ = One Sample Observation: Average of N Samples N 24
Why Does “ “Deviation Deviation” ” Decrease Decrease Why Does if Images are Averaged? if Images are Averaged? • “Bright” Noise Pixel in One Image may be “Dark” in Second Image • Only Occasionally Will Same Pixel be “Brighter” (or “Darker”) than the Average in Both Images • “Average Value” is Closer to Mean Value than Original Values 25
Averaging Over “ “Time Time” ” vs. vs. Averaging Over Averaging Over “ “Space Space” ” Averaging Over • Examples of Averaging Different Noise Samples Collected at Different Times • Could Also Average Different Noise Samples Over “Space” (i.e., Coordinate x ) – “Spatial Averaging” 26
Comparison of Histograms After Comparison of Histograms After Spatial Averaging Spatial Averaging Spatial Average Spatial Average Uniform Distribution µ = 0.5 of 9 Samples of 4 Samples µ = 0.5 µ = 0.5 σ ≅ 0.289 σ ≅ 0.096 σ ≅ 0.144 27
Effect of Averaging on Dark Effect of Averaging on Dark Current Current • Dark Current is NOT a “Deterministic” Number – Each Measurement of Dark Current “Should Be” Different – Values Are Selected from Some Distribution of Likelihood (Probability) 28
Example of Dark Current Example of Dark Current • One-Dimensional Examples (1-D Functions) – Noise Measured as Function of One Spatial Coordinate 29
Example of Dark Current Example of Dark Current Readings Readings Reading of Dark Current vs. Position Reading of Dark Current vs. Position in Simulated Dark Image #1 in Simulated Dark Image #2 Variation 30
Averages of Independent Dark Averages of Independent Dark Current Readings Current Readings Average of 2 Readings of Average of 9 Readings of Dark Current vs. Position Dark Current vs. Position Variation “Variation” in Average of 9 Images ≅ 1/ √ 9 = 1/3 of “Variation” in 1 Image 31
Infrequent Photon Arrivals Infrequent Photon Arrivals • Different Mechanism – Number of Photons is an “Integer”! • Different Distribution of Values 32
Problem: Photon Counting Problem: Photon Counting Statistics Statistics • Photons from Source Arrive “Infrequently” – Few Photons • Measurement of Number of Source Photons (Also) is NOT Deterministic – Random Numbers – Distribution of Random Numbers of “Rarely Occurring” Events is Governed by Poisson Statistics 33
Simplest Distribution of Integers Simplest Distribution of Integers • Only Two Possible Outcomes: – YES – NO • Only One Parameter in Distribution – “Likelihood” of Outcome YES – Call it “ p ” – Just like Counting Coin Flips – Examples with 1024 Flips of a Coin 34
Example with p = p = 0.5 0.5 Example with String of Outcomes Histogram N = 1024 N heads = 511 p = 511/1024 < 0.5 35
Recommend
More recommend