45
A flat fielding primer Pete Kalajian NEAIC 2010

A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Embed Size (px)

Citation preview

Page 1: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

A flat fielding primer

Pete Kalajian

NEAIC 2010

Page 2: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

My interests

QuickTime™ and a decompressor

are needed to see this picture.

Exoplanet transits

Oph

Arcturus

Spectroscopy

8

8.5

9

9.5

10

10.5

11

11.5

12

12.5

13

0 5 10 15 20 25 30 35 40 45

JD - 2455075

SS CYG V MAG

Cataclysmic Variables

Page 3: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Part 1

What does a flat do?

Page 4: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

What is a flat field frame?

• Camera/OTA exposed to a uniform illumination source

Page 5: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

CCD review

• Noise (quantum mechanics)

• Pixel-to-pixel variation (manufacturing)

• Vignetting (optics)

• Dust (environment)

Flats take care of the last three!

Page 6: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Next 5 images courtesy Steve Mazlin

Page 7: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables
Page 8: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables
Page 9: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

No flat

Page 10: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

After flat

Magic!

Page 11: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Part 2

The math!

Page 12: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

CCD calibration math

raw frame - dark frame

( flat frame - dark frame)Final frame =

Remove dark current noise

Very simple equation!

Brightens weak pixels, dims strong pixels

Normalized

Page 13: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Normalization

110

10090

100 Average value = 100

(Flat frame-dark frame) pixel values

pixel value

average valueNormalized value =

1

0.9

1.1

1

Done automatically in your image processing software!

Assumes that flat light source is even!

Page 14: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Applying the normalized flat to your image frame

302

305298

300

(Raw frame - dark frame) pixel values

1

0.9

1.1

1

275

305331

300

Calibrated frame

÷By normalized flat

Page 15: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Importance of dark subtraction

120

110100

1101

0.91

1.09

1

Assume 10 ADU of dark noise in the flat frame

Average: 110Raw flat frame

Overcorrected images!

Flat frame-dark frame

110

10090

100

Average: 100Subtract dark

1

0.9

1.1

1

Normalized values too low!

Page 16: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Importance of staying in linear regime

• If non-linear, pixel values will read less than actual value

• Normalized flat pixel value too small

• Flatted image pixel value too large: Overcorrected images!

# of photons arriving at detector

ADU values

Non-linear

linear

Page 17: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Characterizing linearity

• Aim at 6-9th mag star near the zenith• Expose series of images with increasing

exposure length• Measure flux inside aperture• Divide flux by exposure time to get

flux/sec• Will be similar at each exposure length

in the linear regime

Page 18: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

0.95

0.97

0.99

1.01

1.03

1.05

0 5000 10000 15000 20000 25000 30000

Max Pixel Value

5 second

10second

15 second

20 second

30 second

40 second

50 second

60 second

Figure 3. Detector linearity test. The normalized flux rate is linear to 1% up to maximum pixel values of around 23 kADU.

Page 19: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Noise considerations

