YALO IR - March 2001

Yalo IR Channel notes
Basic Calibration for your Data - March 2001

 

DATA REDUCTION

For this run with 2001X, the SN was faint enough that the fringing in K was causing problems. I had the operators run a script (SN01x.pro in my ftp area under yalo) which used a dither of 2 and moved the telescope by 1.0s of time between series. It also took a junk image after each telescope move. The final data for K reduced without fringing, and I will use this technique for all SN in the future.

March 2001. I used H data for the SN and two darks for the calculation. Use findgainir in nickcl for the script.

Gain 6.6e-/ADU
read noise 14.1e-

PRELIMIARIES:

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

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/

Copy over some useful files:

 

-1. Do
copy /uw50/nick/daophot/irafcl/yalo/ir/* .

Create, or point to the uparm$ directory with the IR data information. Here is my file:

setup:

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

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

keep

0. Copy all the images from fits to imh.

cpimh ir*.fits del+
cpimh nick*.fits del+

1. The YALO FITS headers have some features which I change.

equinox ==> epoch
observat ==> "ctio"
and move the jd to JD-OLD

I run the script "yalohead" to convert the FITS headers into something more standard for IRAF.

yalohead *.imh

The task now does the setjd and the setairmass. If you need to do it by hand, do this:

setjd *.imh date="UTDATE" time="UT" exposure="EXPTIME" epoch="EQUINOX" setairmass *.imh

2. I have written a small task to put a dither parameter in the header. If you have standards that were taken with dithers, you may want to use this.

Check the tilt parameters first as:

hsel *.imh $I,tilt1,tilt2,tilt3 yes

Now run:

dtilt *.imh

dtilt:

images = "a*.imh" input images
(dither = 40) Tilt step: 10, 20, 30, etc
(tilt1 = 1320) Tilt position 1
(tilt2 = 2225) Tilt position 2
(tilt3 = 1820) Tilt position 3
(imglist = "tmp$tmp.562ga")  
(mode = "ql")  

Remove the junk images.

hsel *.imh $I,title yes | grep "junk" | fields - -1 > injunk
emacs injunk
ccdl @injunk


BASIC CCDRED STUFF.

Making the biases:

The IR detector has a numerical bias of 400 units. On top of that, the dark frame at the same exptime as an object frame has warm pixels that are similar to biases. The biases we will use are in order of preference:

1. An averaged dark taken at the same time as the object frame. Check to see if the darks look okay. Sometimes the first one is bad.

displ nickdark.0001 1 zs- zr- z1=400 z2=425
displ nickdark.0002 2 zs- zr- z1=400 z2=425


hedit nickdark*.imh imagetyp zero up+ ver-
zerocomb nickdark.????.imh out=irdark45 comb=med rej=minmax nlow=1 nhigh=1
displ irdark45 1 zs- zr- z1=400 z2=500
hedit irdark45 IMAGETYP zero up+ ver-

2. The DOME_OFF frame

Note the the K DOME_OFF actually has some light on it. You must do a getsky on this image, see what the sky value is, and subtract a constant to bring it to 400.

imar ir000323.K_OFF - 460 ir000323.K_OFF

3. A numerical bias frame with 400. in all the pixels. If you have to make a numerical bias, then:

imcopy ir991121.flatj zero400
imrep zero400 400. lower=INDEF upper=INDEF
hedit zero400 IMAGETYP zero up+
hedit zero400 title "Numerical bias of 400" up+


4 IMPORTANT! Whatever bias you are using, you must declare the image as a ZERO image.

hedit irdark45 IMAGETYP zero up+ ver-

 

MAKING THE FLATS AND CORRECTING THE VIGNETTING

Here we are going to create a flat field for each dither position using the single set of dome images. We will form the flats in the usual manner. We will reduce the data to [ZF] before sky subtraction to remove the vignetting.

1. Form the DOME_ON-DOME_OFF. First of all, rename the data "irflath.000?.imh,irdarkh.000?.imh" to a subdirectory. We need these names.

mkdir old
imren irflath.000?.imh old
imren irdarkh.000?.imh old

Run the following script which will set up the flats correctly for the


2 dither position. The logic is explained below. This script will make the flats, add the correct CCDMEAN value, and replace all 0 values with 20000.

flat.cl:
imar nickjon.0001 - nickjoff.0001 irflatj.0001
imar nickjon.0002 - nickjoff.0002 irflatj.0002
#
imar nickhon.0001 - nickhoff.0001 irflath.0001
imar nickhon.0002 - nickhoff.0002 irflath.0002
#
imar nickkon.0001 - nickkoff.0001 irflatk.0001
imar nickkon.0002 - nickkoff.0002 irflatk.0002
#
hedit irflat?.????.imh DOMEOFF "Dome-off image was subtracted" add+ ver-
hedit irflat?.????.imh ZEROCOR "Corrected by DOME_OFF" add+
hedit irflat?.????.imh IMAGETYP "FLAT" up+ ver-
imreplace irflat?.????.imh 20000 lower=INDEF upper=1
nstat irflat?.000?.imh niter=9 mkmean+ statsec = "25:640,25:1000"

In some cases, the *.0001.imh images were corrupted because the operator did not throw away the first image. You can copy the usual nightly DOME_ON-DOME_OFF data, which are dither=1, into these images.

imdel irflatj.0001,irflath.0001,irflatk.0001

1. The flats are calculated as DOME_ON-DOME_OFF.

YOU MUST EDIT THE HEADER OF YOUR FLAT FRAMES TO SHOW THAT THESE FLATS ARE ZERO-CORRECTED. (They are already zero-corrected because they were calculated as DOME_ON-DOME_OFF). IF YOU DON'T DO THIS, THE FLATS WILL BE ZERO-CORRECTED BY CCDPR, AND THIS IS VERY WRONG!

hedit irflat?.????.imh ZEROCOR "Corrected by DOME_OFF" add+

2. The flats may have 0 value pixels, which will cause the ccdpr to crash.

The low pixels should be replaced by a large number (here I chose saturation) so that in the division, they will be close to 0. You may want to run the flats through imrep as:

imreplace irflat?.????.imh 20000 lower=INDEF upper=1

3. Next is a subtle point. We are going to divide by 2 different flats per filter.

Normally, ccdpr calculates a CCDMEAN parameter for a flat, which has the effect of dividing the flat by CCDMEAN and brining it to an average of 1.0 before applying it to the data. But for vignetting, this is wrong. Consider 2 dither positions, and assume that the dither=2 position shows only 1/2 the counts than dither=1. This could be due to either the flatfield lamp changing, or vignetting. Assume dither=2 has 50% vignetting everywhere. If the flat at dither=1 has 1000ADU, the dither=2 will have 500ADU. The ccdpr program will normalize these two flats to 1.0. The resulting [ZF] data will be wrong for the dither=2 case by 50%.

What we need to do is very carefully to identify a part of the detector where there is no vignetting, and force CCDMEAN to this value. The resulting flats will be okay then. To do this, run nstat with mkmean+:

nstat:

images = "irflat?.000?.imh" Input images
(statsec = "25:640,25:1000") Stat sec
(binwidth = 0.1) Bin width of histogram in sigma
(iterate = yes) Iterate on the statistics?
(niter = 5) Number of iterations
(sigclip = 2.) Sigma clip for statistics
(mkmean = no) Update CCDMEAN parameters?
(imglist = "tmp$tmp.7826f")  
(mode = "ql")  

nstat irflat?.000?.imh niter=9 mkmean+

Do the following to make sure the flats are all [Z] and the bias is
declared [zero] and the flats are declared as flats:

ccdl irflat*.imh,irdark*.imh

irflath.0001.imh[1024,1024][real][flat][H][Z]:Dome H On, Dither=2/40
irflath.0002.imh[1024,1024][real][flat][H][Z]:Dome H On, Dither=2/40
irflatj.0001.imh[1024,1024][real][flat][J][Z]:Dome J On, Dither
irflatj.0002.imh[1024,1024][real][flat][J][Z]:Dome J On, Dither
irflatk.0001.imh[1024,1024][real][flat][K][Z]:Dome K On, Dither=2/40
irflatk.0002.imh[1024,1024][real][flat][K][Z]:Dome K On, Dither=2/40
irdark45.imh[1024,1024][real][zero][DARK]:Dark 45s

3.5 Go ahead and rename the data to something simple:

imren ir011217.0*.imh %ir011217.0%r%*.imh

4. Now we flatten the data with the separate dither flats.

I have written a task called yaloflatir.cl which will form the IRAF script to handle the dither flats. Run it as:

yaloflatir r???.imh

The run

cl < yfir.cl

ccdproc r102.imh zerocor+ zero=irdark45 flatcor+ flat=irflatj.0001
etc.

The data are now [ZF].

ccdr:
 

(pixeltype = "real real" Output and calculation pixel datatypes
(verbose = yes Print log information to the
standard output?
(logfile = "logfile" text log file
(plotfile = "" Log metacode plot file
(backup = "" Backup directory or prefix
(instrument = "myiraf$/yalo_ir.dat" CCD instrument file
(ssfile = "myiraf$/yalo_ir.sub" Subset translation file
(graphics = "stdgraph" Interactive graphics output device
(cursor = "" Graphics cursor input
(version = "2: October 1987"  
(mode = "ql")  
($snargs = 0)  

 

ccdpr

images =  "a*.imh" List of output CCD images
(output =  "")  List of output CCD images
(ccdtype =  "")  CCD image type to correct
(max_cache =  0)  Maximum 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 =  no)  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 field 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 =  "irdark45")  Zero level calibration image
(dark =  "")  Dark count calibration image
(flat =  "irflat?.imh")  Flat field images
(illum =  "")  Illuminaion 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 =  "legendre")  Fitting function
(order =  4)  Number of polynomial terms or splie pieces
(sample =  "*")  Sample points to fit
(naverage =  1)  Number of sample points to combine
(niterate =  3)  Number of rejecction iterations
(low_reject =  2.5)  Low sigma rejection factor
(high_reject =  2.5)  High sigma rejection factor
(grow =  0.)  Rejection growing radius
(mode =  "ql")  

myiraf$/yalo_ir.dat:
exptime exptime
imagetyp imagetypimages =(output =(ccdtype =(max_cache =(noproc =(fixpix =(overscan =(trim =(zerocor =(darkcor =(flatcor =(illumcor =(fringecor =(readcor =(scancor =(readaxis =(fixfile =(biassec =(trimsec =(zero =(dark =(flat =(illum =(fringe =(minreplace =(scantype =(nscan =(interactive =(function =(order =(sample =(naverage =(niterate =(low_reject =(high_reject =(grow =(mode =
subset IRFLTID 

        OBJECT   object
        DARK   zero
        FLAT flat  
        BIAS   zero
        MASK   other

 

myiraf$/yalo_ir.sub

        'H' H
        'J' J
        'K' K

 

MAKE THE MASK

Make a mask image as follows. Here we use the dome flats corrected for DOME_OFF for the mask. Note that there are very many warm pixels with the detector and about 10% of these change flux during the night. If the warm pixels change flux between the ON and OFF images, they will be flagged as bad pixels here.

The philosophy of the masks is that all pixels in a normalize image that are less than some value like 0.7 are probably bad, and will be marked as a bad pixel.

mask1.cl:
# to make the mask, use imhist and look for the limits
# first flatten the flats and remove the edge defects
#
real midpt
string img
img = "irflath.0002"
#
imdel("temp*.imh,mask*.imh,mask.pl", >>& "dev$null")
imstat(img//"[50:600:10,50:1000:10]",fields="midpt",form-) | scan(midpt)
print(img," ",midpt)
imar(img,"/",midpt,"temp1")
imtrans("temp1","temp2")
fmed("temp2","temp3", xwin=201, ywin=1, boundary="wrap",zlo=0.4,zhi=2.0)
imtrans("temp3","temp4")
imar("temp1", "/", "temp4", "mask")
imdel("temp*.imh", >>& "dev$null")
imrep mask.imh[*,1:10] 0 lower=INDEF upper=INDEF
imrep mask.imh[*,1020:1024] 0 lower=INDEF upper=INDEF
imrep mask.imh[1:1,*] 0 lower=INDEF upper=INDEF
imrep mask.imh[1021:1024,*] 0 lower=INDEF upper=INDEF
#
# now check the historgram and change the limits if needed.
#
imhist mask.imh z1=0.4 z2=1.4 nbins=100
displ mask.imh 1 zs- zr- z1=0.5 z2=1.5

 

mask2.cl
#
# good pix are 0, bad are 1 for IRAF mask
# the values 0.65 and 1.25 need to be checked on the histogram
# each time you make the mask.
#
real lll,uuu
real hist1,hist2,hist3,xjunk,histsum,nax1,nax2,npixx,ratio
lll = 0.75
uuu = 1.19
#
imhist('mask',z1=lll,z2=uuu,list+,nbin=1) | scan(xjunk,hist1)
imhist('mask',z1=INDEF,z2=lll,list+,nbin=1) | scan(xjunk,hist2)
imhist('mask',z1=uuu,z2=INDEF,list+,nbin=1) | scan(xjunk,hist3)
histsum= hist1+hist2+hist3
hsel('mask','naxis1','yes') | scan(nax1)
hsel('mask','naxis2','yes') | scan(nax2)
npixx=nax1*nax2
ratio=(hist2+hist3)/npixx
printf("Fraction rejected=%9.3f\n",ratio)
#
imhist('mask',z1=lll,z2=uuu,list+,nbin=1)
imdel temp.imh
imcopy mask temp
displ mask 1
imrep("mask", lower=INDEF, upper=lll, val=-1 )
imrep("mask", lower=uuu, upper=INDEF, val=-1)
imrep("mask", lower=lll, upper=uuu, val=0)
imar mask * mask mask
imcopy mask.imh mask.pl
# make DAOPHOT mask where bad pix are 0 and good are 1
imrename mask.imh maskdao
imar maskdao - 1 maskdao
imar maskdao * -1 maskdao
#
displ mask.pl 2 zs- zr- z1=0 z2=1

You can check frames 1,2 to see if the mask looks good.

SKY SUBTRACTION

Make inj,inh,ink files for all the SN data. These will be used to make
the sky.

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

Now grep it to separate out the different SNe

hsel @inx $I,irfltid yes | grep "J" - | fields - 1 > inxj
hsel @inx $I,irfltid yes | grep "H" - | fields - 1 > inxh
hsel @inx $I,irfltid yes | grep "K" - | fields - 1 > inxk

hsel @incn $I,irfltid yes | grep "J" - | fields - 1 > incnj
hsel @incn $I,irfltid yes | grep "H" - | fields - 1 > incnh
hsel @incn $I,irfltid yes | grep "K" - | fields - 1 > incnk

hsel @incz $I,irfltid yes | grep "J" - | fields - 1 > inczj
hsel @incz $I,irfltid yes | grep "H" - | fields - 1 > inczh
hsel @incz $I,irfltid yes | grep "K" - | fields - 1 > inczk

hsel @inbt $I,irfltid yes | grep "J" - | fields - 1 > inbtj
hsel @inbt $I,irfltid yes | grep "H" - | fields - 1 > inbth
hsel @inbt $I,irfltid yes | grep "K" - | fields - 1 > inbtk

hsel @indu $I,irfltid yes | grep "J" - | fields - 1 > induj
hsel @indu $I,irfltid yes | grep "H" - | fields - 1 > induh
hsel @indu $I,irfltid yes | grep "K" - | fields - 1 > induk

hsel @inel $I,irfltid yes | grep "J" - | fields - 1 > inelj
hsel @inel $I,irfltid yes | grep "H" - | fields - 1 > inelh
hsel @inel $I,irfltid yes | grep "K" - | fields - 1 > inelk


Run irsky. MAKE SURE THAT THE INSUF AND OUTSUF ARE CORRECTLY SET OR YOU WILL OVERWRITE YOUR DATA:
irsky:

images = "@inh" input images
(statsec = "[25:600,25:1000]") Stat sec
(sigma = 2.5) sigma clip for stats
(niter = 9) interactions for sigma clipping
(irfltid = "IRFLTID") keyword for filter
(outimage = "Sky") Output root for sky image
(nlow = 0) number of low pixels to reject
(nhigh = 1) number of high pixels to reject
(combine = "median") type of combine function
(reject = "minmax") type of rejection
(insuf = "r") Root suffixfor input image
(outsuf = "s") Root suffix fro output image
(imglist1 = "t1.jnk"  
(mode = "al")  

You may have to play with the nhigh to reduce the print-through.

This program outputs a file called sub.cl which you run to do the sky subtractions.

cl < sub.cl


This is now sky subtracted data. All the data should be near 0 sky. You can check this with getsky.

task getsky = home$scripts/getsky.cl

Look at the final subtractions to see if the sky subtracted well, and there is not a large flux "hole" in the image center due to print through of the median combine of the images.

After the sky subtraction is done, rename the SkyJ, etc. images so you don't overwrite them.

imren SkyJ SkyJcn

Do the sky subtraction on JHK. For JH, I usually used a single sky averaged over both dithers. For K and sometimes JH, do each dither separately. You have to look at the sky to make the decision as to whether to separate out the dithers. Make two files, - ink1 and ink2 as:

dithsep @ink

etc.

This will do the following:

hsel @ink $I,dither yes | sort col=2 > inink1
emacs ink1 ink2
irsky @ink1
cl < sub.cl
imren SkyK SkyK1 <== VERY IMPORTANT TO DO !!!
irsky @ink2
cl < sub.cl
imren SkyK SkyK2

hsel @inh $I,dither yes | sort col=2 > inh1
emacs inh1 inh2
irsky @inh1
cl < sub.cl
imren SkyH SkyH1 <== VERY IMPORTANT TO DO !!!
irsky @inh2
cl < sub.cl
imren SkyH SkyH2


The data are now sky subtracted. Do ALL the data before the next step.

 

FLAG BAD PIXELS

For the final mosaic, you should set the bad pixels to a large number. Since saturation is 10000, 20000 ADU is a good value.

imar s*.imh / maskdao s*.imh divzero=20000

If you want to fix the bad pixels for pretty pictures:

fixpix s???.imh mask=mask.pl

The data will be [BZF] now.

 

FINAL MOSAIC

The final mosaic is a piece of art, and I don't have the killer technique yet. The following does an excellent job if the night is photometric. The main problem we face is to detect and remove the warm pixels/cr's without removing flux from the stars.

The first step is to shift the data. If the seeing is >3 pix or so, use integer shifts.

We will now operate on the s*.imh images. Run:

chsuf in1 sufin="r" sufout="s"

etc.

rimexam.iterations = 1
yalocenter @inj
!$myprog/prog48 junk.dat
cl < shift.cl
displ frame=1 zs- zr- z1=-10 z2=200 image=temp10
displ frame=2 zs- zr- z1=-10 z2=200 image=temp11


This will produce integer shift image called temp*.imh. You can modify prog48 if you want real-valued shifts but I would not recommend it.

The final combine can be made as follows.

Use stsdas.hst_calib.wfpc package and run noisemodel on your data. Converge on the read noise and scalenoise. You will see a plot with a bunch of points at the lower left and two paralllel sequences to the upper right. Fudge the read noise until it passes thought the lower left. Then fugde the scalenoise (in units of percent) until it passes through the LOWER sequence. These are the stars. The upper sequence are warm pixels.

stsdas
hst
wfpc

noisemodel s111 xb=10 yb=10

Input these parameter to imcomb, remembering to convert from percent to fraction. For instance, I found:

imdel t.imh,t.pl
# H
#imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-50 hth=15000 \\
# gain=6.5 rdn=50 snoise=0.35 lsig=4 hsig=4
# K
imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-200 hth=15000 \\
gain=6.5 rdn=95 snoise=0.30 lsig=4 hsig=4
# J
imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-50 hth=10000 \\
gain=6.5 rdn=21 snoise=0.3 lsig=4 hsig=4
displ t.imh 1 zs- zr- z1=-20 z2=100
displ t.pl 2

Then
imren t.imh SN2001cnj.imh
imren t.pl SN2001cnj.pl

When the detector had lots of warm pixels, I used

imdel t.imh,t.pl
# H
#imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-50 hth=10000 \\
# gain=6.5 rdn=72 snoise=0.60 lsig=6 hsig=5
# K
#imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-500 hth=10000 \\
# gain=6.5 rdn=140 snoise=0.55 lsig=7 hsig=6
# J
imcomb temp??.imh t plf=t.pl comb=ave reject=ccd lth=-50 hth=10000 \\
gain=6.5 rdn=55 snoise=0.70 lsig=7 hsig=5
displ t.imh 1 zs- zr- z1=-20 z2=100
displ t.pl 2

If the night was not photometric, we have to estimate a scale factor. I have not figured this out yet but it will require scaling on the galaxy or some stars, but doing the calculation throwing out bad pixels.

If it is not photometric, I find that I have to change the clipping from sig=4 to sig=6-8.


DAOPHOT

We need to get the psf photometry done quickly. So let's not waste too much time getting the best psfs.

Here is an outline of the data reduction.

1. Copy over the *.opt files:

copy /uw50/nick/daophot/optfiles/yalo/ir/*.opt .
copy /uw50/nick/daophot/optfiles/yalo/ir/jhk2.clb .
copy /uw50/nick/daophot/optfiles/yalo/ir/ir2.lib .

We will solve for
[J,J-H]
[H,J-H]
[K,J-K]

because we often don't have K. I don't have color terms for J-H yet, so we will set them to 0 right now.

daophot.opt:

                 Read noise = 2.1
  Gain = 6.5
  FWHM = 5.5
  Fitting radius = 5.5
  PSF radius = 4
  Analytic model PSF = 3
  Variable PSF = 0
  Extra PSF cleaning passes = 5
  High good datum = 10000
  Watch progess = -2
  Thershold = 7

 

allstar.opt:

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

 

photo.opt:

                A1 = 7.0000
  A2 = 7.5195
  A3 = 8.2987
  A4 = 9.3377
  A5 = 10.6364
  A6 = 12.1948
  A7 = 14.0130
  A8 = 16.0909
  A9 = 18.4286
  AA = 21.0260
  AB = 23.8831
  AC = 27.0000
  IS = 30.0000
  OS = 35.0000

 

3. To create the *.inf file.

mv in* old
del junk.dat
files SN*.imh > in1
hsel @in1 $I,IRFLTID,utmiddle,airmass,exptime,hjd,title,ha yes > junk.dat
!$myprog/prog3a junk.dat

0
name
/uw50/nick/daophot/irafstuff/filters_yalo_ir.dat

4. Measure the FWHM as:

del junk.dat
yaloshift @in1

etc.
Then run

!$myprog/prog39 junk.dat

You also have to add in the read noise and gain. Run nstat on the data to get the read noise and hsel to get the coadds+ncombine

hsel @in1 $I,ncoadds,ncombine yes | fields - 2,3 \\
| filec STDIN "$1;$2;6.5*$1*$2" fo="%6d%6d%6d"
nstat @in1 statsec=1000:1100,1000:1100 iter+ niter=2 sig=4

Then enter this into the fwhm.dat. Since we have averaged a lot of data together, the gain is 6.5*N where N is the number of frames. Let us assume that N is about n*m where n is the number of coadds and m is the number of frames.


input into fwhm.dat
name
fwhm psf_rad var gain ron

fwhm.dat:
sn2001bt_h.imh
4.62 15 1 35 3.34
sn2001bt_j.imh
4.51 15 1 35 1.72
sn2001bt_k.imh
4.12 15 1 35 4.36
sn2001cn_h.imh
4.47 15 1 65 2.26
sn2001cn_j.imh
4.31 15 1 65 1.01

Note this program forces a var=1. If there are too few stars, use var=0. THIS IS IMPORTANT!!

5. For SN data, run BYALOIR and enter in the data from fwhm.dat.

Note that BPASSIR and BYALOIR takes 5 parameters: fwhm, psf size, variation, gain, and readnoise. It only solves for var=-1 in this pass. I used a threshold of 10 and var=1. If there are only a few stars in the frame, use var=0. It takes about 4min per frame to run.

This program runs BPASS1, prog11a, and FINAL2. If needed, clean up the psf with.

!$myprog/prog11a sn2001bt_h 0.1

or use dals to edit the lst stars.

6. Add in the supernova if it was missed by BYALOIR with addals. Run FINAL2 again.

If the SN is too faint, you may want to run ALLFRAME. To do this, make the *.mch file (below), run DAOMASTER again to make a *.mag file, and renumber the stars with DAOPHOT. Then run BALLFRAME. After ALLFRAME, you need to run the following to cleanup the data (turn *.alf to *.als, etc).

!$myprog/prog45 SN2001bth

!source SN2001bth
!/uw50/nick/daophot/perl/daomaster.pl SN2001bth

7. Make the *.mch file for each SN. Use yalocenter to id a star into

junk.dat and then run

yalocen SN*bt?.imh
!$myprog/prog52b junk.dat als

This makes the correct *.mch file in DAOMATCH format.

Run DAOMASTER as:

/uw50/nick/daophot/perl/daomaster.pl

8. Make the *.fet file. Use the same star numbers as the optical images.

IMPORTANT - ONLY CHOSE STARS THAT ARE NEAR THE SN AND WERE ON ALL THE FRAMES. DO NOT CHOSE STARS NEAR THE EDGE OR BEYOND COL 600. LOOK AT THE *.PL FILE TO MAKE SURE!

The data are now ready for REDUCE. Copy the *net files and run REDUCE.

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

reduce
i20010710
SN2001czh
E
SN2001cz.net
SN2001czh
7
1 1 1
etc.

9. If you want to make a *.net file for the photometry, do the following:

a. Find a night which looks photometric. If there were standards taken, great! If not, we can still fake it.

b. I assume the data are reduced through *.fet, *.mch, and *.als. We now run DAOGROW. Make a *.lis file.

ls -1 *ap >> i20010618.lis

c. Now run COLLECT. You can use:

!$myprog/prog43 SN2001czh

to speed things up.

d. Now, if you have real standards, you can run CCDSTD with just the A0,B0, and C0 coeffs missing.

Use this updated *.clb file.

d. If you don't have standards, make sure you have a *.clb file that has the name of the night, and the right set of filters.

If you have jhk data, use jhk1.clb. If you have only jh data, use jh.clb. Rename *.clb to something like

mv jhk2.clb i20010618.clb

e. Now run CCDAVE (not CCDSTD!) to get the *.net file.

This will have the prelimiary photometry. I called it sn2001cn_ir.net. Put the *.net file in the appropriate directory for future use. Also put the *.fet and the master image there so we can remember what we did!

f. You can check the field using:

!$myprog/prog55b /uw52/nick/sn/sn01cn/ir/SN2001cn.net i20010710.net

at columns 26, 44, 62


DONE!

 

back to top