CCD Photometry with Mathematica

Introduction Reduction Conversions Dates Display Image Headers Image Load Image Save Photometry

Table of Contents

CCDPhotometry`Reduction`

This package contains functions for reducing CCD FITS data in preparation for data extraction.

AverageFrame[files] Returns an average of FITS objects from a list of specified FITS objects.
SubtractFrame[file1, file2] Subtracts the data of file2 from file1 and returns a new FITS object with the header of file1.
NormalizeFlat[file] Assumes that file is a flat-field image and normalizes the field.
RemoveOverscan[file, {lb, ub}] Removes the overscan region specified from lowerbound, lb, to upper bound, ub, from the FITS data, file.
FlatField[imagefile, biasfile, normflatfile] Assumes that normflatfile is a normalized flat-field frame and divides the bias subtracted imagefile by the normflatfile.

Image Reduction for Files

AverageFrame[{imgobj1,...,imgobjn}] Returns an average of FITS objects from a list of specified FITS objects.
SubtractFrame[imgobj1, imgobj2] Subtracts the data of imgobj2 from imobj1 and returns a new FITS object with the header of imgobj1.
NormalizeFlat[imgobj] Assumes that imgobj is a flat-field image and normalizes the field.
RemoveOverscan[imgobj, {lb, ub}] Removes the overscan region specified from lowerbound, lb, to upper bound, ub, from the FITS data, imgobj.
FlatField[imageobj, biasobj, normflatobj] Assumes that normflatfobj is a normalized flat-field frame and divides the bias subtracted imageobj by the normflatobj.

Image Reduction for FITS Objects

This loads the package.

In[1]:=

Needs["CCDPhotometry`Reduction`"]

This loads packages for reading images and displaying them.

In[2]:=

Needs["CCDPhotometry`ImageLoad`"]

In[3]:=

Needs["CCDPhotometry`DisplayImage`"]

Now we load the image, bias, and flat-field frames

In[4]:=

rawimg = ImageLoad[ToFileName["CCDPhotometry", "May08_0132.fit"]]

Out[4]=

⁃FITSObject⁃

In[5]:=

img = RemoveOverscan[rawimg, {1, 512}]

Out[5]=

⁃FITSObject⁃

In[6]:=

bias = ImageLoad[ToFileName["CCDPhotometry", "avgbias.fit"]]

Out[6]=

⁃FITSObject⁃

In[7]:=

rawvflat = ImageLoad[ToFileName["CCDPhotometry", "avgvflat.fit"]]

Out[7]=

⁃FITSObject⁃

We can view them

In[8]:=

Show[GraphicsArray[{DisplayImage[img, DisplayFunctionIdentity], DisplayImage[bias, D ... layFunctionIdentity]}], DisplayFunction$DisplayFunction, ImageSize500] ;

[Graphics:HTMLFiles/reduction_13.gif]

We can bias subtract the raw flat-field frame.

In[9]:=

vflat = SubtractFrame[rawvflat, bias]

Out[9]=

⁃FITSObject⁃

This is how a normalized flat-field frame is created.

In[10]:=

normvflat = NormalizeFlat[vflat]

Out[10]=

⁃FITSObject⁃

This is how the image frame is flat-fielded.

In[11]:=

final = FlatField[img, bias, normvflat]

Out[11]=

⁃FITSObject⁃

We can view the reduced image, ready for data extraction.

In[12]:=

DisplayImage[final] ;

[Graphics:HTMLFiles/reduction_21.gif]

By adjusting the PlotRange, we can change the contrast revealing internal details.

In[13]:=

DisplayImage[final, PlotRange {75, 2500}] ;

[Graphics:HTMLFiles/reduction_23.gif]

HOME


Created by Mathematica  (October 24, 2004) Valid XHTML 1.1!