• Make master bias/dark (s/n improves as the square root of the # of frames combined)

• Dark OR bias correct flats

• Million photon flats – 106/avg ADU = # of frames = 40 frames!

• No matter what, flats add some noise to final calibrated image

Page 20: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Part 3

How to get good flats

Page 21: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Acquisition methods

• All sky flats

• Light box

• Twilight flats

• Dome flat

• Electroluminescent panel

Page 22: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

What makes a good flat?

• Evenness of illumination• ADU values at upper range of

linear regime of CCD detector• Longer than 2 seconds to

eliminate shutter effect• Many dark subtracted sub frames• Repeatable filter wheel

positioning

Page 23: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

The rotation method for evaluating flats

• Expose / rotate 90˚/ expose

• Dark subtract and use second set as flats - “flatted flat”

• Look at histogram

• Analyze standard deviation ()

Page 24: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Basic statistics

• Poisson distribution of ADU values centered on a mean value

• Width of distribution measured by standard deviation,

• 99.7% of all values lie within 3 of the mean

3

Page 25: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Statistics II• For a given light source, range of values

is constant regardless of mean value!

10000

100

100/10000

1% uniformity

3 x better!

Histogram of flat (mean 10k ADU)

30000

100

100/300000.3% uniformity

Histogram of flat (mean 30k ADU)

Standard deviation is a measure of evenness of illumination!

Page 26: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

How many ADU is enough?

• Maximum value of any pixel must be in the linear regime of the chip.

• Anti-blooming chips go non-linear somewhere mid-range

• Non-linear pixels in flat will result in incorrect normalization

• Funny artifacts in flatted images

Good Statistics Non-linear pixels

Page 27: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

All sky flats

• Sum lots of images dithered to get enough ADU’s for good stats.

• Can be important for photometry or back illuminated chips because spectral response matches raw images

• Star artifacts difficult to remove completely• Tough with wide field images/big non-linear

stretches

Page 28: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

QuickTime™ and a decompressor

are needed to see this picture.

Light boxes

• Needs proper baffling and reflective illumination

• Careful attention to corner shadows

• Bulky and difficult to use robotically

Page 29: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Twilight flats

• Racing against the clock• Neutral point in sky is not fixed• Virtually guaranteed to have gradients

in wide field images• Possible star artifacts• Can you get all filters covered in one

twilight?• Quality is not repeatable!

Page 30: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Twilight flat case study

• April 2 2010

• Average transparency (clear sky clock)

• No visual signs of cirrus

• 12.5” RCOS with ST2000 (identical setup)

• Moon below horizon

Page 31: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Twilight flatted flat at Galaxy Quest

Standard deviation = 171 ADU

Page 32: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Dome flats

• Painted section of dome illuminated by light source

• Difficult to eliminate gradients

• Requires careful set up and testing

Page 33: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Dome flatted flat at SSRO

QuickTime™ and a decompressor

are needed to see this picture.

Standard deviation = 187 ADU

Data courtesy Jacob Gerritsen, SSRO

Page 34: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Electroluminescent panels

• Proper design ensures excellent flatness• Easy to diffuse• Compact• Not all panels are broad spectrum• Variation in manufacturing• Stability of power supply• Alnitak Astrosystems!

Page 35: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Flat-Man XL case study

Page 36: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

A dark subtracted sigma combined master flat

QuickTime™ and a decompressor

are needed to see this picture.

Page 37: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

“Flatted flat”

Standard deviation = 9.5 ADU!

Page 38: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Flat-Man XL Statistics

• For our test case: mean= 24271 ADU• Range of values 2 x 3 = 57 ADU• 57/24271 x 100% = 0.23% variation in

brightness!

Page 39: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Flat quality comparison

Flat illumination source Standard deviation

Twilight flat 171 ADU

Dome flat 187 ADU

Flat-Man XL 9.5 ADU !!!

Repeatable!

Page 40: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Spectrum of AA el panels

Page 41: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

Ha Flats

QuickTime™ and a decompressor

are needed to see this picture.

Courtesy Doug Baum (Flip-Flat owner) at Nightvision Astronomy

Page 42: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

DOs DON’Ts

• Use even illumination• Master dark/bias

subtract individual flat frames

• Sigma combine lots of calibrated flat frames

• Check your flat quality with the rotation method

• Overexpose into non-linear regime

• Apply noise reduction or smoothing

• Stretch histogram

Page 43: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

QuickTime™ and a decompressor

are needed to see this picture.

QuickTime™ and a decompressor

are needed to see this picture.

Flat -Man XL

$100 off on XL’s today and tomorrow

Page 44: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

QuickTime™ and a decompressor

are needed to see this picture.

Flip-Flat

$50 off today and tomorrow

Page 45: A flat fielding primer Pete Kalajian NEAIC 2010. My interests Exoplanet transits Oph Arcturus Spectroscopy Cataclysmic Variables

• 13” diameter EL panel• Wall or manually

mounted• USB controlled• For 8 - 12.5” telescopes• Shipping by May 1• $50 off today and

tomorrow

Flat-Man L