Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Lbc data reduction
1. LBC data reduction 1
with IRAF and SCAMP & SWARP 2
Poon Panichpibool3
December 27, 2015
1
Edited by Dr. Ricky Patterson.
2
SCAMP and SWARP by Dr. Emmanuel Bertin.
3
http://www.astro.virginia.edu/~pp9mx/
5. CONTENTS 1
Acknowledgements
• A special word of thanks goes to Professor Don Knuth1 (for TEX) and
Leslie Lamport2 (for LATEX).
• I’ll also like to thank Gummi3 developers and LaTeXila4 development
team for their awesome LATEX editors.
• I’m deeply indebted my parents, colleagues and friends for their sup-
port and encouragement.
Amber Jain
http://amberj.devio.us/
1
http://www-cs-faculty.stanford.edu/~uno/
2
http://www.lamport.org/
3
http://gummi.midnightcoding.org/
4
http://projects.gnome.org/latexila/
7. 1
Introduction
1.1 Required Software packages
There are several methods to reduce the LBC data. If you are proficient
with Python you can try these two methods
LBC_redux package by Dr. Neil Crighton.
https://github.com/nhmc/LBC_redux
LBC GUI piepline V 1.0 (Dec 2007) by Researchers at the INAF Astronom-
ical Observatory of Rome.
http://lbc.oa-roma.inaf.it/commissioning/data/LBCGUI_PIPELINE/index.
html#intro
If you want to use IDL, then you can try
LBC-reduction package by Dr. Benjamin Weiner is an alternative method.
https://github.com/bjweiner/LBC-reduction
However, in this LBC data reduction document, I will show you how to
use available software packages at the Astronomy department of the Uni-
versity of Virginia. You will require the following software packages and
files.
1. IDL (also need IDLUTILIS to be installed)
2. IRAF (CCDRED package)
3. SExtractor (should be already installed in the department pc)
4. SCAMP (should be already installed in the department pc)
5. SWARP (should be already installed in the department pc)
6. LBC translation files (lbc.dat and subssets)
7. Configuration files for SExtractor, SCAMP, and SWARP
3
8. 4 1. INTRODUCTION
LBC translation fiels and configuration files can be retrieved from https:
//github.com/poonpa/lbc.git
9. 2
Data Reduction with IRAF
Once you have retrieve all data from the LBT archive, the next step will be
getting IRAF to run all reduction process. In this part, I will use the steps
that I followed from Massey’s IRAF data reduction handbook: A User’s
Guide to CCD Reductions with IRAF http://iraf.noao.edu/iraf/ftp/
iraf/docs/ccduser3.ps.Z
Typical process of CCD data reduction is shown in Figure 2.1. First
of all, you should create a RAW images directory to store all your raw
data. Then create a processing directory to store copies of raw data. It
is critical to separate raw data from processing data since you can always
retrive untouched raw data in case you make a mistake on processing the
images.
Here are steps to reduce the LBC data with IRAF.
1. First, load the CCDRED package, which is the part of the IMRED
package:
2. Now you have to set up the setinstrument task and create subsets file.
To finish the setting up for setinstrument, you simply download "lbc.dat"
(Credit Mr. Scott Adams) and then store it in working directory or in
specific directory e.g. /net/home/pp9mx/iraf/agnproj/lbc/lbc.dat
5
10. 6 2. DATA REDUCTION WITH IRAF
This is what the lbc.dat looks like.
This "lbc.dat" will help IRAF to be able to understand and read the
header of your images. Next you have to set up the subsets file. the subsets
file will contain information about all filters for your images. This is what
the subsets file looks like.
Now do "epar setinstrument" to set up parameters correctly:
then do
ccdred> setinstrument
11. 7
Instrument ID (type ? for a list) (lbc):
And do "epar ccdred" (once you hit return/enter in the previous step,
IRAF will pop up epar ccdred automatically.)
3. Check if you set up the setintrument correctly by using "CCDLIST"
task. then do
ccdred> ccdlist *.fits
Here is what it shoule look like
You can see that ccdlist will tell information about each image such as
image type, and filter.
Once these images are processed then there will be processing codes
added into the output from ccdlist.
Here are processing codes:
B - Bad pixel replacement
O - Overscan bias subtraction
T - Trimming
Z - Zero level subtraction
D - Dark count subtraction
F - Flat field calibration
I - Illumination correction
12. 8 2. DATA REDUCTION WITH IRAF
Q - Fringe correction
4. CCDPROC steps. overall process for this step is shown in figure 2.1 i.e.
Starting with zerocombine to make a master bias, then overscan subtraction,
making a master flat, bias correction, and flat fielding/flat correction.
4.1 Now starting with making a master bias. It will be easier to create
a list of files by
ccdred> ls lbcb* > biasb.list then
ccdred> cat biasb.list
then do "epar zerocombine" to set up input and output. It should look like
this
4.2 Then run CCDPROC for the first round (to do overscan bias subtrac-
tion and Trimming). First you have to determine the section to be trimmed.
These information are in the image header which you can find by do "imhead
image l+".
For bias section, you should be looking for
BIASSEC = ’[2099:2304,1:4608]’ / Bias section
For trim section, you should be looking for
TRIMSEC = ’[51:2098,1:4608]’ / Section of useful data
Next do "epar CCDPROC" to edit parameters for CCDPROC process. It
should look like this
14. 10 2. DATA REDUCTION WITH IRAF
Now the CCDPROC is ready for the first. However, for the first run you
should run this step interactively to see if there is anything wrong with the
overscan region or not. You can run CCDPROC interactively by choosing
"yes" in (interact = ) line.
(interac= yes) Fit overscan interactively?
15. 11
Now all frames should have [OT] when run "CCDLIST" task.
4.3 Next, run "CCDPROC" again now with zerocorrection on.
(zerocor= yes) Apply zero level correction?
(zero = biasb.fits) Zero level calibration image
After the process is done, you should see [OTZ] after running the "CCDLIST"
task.
4.4 Next, create a master flat field by do "epar flatcombine" to edit pa-
rameters.
input = zlbcb* List of flat field images to combine
(output = bflat.fits) Output flat field root name
(combine= median) Type of combine operation
(reject = avsigclip) Type of rejection
(ccdtype= flat) CCD image type to combine
(process= no) Process images before combining?
(subsets= no) Combine images by subset parameter?
(delete = no) Delete input images after combining?
16. 12 2. DATA REDUCTION WITH IRAF
(clobber= no) Clobber existing output image?
(scale = mode) Image scaling
At the end of this flatcombine step, you will get a master flat field.
4.5 Now it’s time to run "CCDPROC" again but this time, the flatcor
will be turn on.
(flatcor= yes) Apply flat field correction?
(flat = bflat.fits) Flat field images
After the 2nd CDDPROC run finish, all images should have [OTZF]
showed up after runnung "CCDLIST" task.
ccdred> ccdlist FZ*.fits
FZlbcb.20150423.031814_2.fits[2048,4608][real][object][g_SLOAN][OTZF]:WISE_1046-
02
FZlbcb.20150423.032110_2.fits[2048,4608][real][object][g_SLOAN][OTZF]:WISE_1046-
02
Now your images are Overscan corrected, Trimmed, Bias subtracted, and
Flattened. The images are ready to be combined into the final image. In
order to combine all object frames, you will have to use SExtractor, SCAMP
SWARP to do Astrometry correction and stack all object images.
Here is the example of a combined object frame without using SCAMP
and SWARP to correct astrometry error. As you can see in Figure 2.2, stars
and galaxies are not matched with SDSS R-6 Catalog in DS9.
Steps to run SExtractor, SCAMP SWARP will be in the next chapter.
17. 13
Figure 2.2: A combined object frame without using SCAMP and
SWARP.Green circles are SDSS R-6 catalog positions of celestial objects.
If astrometry is corrected, the circles should be on top of objects in the
frame.
19. 3
Final step to combine object
frames
In the previous chapter all object frames are ready to be combined. How-
ever, if you display the object frame in DS9 and overlay with SDSS R-6
catalog or any optical catalog, you will notice that objects are not aligned
with catalog. The astrometic calibration must be done prior any combining
process since the projection of sky coordinates onto a detector CCD plane
is not perfect due to the basic geometry of the observation, effects from at-
mospheric refraction and distortions inroduced by the telescope and optical
instruments (shown in Figure 3.1). Therefore, astrometic correction need to
be implement before finally combine all object frames.
Overall steps will be
SExtractor ⇒ Retrieve catalog from all object frames
↓
SCAMP ⇒ use Retrieved catalogs and Reference catalog to get Astrometic
corrrection, stored in new header for each object frame.
↓
SWARP ⇒ use corrected header to "Swarp" each object frame in order to
achieve correct coordinates, then stack and combine all object frames.
↓
Now you have an astrometry corrected combined object fram ready to be
used!
1. Making catalog with SExtractor. In this step, you will use SEx-
tractor by Dr. Emmanuel Bertin (should be installed on the department’s
pc. You can also download SExtractor from http://www.astromatic.net/
15
20. 16 3. FINAL STEP TO COMBINE OBJECT FRAMES
Figure 3.1: Illustration of possible problems of astrometry.
21. 17
Figure 3.2: Flow diagram of Astrometic calibration using SExtractor,
SCAMP, and SWARP.
22. 18 3. FINAL STEP TO COMBINE OBJECT FRAMES
software/sextractor)
Starting with running SExtractor on all OTZF object frames. *Make
sure that you have all configuration files in the working directory. For this
step, you will use ldac.sex to create FIT_LDAC catalog file which is re-
quired by SCAMP.You will also need forscamp.param. Then do
vocl> !sex FZlbcr.20150420.110806_2.fits -c ldac.sex
Now you will have a FITS_LDAC catalog. Repeat this step for the rest of
object frames.
FZlbcr.20150420.110806_2.cat
FZlbcr.20150420.111050_2.cat
FZlbcr.20150420.111346_2.cat
FZlbcr.20150420.111622_2.cat
FZlbcr.20150420.111906_2.cat
Then make a list file of all 5 catalogs e.g. bcat.list and rcat.list
2. Running SCAMP to get astrometic calibration solution. First, you
have to make ".ahead files" for all object frames. Then you will create ".head
files" as well. Please note that you have to make sure that your object is
in the reference catalog. For instance, if the object can be found in SDSS
catalog then you can use SDSS R-6 reference catalog.
Next, do
vocl> !scamp @bcat.list -c makeahead.scamp
vocl> !scamp @rcat.list -c makeahead.scamp
23. 19
Then, do
vocl> !scamp @bcat.list -c default.scamp
vocl> !scamp @rcat.list -c default.scamp
Now you will have a astrometry corrected header files for each object
frame.
3. Running SWARP to stack astrometic calibrated object frames into a
combined image. Prior running SWARP, you also have to make a directory
called "resample" for SWARP to temporarily store resampled intermediate
images. If you forget to do so, SWARP will use original images to combine.
As a result, your combined image will have a wrong coordinates i.e. no
astrometic correction.
Next, after create list files for all object frames, do
vocl> !swarp @bim.list -c default.swarp
vocl> !swarp @rim.list -c default.swarp
*Note that you have to change the name of output file in default.swarp
(IMAGEOUT_NAME line and WEIGHT_OUT line).
Now you will have a final combined and astrometic calibrated image!
Nonetheless, you have to further confirm with reference catalog by display-
ing the combined image on DS9 and then overlaying with reference Catalog
such as SDSS R-6 or USNO A2. As shown in Figure 3.3, if the astrometic
calibration is done correctly, the overlay references should be on top of ob-
jects in the frame.
δ(R−I)2
=
1
1 − ∆a2
δr2
+ δi2
+ δa2
0,R + δa2
0,I + δa2
1,RX + δa2
1,IX + (R − I)(δa2
2,R + δa2
2,I)]
(3.1)
24. 20 3. FINAL STEP TO COMBINE OBJECT FRAMES
Figure 3.3: A combined object frame using SCAMP and SWARP. Magenta
circles are SDSS R-6 catalog positions of celestial objects.