YALO Optical - October 2000

YALO Optical Channel notes

Data from 3 Oct 2000

In the first two weeks of Sept 2000, Darren has fixed the optical channel. It now reads out in full 2048 mode. See:

http://www.astronomy.ohio-state.edu/YALO/news.html

Some changes:

gain = 3.6 electrons/ADU
readout noise = 11 electrons (rms)
saturation (full well) is at about 85000e- or 24000ADU for this gain.

 

      In Oct 2000, I measured:      
  biwgt sig med N
  3.510 0.234 3.538 69
  10.542 0.877 10.633 69
  In March 2001,      
  3.526 0.233 3.538 148
  11.284 1.195 11.335 148

In April 2002, I find:

       right amp   left amp  
  3.472 0.168 3.460 78 3.481 0.276 3.495 78
  16.720 2.109 16.312 78 15.301 1.251 15.408 76

I measured (1529,1021)ccd=(512,512)ir The scale between the CCD and IR is 1.338 (roughly), implying the optical scale is 0.298"/pix.

The format is now read out as [1:2144,1:2048]. The actual format is strange. There are 32 pixels of bias, followed by 16 of "hardware
underscan" followed by 1024 pixels in the serial direction. Thus:

       Darren's numbers
  BIASSEC1 [1:32,1:2048]
  hardware overscan [33:48,1:2048]
  DATASEC1 [49:1072,1:2048]
  DATASEC2 [1073:2097,1:2048]
  hardware overscan [2098:2112,1:2048]
  BIASSEC2 [2113:2144,1:2048]
  TRIMSEC [49:2096,1:2048]

 

I think these are slightly wrong, because the DATASEC2 is 1025 pixels and the hardware overscan is 15. I have changed these slightly to give a 2048:2048 readout. I have also modified the biassec values slightly because there is DC rolloff. My numbers:

string     bias1     {"[8:32,1:2048]", prompt='bias for left amp'}
string     bias2     {"[2113:2142,1:2048]", prompt='bias for right amp'}
string     trim1     {"[49:1072,1:2048]", prompt='trim for left amp'}
string     trim2     {"[1073:2096,1:2048]", prompt='trim for right amp'}
string     trim      {"[49:2096,1:2048]", prompt='Header info for trim'}

I have written a task called "ccdyalo" task ccdyalo = home$scripts/ccdyalo.cl

which will tear apart the CCD image in two, do the overscan and trim and join them back into one image as [OT]. After that, you must finish the processing with ccdpr, turning on [ZF]

In Feb 2001, the images were [2152:2048]. Someone had changed the overscan from 32 to 36pix. There is a fits keyword which gives this -  OVERSCNX. It always should be 32. If it is 36, use:


lpar ccdyalo

images = "ccd010306.00??.imh" input images
(bias1 = "[8:32,1:2048]") bias for left amp
(bias2 = "[2121:2150,1:2048]") bias for right amp
(trim1 = "[53:1076,1:2048]") trim for left amp
(trim2 = "[1077:2100,1:2048]") trim for right amp
(trim = "[53:2100,1:2048]") Header info for trim
(trim4 = "[1039:2060,1039:2061]") trim for ur amp
(prefix = "r") Prefix for reduced data
(niter = 3) Number of iterations for bias
(reject = 2.5) Low and high sigma rejection
(imglist = "tmp$tmp15262gb")  
(mode = "ql")  

 

 

DATA REDUCTION:

-3. You will be using a package I defined: nickcl. To use this easily put in the "login.cl" (not loginuser.cl) the following:

reset nickcl = /uw50/nick/nickcl/
task nickcl.pkg = "nickcl$nickcl.cl"

 

-2. Make sure you have aliases setup for the data:

We will use a directory structure as:

We will use a directory structure as:

              /uw54/nick/sn/sn01cn
  |
  |
  20010630
  |
  ------------------------------------------------
  |     |
  |     |
  opt     ir

.daophot
# sn99em
setenv i20010630 /uw54/nick/sn/sn01cn/20010630/ir
alias i20010630 "cd $i20010630"
setenv o20010630 /uw54/nick/sn/sn01cn/20010630/opt
alias o20010630 "cd $o20010630"

You can also set them up for IRAF as:

