Swope e2v Reductions
Photo by Yuri Beletsky, Las Campanas Observatory
Our Magellanic Cloud WR Survey is using the new Swope e2v camera.
The IRAF scripts e2v14.cl (2014) and e2v.cl (2015+) that will automatically reduce a night's of data assuming that you have bias frames and flat-field exposures (sky flats are preferred) all in the same directly. To run it, you must first load imred and ccdred, and do a "setinstrument direct". The program will mosaic the four quadrants together and leave you with 4110x4096 images transposed such that N is up and E is to the left.
Here's what is under the hood, and why.
IRAF is very header-driven, and unfortunatley some of the e2v header details are not consistent with what IRAF expects. Some particular problems are:
The first two columns of each quadrant are actually wrap-arounds from the ovverscan at the end. Thus, the true trim and bias sections differ from what
is in the header.
Furthermore, this means that the DATASEC is incorrect, and will mess up any
reduction efforts.
Here is our full procedure:
- Fix critical header issues:
- For 2014 data (first run with e2v):
- Replace trimsec with [3:2050,2:2056]
- Replace biassec with [2052:2175:2:2056]
- For 2015 data (second year with e2v):
- Replace trimsec with [1:2048,2:2056]
- Replace biassec with [2058:2175,2:2056]
- Remove DATASEC
- Remove the overscan and trim the images using ccdproc
- Flip the each quadrant so that N is to the left and E is to the
bottom (same orientation as c1), perform a correction for non-linearity,
and then merge them into a single image:
- Construct a blank 4096x4110 image ccdXXXXf.fits using imexp
- ccdXXXXc1.fits[*,*]--->tempc1--->ccdXXXXf.fits[1:2048,1:2055]
- imcopy ccdXXXXc2.fits[-*,*]--->tempc2--->ccdXXXXf.fits[2049:4096,1:2055]
- imcopy ccdXXXXc3.fits[-*,-*]-->tempc3--->ccdXXXf.fits[2049:4096,2056:4110]
- imcopy ccdXXXXc4.fits[*,-*]--->tempc4---> ccdXXXXf.fits[1:2048,2056:4110]
- Note that in the "temp" versions get corrected for non-linearity using
e2vlincor, based upon the analysis of Carlos Contreras; details can be found at http://csp2.lco.cl/manuals/swo_nc_linearity.php. Basically for each chip ADU_corr=ADU_old x b x [1 + c x (ADU_old/32000) + d x (ADU_old/32000)**2]. The non-linearity part of this (what is in the bracket) is 1.4% (c3) to 4.5% (c1). The correficients we adopted come from tests performed on
August 24, 2014:
Quad |
b |
c |
d |
c1 |
1.1150 |
-0.0338 |
+0.0057 |
c2 |
1.0123 |
-0.0123 |
+0.0017 |
c3 |
1.0000 |
-0.0099 |
+0.0014 |
c4 |
1.0707 |
-0.0163 |
+0.0027 |
Nidia remeasured this on Nov 17, 2017, and I remeasured them again on Dec 5, 2017. I used both the standard procedure and doubling the exposure time (with half the flux) to see if the lack of a shutter correction was affecting things. Nidia's results were a bit different; mine agreed with the old ones such that the ratio from 60,000 to 100 agreed to 0.001 for the three tests. We standardized on the original values. All numbers can be found here.
Make of that what you will: things are now more linear by 0.5%.
- Move the header from c2 over using hfix
- Transpose the image so that N is up and E is to the left. This requires an imtranspose(old[-*,*],new) and is the same as rotating the image 90 deg clockwise.
- Fix a variety of header issues:
- Add "UT" based on "UT-TIME"
- Add "GAIN" based on "EGAIN"
- Add "RDNOISE" based on "ENOISE"
- Replace the value for EPOCH with what is in EQUINOX
- Remove CCDSEC
- Fix the ST in the header
- Add the Julian Date (just for fun)
- If an averaged bias frame "Zerof.fits" doesn't already exist in the
directory, create one by combining all of the bias expsoures.
- Subtract the bias frame from all of the ccdXXXXf.fits frames.
- If averaged flat fields "Flat*.fits" don't already exist in the directory,
create them by combining all of the flat exposures.
- Normalize the flat-field and divide into the program frames using ccdproc.