loginuser.cl:
set o20010630 = /uw54/nick/sn/sn01cn/20010630/opt/
set i20010630 = /uw54/nick/sn/sn01cn/20010630/ir/

1. Make a setup file that points to a unique uparm:

copy /uw50/nick/daophot/optfiles/yalo/opt/setup .

setup:

set stdimage = imt2048
set uparm = /uw50/nick/uparm/yaloccd/

noao
ctio
nickcl
imred
digi
apphot
astu
ccdred
ccdred.instrument = "myiraf$yalo_ccd.dat"
ccdred.ssfile = "myiraf$yalo_ccd.sub"
loadit.format = "2048"
loadit.statsec = "700:800,700:800"

keep


Run:
cl < setup

2. Change to imh

cpimh *.fits del+

3. Fix the header and add the JD and AIRMASS correctly.

You can run "yalohead" to do the addition of epoch, ctio, and jd-old. It also runs setjd and setairmass.

yalohead ccd*.imh

If you need to run setjd or setairmass:
files ccd*.imh > in1
setjd @in1 date="UTDATE" time="UT" exposure="EXPTIME" epoch="EQUINOX"
setairmass @in1

The secz and airmass should be about the same, or something is wrong:
hsel r*.imh $I,airmass,secz yes
setjd @in1 date="UTDATE" time="UT" exposure="EXPTIME" epoch="EQUINOX"

4. Run ccdyalo on all the data.

This will make [OT] images called rccd*.imh. Make sure the raw images are format [2144,2048], or ccdyalo will not work correctly.

ccdyalo ccd*.imh

5. There are lots of wild pixels. Run:

imrep rccd*.flat?.imh value=65535 lower=65535 upper=INDEF
imrep rccd*.flat?.imh value=0 lower=INDEF upper=-100

5.5 If there are U twilight skies, you must combine these using "flatcomb"

flatcomb rccd011217skyu*.imh
imren FlatU rccd011217.flatu.imh

6. Now run ccdpr on the data. Run ccdlist first to see if the filters and imagetyp are correct.

ccdl rccd*.imh

Then a dry run:

ccdpr rccd*.imh nop+

Then

ccdpr rccd*.imh

images = "rccd*.imh" List od CCD images to correct
(output = "") List of output CCD images
(ccdtype = "") CCD image type to correct
(max_cache = 0) Maximun image caching memory (in Mbytes)
(noproc = no) List processing steps only?\n
(fixpix = no) Fix bad CCD lines and columns?
(overscan = no) Apply overscan strip correction?
(trim = no) Trim the image?
(zerocor = yes) Apply zero level correction?
(darkcor = no) Apply dark count correction?
(flatcor = yes) Apply flat field correction?
(illumcor = no) Apply illumination correction?
(fringecor = no) Apply fringe correction?
(readcor = no) Convert zero level image readout correction?
(scancor = no) Convert flat fiel image to scan correction?\n
(readaxis = "line") Read out axis (column|line)
(fixfile = "") File describing the bad lines and columns
(biassec = "") Overscan strip image section
(trimsec = "") Trim data section
(zero = "rccd*.bias") Zero level calibration image
(dark = "") Dark count calibration image
(flat = "rccd*.flat?.imh") Flat field images
(illum = "") Illumination correction images
(fringe = "") Fringe correction images
(minreplace = 1.) Minimum flat field value
(scantype = "shortscan") Scan type (shortscan|longscan)
(nscan = 1) Number of short scan lines\n
(interactive = yes) Fit overscan interactively?
(function = "median") Fitting function
(order = 8) Number of polynomial terms of spline pieces
(sample = "*") Sample points to fit
(naverage = 1) Number of sample points to combine
(niterate = 3) Number of rejection iterations
(low_reject = 2.5) Low sigma rejection factor
(high_reject = 2.5) High sigma rejection factor
(grow = 0.) Rejection growing radius
(mode = "ql")  

The data are now reduced to [OTZF].

7. To create the *.inf file. First I like to make the names shorter, because I have fat fingers.

imren rccd010630.0*.imh %rccd010630.0%r%*.imh (or whatever)

del in*
del junk*
files r???.imh > in1
hsel @in1 $I,CCDFLTID,utmiddle,airmass,exptime,hjd,title,ha yes > junk.dat
!$myprog/prog3a junk.dat

use:
/uw50/nick/daophot/irafstuff/filters_yalo.dat

8. You can run fixpix on the data, if you want to make pretty images.

Dont do this on the data you will use to measure photometry.

fixpix r???.imh mask=mask.pl

9. Divide by the mask image (see below if you don't have a mask image).

You only need to make a mask every few weeks or so. Don't waste your time doing lots of masks! If the mask image has good=0, bad=1, you must first do:

imar r???.imh / maskdao r???.imh divzero=65535

 

MAKING THE MASK

To avoid confusion with the badpixels, I am going to reduce these data always into 2048:2048, and merely mask off the bad pixels.

badpix:
# badpix for reduced data format YALO CCD [2048,2048]
#BIASSEC1 [8:32,1:2048]
#BIASSEC2 [2113:2142,1:2048]
#DATASEC1 [49:1072,1:2048]
#DATASEC2 [1073:2096,1:2048]
#TRIMSEC [49:2096,1:2048]
# oct 2000 nbs

      207 207 758 2048
  303 312 1600 2048
  970 970 1116 2048
  976 977 1428 2048
  1168 1168 1822 2048
  1564 1567 1901 2048
  1594 1595 1 2048
  1606 1606 1 2048
  1610   1610 1 2048
  1661 1662 810 2048
  1686 1686 148 2048
  1689 1690 1200 2048
  1875 1876 857 2048
  1908 1908 1658 2048
  1955 1956 1865 2048
  1962 1964 573 2048
  1972  1972 725 2048

 

badpix1:
# badpix for raw data format YALO CCD [2144,2048]
#BIASSEC1 [8:32,1:2048]
#BIASSEC2 [2113:2142,1:2048]
#DATASEC1 [49:1072,1:2048]
#DATASEC2 [1073:2096,1:2048]
#TRIMSEC [49:2096,1:2048]
# oct 2000 nbs

     255 255 758 2048
  351 360 1600 2048
  1018 1018 1116 2048
  1024 1025 1428 2048
  1216 1216 1822 2048
  1612 1615 1901 2048
  1642 1643 1 2048
  1654 1654 1 2048
  1658 1658 1 2048
  1709 1710  810 2048
  1734 1734 148 2048
  1737 1738 1200 2048
  1923 1924 857 2048
  1956 1956 1658 2048
  2003 2004 1865 2048
  2010 2012 573 2048
  2020 2020 725 2048

Two steps. Id the bad cols and histogram the low pixels.

First step. Find the low pixels. Copy a flat field into temp1. Fix the bad columns.

imcopy rccd*.flatv test
copy /uw50/nick/daophot/irafcl/yalo/opt/mask?.cl .

Now run the mask commands.

mask1.cl
#
string img
real midpt

img = "temp"

imdel("temp*.imh,mask1.imh", >>& "dev$null")
imstat(img//"[100:1900:10,100:1900:10]",fields="midpt",form-) | scan(midpt)
print(img," ",midpt)
imar(img,"/",midpt,"temp1")
fixpix temp1 mask=/uw50/nick/daophot/mask/badpix_yalo4
# remove features in the column direction
imcopy temp1[*,1000:1200] temp2
fit1d temp2 temp3 fit ax=2 nav=-2048 interact- fun=leg
sleep 3
blkavg    temp3    temp4    1   2048
blkrep    temp4    temp5    1  2048
imar temp1 / temp5 temp6
# remove features in the line direction
imcopy temp6[1400:1600,*] temp7
fit1d temp7 temp8 fit ax=1 nav=-2048 interact- fun=leg
sleep 3
blkavg    temp8     temp9     2048    1
blkrep    temp9    temp10    2048    1
imar temp6 / temp10 temp11
# now look at historgram
imcopy    temp11[150:1900,10:2038]    temp12
imhist    temp12   z1=0.0   z2=1.5   nbins=100
imhist    temp12   z1=0    z2=1   nbins=20 list+
displ temp11 1 zs- zr- z1=0.5 z2=1.5

mask2.cl
# now make mask image: good=0, bad=1
# I figure if a pixel is only transmitting 0.50 of the flux, it's bad.
imcopy temp11 mask1
imrep mask1 -1 lower=INDEF upper=0.50
imrep mask1 -1 lower=1.2 upper=INDEF
imrep mask1 0 lower=0.50 upper=1.2
imar mask1 * -1 mask1
# mask out some of the bad parts of the chip
# the last 150 cols seem to be affected by bad CTE. See the flats.
imrep mask1[1:28,*] 1 lower=INDEF upper=INDEF
#
# there is some weirdness going on at the rhs of the chip. Bad CTE?
#
#imrep mask1[1940:2048,*] 1 lower=INDEF upper=INDEF
imrep mask1[2015:2048,*] 1 lower=INDEF upper=INDEF
imrep mask1[*,1:14] 1 lower=INDEF upper=INDEF
imrep mask1[*,2038:2048] 1 lower=INDEF upper=INDEF
#
hedit mask1 title "Mask image for YALO 2048:2048 mode" ver-
displ mask1.imh 1 zs- zr- z1=0 z2=1

Now make the other mask image. Here badpix is the reduced data pixmap.
0=good,1=bad


Now merge the two masks:
mask3.cl:

badpiximage daop$/mask/badpix_yalo4 mask1 mask2 good=0 bad=1
imar mask1 + mask2 mask
imrep mask 1 lower=0.01 upper=INDEF
imcopy mask.imh mask.pl
hedit mask.pl title "Mask image for YALO 2048:2048 mode" ver-
#imdel mask1.imh,mask2.imh
# make daomask with 0=bad, 1=good
imar mask.imh * -1 maskdao
imar maskdao + 1.0 maskdao
displ maskdao.imh 1 zs- zr- z1=0 z2=1

There are still some low pixels that can be seen on reduced data. Maybe we need to add these to the mask.

If you are going to divide by the mask, don't forget to do it now!

 

BFIND, DAOGROW, DAOMATCH, DAOMASTER, FETCH:

Before you start DAOPHOT you should decide if the images, espeically B, are too weak to use the individual frames. In very few cases you will have to combine the data (instructions at the end of this cookbook). If you need to combine, do so now. After you combine, do the follwoing bookkeepping:

a. copy the r*.imh,s*.imh individual image to "old".
b. Edit the *.inf to add the new combined images. Just copy one of
the r*.imh B images to the end of the file and rename it to the
SN*.imh images.

0. Copy *.opt files, landolt.lib, *.clb (tfm) files.

copy /uw50/nick/daophot/optfiles/yalo/opt/*.opt .
copy /uw50/nick/daophot/optfiles/yalo/opt/yalo.clb .
copy /uw50/nick/daophot/optfiles/yalo/opt/landolt.lib .
copy /uw50/nick/daophot/optfiles/yalo/opt/t1.cl .

Rename the *.clb file to the alias of the directory:
mv yalo.clb o20010706.clb

daophot.opt:

        Read noise = 3.5
  Gain = 3.2
  FWHM = 6.0
  Fitting radius = 6.0
  PSF radius = 22
  Analytic model PSF = 3
  Variable PSF = 2
  Extra PSF cleaning passes = 5
  High good datum = 20000
  Watch progess = -2
  Thershold = 7

photo.opt:

    A1 = 6.0000
  A2 = 6.4494
  A3 = 7.1234
  A4 = 8.0221
  A5 = 9.1455
  A6 = 10.4935
  A7 = 12.0662
  A8 = 13.8636
  A9 = 15.8857
  AA = 18.1325
  AB = 20.6039
  AC = 23.3000
  IS = 24
  OS = 35

 

allstar.opt:

        Fitting Radius = 6.0
  IS (Inner sky radius)) = 2
  OS (Outer sky radius) = 25
  Redetermine Centroids = 1


yalo.tfm:
M1=I1+I2
M2=I1
M3=I1-I3
M4=I1-I4
I1=M2
I2=M1-M2
I3=M2-M3
I4=M2-M4
O1 = M1 + A0 + A1*I2 + A2*X + A3*T
O2 = M2 + B0 + B1*I2 + B2*X + B3*T
O3 = M3 + C0 + C1*I3 + C2*X + C3*T
O4 = M4 + D0 + D1*I4 + D2*X + D3*T
A3=0. m:b,v,r,i
B3=0. i:V,B-V,V-R,V-I
C3=0.
D3=0.

yalo.clb (2001 value):
M1=I1+I2
M2=I1
M3=I1-I3
M4=I1-I4
I1=M2
I2=M1-M2
I3=M2-M3
I4=M2-M4
O1 = M1 + A0 + A1*I2 + A2*X + A3*T
O2 = M2 + B0 + B1*I2 + B2*X + B3*T
O3 = M3 + C0 + C1*I3 + C2*X + C3*T
O4 = M4 + D0 + D1*I4 + D2*X + D3*T
A3=0. m:b,v,r,i
B3=0. i:V,B-V,V-R,V-I
C3=0.
D3=0.

  A0 = 3.5464 0.0035 << 26.5 1   5.14
  A1 = -0.0792 0.0030 << 3.5 2 1.32
  A2 = 0.2724 0.0067 << 8.0 1 2.82
  B0 = 3.8351 0.0035 << 12.3 1 3.51
  B1 = 0.0175 0.0030 << 0.3 2 0.36
  B2 = 0.1587 0.0052 << 2.6 1 1.62
  C0 = 3.9243 0.0036 << 9.5 1 3.08
  C1 = -0.0303 0.0050 << 1.4 2 0.85
  C2 = 0.1038 0.0065 << 2.2 1 1.49
  D0 = 4.6886 0.0037 << 0.0 1 0.22
  D1 = 0.0452 0.0030 << 0.4 2 0.47
  D2 = 0.0636 0.0058 << 4.8 1 2.19


2. Measure the FWHM as:

del junk.dat
del in*
files r???.imh,SN*.imh > in1
yaloshift @in1

etc.
Then run

!$myprog/prog39yalo junk.dat

This outputs fwhm.dat and fwhm1.dat. Use fwhm1.dat.

Edit fwhm1.dat to have the appropriate psf variation. If there are lots of stars in the frame, use VAR=1 or 2. If not, use VAR=0.

3. If you have standards, run BFIND2,using thresh about 10 for the bright stars.

For SN data, run BYALO. This will do BPASS2 and
FINAL2. Use threshold of 8. For most data you can use a var of 2.

If you use BPASS2 alone, edit the psf using:

!$myprog/prog11a r042 99

or use dals, etc.

If the SN or an important star was missed, run addals to add the object by hand.

If the star was too faint, we will have to combine the data. I will write a procedure on how to do that later. It is just like the IR
mosaic stuff.

4. If you are doing aperture phot, make the *.lis file as ls -1 *.ap > feb04.lis.

The *.lis file should have the same number of lines as the
*.inf file. You can check this as wc feb04.lib feb04.inf

ls -1 *ap > .lis

5. Then run DAOGROW. I used 3 unknowns. Last 2 are 0.9 and 0. I used 0.03mag error limits. This produces *.tot files.

6. Run DAOMATCH and DAOMASTER to make the tables for each field.

This produces *.mch files for each field. To do this:

del in*
files r???.imh,SN*.imh > in1
hsel @in1 $I,title yes
hsel @in1 $I,title yes | grep "2001du" - | fields - 1 > indu
hsel @in1 $I,title yes | grep "2001cz" - | fields - 1 > incz
hsel @in1 $I,title yes | grep "2001cn" - | fields - 1 > incn
hsel @in1 $I,title yes | grep "2001bt" - | fields - 1 > inbt
hsel @in1 $I,title yes | grep "2001X" - | fields - 1 > inx

Use yalocenter to make a junk file with shifts and run the following program. Put "als" or "tot" as needed.

!$myprog/prog52b junk.dat als

This asks if you want to run daomaster. Do it.

!/uw50/nick/daophot/perl/daomaster.pl r032.mch

7. Display each first image in the *.mch files. Run the iraf task "fetch" and then the fortran task "fetch" to make the *.fet files.

The IRAF fetch inputs either an "a" key or an "x" key. Use the "a" key if the object looks like it can be centered. If the object is near a bad pix, use the "x" key.

I have written a program to speed up the fetch part. I have copied *.fet files to the SN directories. For the YALO data, the difference
between nights is merely a shift. Calculate a shift between your present image (using imexam) and a given fet star near the center of
the chip. Calculate (xnew-xold_fet,ynew-yold_fet). Then run:

!$myprog/prog54 /uw52/nick/sn/sn01x/opt/SN2001x.fet r032 75 -7
!$myprog/prog54 /uw52/nick/sn/sn01bt/opt/SN2001bt.fet r032 75 -7
!$myprog/prog54 /uw52/nick/sn/sn01cn/opt/SN2001cn.fet r032 75 -7
!$myprog/prog54 /uw52/nick/sn/sn01cz/opt/SN2001cz.fet r032 75 -7
!$myprog/prog54 /uw52/nick/sn/sn01du/opt/SN2001du.fet r032 75 -7
!$myprog/prog54 /uw52/nick/sn/sn01el/opt/SN2001el.fet r032 75 -7

This will output a file called r032.fet which is the correct fet file. This way yoy don't have to id the stars every time. I have placed an image (/4, converted to short format) in these directories that correspond to the *.fet file

8. If you are not doing standards, run REDUCE.

The daophot.pl program created the *.tfr file. So all you need are the follwoing inputs to REDUCE:

o20010706 (inf)
r044 (mch)
E
sn2001x.net
r044 (fet)

REDUCE inputs the *.net file. The file must be less than 30 char, so
it is best to copy it from the central directory.

copy /uw52/nick/sn/sn01x/opt/SN2001x.net .
copy /uw52/nick/sn/sn01cn/opt/SN2001cn.net .
copy /uw52/nick/sn/sn01cz/opt/SN2001cz.net .
copy /uw52/nick/sn/sn01bt/opt/SN2001bt.net .
copy /uw52/nick/sn/sn01du/opt/SN2001du.net .

Plot the data with the sm macro as below.

8. Now, if you are doing standards, enter the data into COLLECT.

Use prog43 to speed things up.

!$myprog/prog43 ccd12.mch

9. Run CCDSTD and CCDAVE.

There is a variation here. We are going to try to reduce the YALO optical channel the day after it is taken. To do this, we will need to reduce the SN with respect to local standards - but we may not have local standards. In this case we do one of two things:

a. If a night is photometric with at least one standard observed, reduce the data with CCDSTD/CCDAVE with only the zero points free. Run CCDAVE to get the *.net file of standards.

In most cases, there will not be enough standards to redo the solution with CCDAVE. One can use the few standards however, to tweak up the solution for that night. The solution is of the form:

                  A0 = 3.592 0.0035 << 26.5 1 5.14
  A1 = -0.0792 0.0030 << 3.5 2 1.32
  A2 = 0.2724 0.0067 << 8.0 1 2.82
  B0 = 3.899 0.0035 << 12.3 1 3.51
  B1 = 0.0175 0.0030 << 0.3 2 0.36
  B2 = 0.1587 0.0052 << 2.6 1 1.62
  C0 = 3.9243 0.0036 << 9.5 1 3.08
  C1 = -0.0303 0.0050 << 1.4 2 0.85
   C2 = 0.1038 0.0065 << 2.2 1 1.49
  D0 = 4.705 0.0037 << 0.0 1 0.22
  D1 = 0.0452 0.0030 << 0.4 2 0.47
  D2 = 0.0636 0.0058 << 4.8 1 2.19

 

To tweak the solution, do the following

Calculate the mean differences between the library (*.lib) and output (*.net) values. I have a program called prog55b. This inputs the two files and sorts on the name. It outputs the mean differences (use cols 26,45,63,80 for V, B-V, V-R, and V-I)

!$myprog/prog55b landolt.lib o20010710.net

Then tweak as:

A0 ==> AO - (d(B-V)+d(V))
B0 ==> B0 - d(V)
D0 ==> D0 - (d(V)-d(V-I))

and rerun CCDAVE.

b. If a night is photometric but no standards were taken, enter the data with COLLECT, use the latest *.clb file for YALO, and run the data through CCDAVE to get the *.net file. We will use this file for quick reductions. Use:

!$myprog/prog43 r011

c. If the nights are not photometric, find a star in the USNO catalog using ALLADIN (via NED) to get a rough mag. Then just do simple differential photometry in V until we get a grid of standards.

10. Finally, enter the data in a file like sn2001cn.dat and plot it using SM macros.

p1.sm:
#
# ctype plot on a single page - optical SN01cn
#
erase
ctype black
lweight 3
expand 1.0
LOCATION 4000 31000 4000 31000
limits 2050 2150 20 13
expand 2
box
xlabel JD + 2450000
ylabel mag \it(B+0.5, V, R-0.5, I-1)
#
# YALO and 36" data
#
data sn2001cn.dat
lines 2 999
read { jd 1 x 3 y 4 v 5 ev 6 bv 7 ebv 8 vr 9 evr 10 vi 11 evi 12 }
expand 3.0
set b = v + bv
set r = v - vr
set i = v - vi
# B
set b = b + 0.5
ctype blue
ptype 30 3
points jd b
# V
ctype green
ptype 30 3
points jd v
# R
set r = r - 0.5
ctype red
ptype 30 3
points jd r
# I
set i = i - 1
ctype black
ptype 30 3
points jd i
#

11. Clean up the disk by running

cleanupdao
cleanup
del junk*

and
cleanpix

DONE!

 

If the SN is too faint, there are two options. Option 1 is the best.

Option 1.

1. For most of the data, there will be at least 3 frames. Generally it is the U or B data that are the weakest.

hsel @inx $I,CCDfltid yes | grep "B" - | fields - 1 > inxb
hsel @inbt $I,CCDfltid yes | grep "B" - | fields - 1 > inbtb
hsel @incn $I,CCDfltid yes | grep "B" - | fields - 1 > incnb
hsel @in1 $I,CCDfltid yes | grep "U" - | fields - 1 > inu
# hsel @inx $I,CCDfltid yes | grep "V" - | fields - 1 > inxv
# hsel @inx $I,CCDfltid yes | grep "I" - | fields - 1 > inxi
# hsel @inx $I,CCDfltid yes | grep "R" - | fields - 1 > inxr
ccdsky @inxb run+
cl < sub.cl
==> VERY IMPORTANT!!
!mv inxb temp ; sed s/r/s/ temp > inxb ; rm temp
!mv inbtb temp ; sed s/r/s/ temp > inbtb ; rm temp
!mv incnb temp ; sed s/r/s/ temp > incnb ; rm temp

2. Shift the frames.

del junk.dat
yalocen @inxb
!$myprog/prog48a junk.dat
cl < shift.cl

displ temp10 1 zs- zr- z1=-25 z2=250
displ temp11 2 zs- zr- z1=-25 z2=250

etc.

3. Combine the frames. First run noise model to get the correct values.

stsdas
hst
wfpc
noisem s021

Then combine as:

t1.cl
imdel t.imh,t.pl
# B
imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-200 hth=60000 \\
gain=3.2 rdn=11 snoise=0.20 lsig=4 hsig=4 blank=65535
displ t.imh 1 zs- zr- z1=-20 z2=250
displ t.pl 2

imren t.imh SN2001xb.imh
imren t.pl pl/SN2001xb.pl

Remove the header keyword to the BPM file:

hedit SN*.imh BPM del+

4. Do the following bookkeeping:

a. Edit the "inx" file to remove the indivudaul B frames and add this new combined frame.

b. Update the *.inf file. No need to get rid of the old B frames here.

c. Update the *.mch file if needed.

 

Option 2.

1. Run ALLFRAME. To do this, you need a *.tfr file, a *.mag file (both output from DAOMASTER), and the allframe.opt file:

allframe.opt:

               CE (CLIPPING EXPONENT) = 6.00
  CR (CLIPPING RANGE) = 2.50
  GEOMETRIC COEFFICIENTS = 6
  MINIMUM ITERATIONS = 5
  PERCENT ERROR (in %) = 0.75
  IS (INNER SKY RADIUS) = 2
  OS (OUTER SKY RADIUS) = 30
  WATCH PROGRESS = 2
  MAXIMUM ITERATIONS = 50
  PROFILE ERROR (in %) = 5.00


For the mag file, I run it through DAOPHOT once , sort it on y ("3") and renumber. This is not important.

2. Queue the allframe task with BALLFRAME. I found it took about 40min per set to run in batch.

3. After it is done, run

!$myprog/prog45 r055

This creates a file you run as

source r055.cl

which removes the old *.als and *.mag files and copies the *.alf and
*.nmg files to those positions.

4. Then redo the *.tfr file as

!/uw50/nick/daophot/perl/daomaster.pl r032.mch

back to top