Sep 03 2004 APO Bookeeping reductions Photometric night SDSS filter u',g',r',i',z' 2x2 binning --> 0.282 "/pixel # SITe 2048x2048 back illuminated CCD # CCD pixel size = 24 ?m # CCD gain = 3.37 e- / ADU # CCD read noise = 5.7 e- / pixel # imaging field of view = 4.78' x 4.78' # pixel scale 0.141" per pixel when binned 1x1 (usually binned 2x2, 0.282"/pixel) # short exposure shutter = 0.75 - 1.6 secs (Unreliable!) Warning, Exposures shorter than 0.75s will cause problems with SPIcam!!! If you mess the shutter up then issue the command "cecho SHINIT" from within SPIcam to fix it. # long exposure shutter = 1.8 secs on up. (Reliable!) Process the images: Overscan: [1040:1070,*] Trim: [16:1032,1:1022] ccdproc all image through OT Then combine Zeros 10 zeros to combine --> Zero.fits ccdproc flat*fits using the combined zero Combine flats with correct subsets To know if the subsets are set correctly, do ccdlist. It should show the filter number for each image Reduce the data with ccdproc For this night I had to use flats from may272004. We didn't take flats For APO do the following in the header: hedit @inlis fields=date-obs value=2004-09-03 add- update+ In this case I had two dates: hsel *fits date-obs,$I | grep /02 | fields 2 > sep02 hsel *fits date-obs,$I | grep /03 | fields 2 > sep03 so, do: hedit @sep02 fields=date-obs value=2004-09-02 add- update+ hedit @sep03 fields=date-obs value=2004-09-02 add- update+ Get the effective airmass and midjd astutil For setjd the parameter file has to look like this: PACKAGE = ctioslit TASK = setjd images = @objlis Images (observa= apo) Observatory of observation (date = date-obs) Date of observation keyword (time = ut) Time of observation keyword (exposur= exptime) Exposure time keyword (ra = ra) Right ascension (hours) keyword (dec = dec) Declination (degrees) keyword (epoch = equinox) Epoch (years) keyword (jd = jd) Output Julian date keyword (hjd = hjd) Output Helocentric Julian date keyword (ljd = ljd) Output local Julian date keyword (utdate = yes) Is observation date UT? (uttime = yes) Is observation time UT? (listonl= yes) List only without modifying images? (mode = ql) for setairmass, the parameter file has to like like this: setairmass PACKAGE = ctioslit TASK = setairmass PACKAGE = astutil TASK = setairmass images = @objlis Input images (observa= apo) Observatory for images (intype = beginning) Input keyword time stamp (outtype= effective) Output airmass time stamp (ra = ra) Right acsension keyword (hours) (dec = dec) Declination keyword (degrees) (equinox= equinox) Equinox keyword (years) (st = st) Local siderial time keyword (hours) (ut = ut) Universal time keyword (hours) (date = date-obs) Observation date keyword (exposur= exptime) Exposure time keyword (seconds) (airmass= airmass) Airmass keyword (output) (utmiddl= utmiddle) Mid-observation UT keyword (output) (scale = 750.) The atmospheric scale height (show = yes) Print the airmasses and mid-UT? (update = yes) Update the image header? (overrid= yes) Override previous assignments? (mode = ql) setjd @inlis setairmass @inlis Let create the opt files needed by daophot $myprog/prog1 Gain (e-/ADU):3.37 Read noise (e-):5.7 Scale (arcsec/pixel):0.281 Seeing (arcsec):1.5 Radius of inner sky annulus (arcsec):7 daophot.opt: No such file or directory photo.opt: No such file or directory allstar.opt: No such file or directory Read noise = 1.7 Gain = 3.4 FWHM = 6.4 Fitting radius = 6.4 PSF radius = 10 Analytic model PSF = -3 Variable PSF = 0 Extra PSF cleaning passes = 5 High good datum = 62000 Watch progess = -2 Threshold = 7 Fitting radius = 5.3 IS (Inner sky radius) = 2 OS (Outer sky radius) = 30 Redetermine Centroids = 1 add to daophot.opt the lines: Percent error = 0 Profile error = 0 edit the High Good data to 50000 You will have, after running prog1 the following files allstar.opt daophot.opt junk.opt photo.opt Create the correct photo.opt $myprog/prog10 Enter inner and outer apertures:6 25 0.220779 Where 6 and 25 is in pixels. The first number corresponds to the inner aperture (smaller aperture) for the phomotery and the send nnumber is the largest aperture you want to consider. This corresponds to Landolt Maximum aperture, which is 7 arcsec So, if I want to go from 1" to 7" I should do: $myprog/prog10 Enter inner and outer apertures:3.5 25 0.279 mv junk.opt photo.opt more photo.opt A1 = 3.5000 A2 = 4.0584 A3 = 4.8961 A4 = 6.0130 A5 = 7.4091 A6 = 9.0844 A7 = 11.0390 A8 = 13.2727 A9 = 15.7857 AA = 18.5779 AB = 21.6494 AC = 25.0000 IS = 25.0000 OS = 50.0000 IS and OS correspond to the inner and outer annulus sky radius FWHM Find the fwhm. To do this I have created an script that determine automatically what is the fwhm for each image. Create a file all the images you are interested. ls -1 *fits > inlis $myperl/fwhm/daofwhm.pl inlis The output is a file called fwhm.dat imagename fwhm psf_radius variance 109_71_0048.fits 4.22 13.51 3 109_71_0049.fits 3.37 10.78 3 109_71_0050.fits 3.48 11.15 3 109_71_0051.fits 2.63 8.42 3 109_71_0052.fits 5.01 16.02 3 ------------------------------------------------------- BFIND2 Then run bfind2 on all of the images to create the .ap files, i.e, the aperture photometry. Sometimes is good to run bfind2 on the standards instead of running Knut's scripts ------------------------------------------------------ Deep psf photmoetry for crowded fields: There are a set of scripts that can be run which are perl script!. Just create a list with the input data, and run run them. They don't need the fwhm, psfrad, because they use the chisqr to eliminate bad fits! Then run, runscripts This do psf photometry on all of the images in fwhm.dat mkfind_adv-Nick.prl fwhm.dat source findscript1 mkphot_adv-Nick.prl fwhm.dat source photscript1 > phot.log mkpickpsf_adv-Nick.prl fwhm.dat source pickpsf1 > pick.log mkpsfit_adv-Nick.prl fwhm.dat source psfitscript1 > psfit.log mkrunals_adv-Nick.prl fwhm.dat source alsscript1 > als.log mksubstar_adv-Nick.prl fwhm.dat source subscript1 > sub.log The final output is written in the .als files The photometry done in this way is much deeper that the one runned with breu2. Both are similar. ----------------------------------------------------- INF file Create the inf file. To do this, put all the s.fits files and the other one you runned through bfind2 into a file ls *s.fits > in1 ls *.ap >> in1 edit the file so ap --> fits hsel @in1 $I,filter,title yes > in2 emacs in2 Separate them into groups, with the first line being the image you will use for the mch, and fet, where you will identify the objects you are interested in. M2_0079s.fits "SDSS g" M2 M2_0075s.fits "SDSS r" M2 M2_0076s.fits "SDSS i" M2 M2_0077s.fits "SDSS z" M2 M2_0078s.fits "SDSS u" M2 M2_0080s.fits "SDSS r" M2 M2_0081s.fits "SDSS i" M2 M2_0082s.fits "SDSS z" M2 M2_0083s.fits "SDSS u" M2 M2_0084s.fits "SDSS u" M2 dracoV141_0108s.fits "SDSS g" dracoV141 dracoV141_0109s.fits "SDSS g" dracoV141 dracoV141_0110s.fits "SDSS g" dracoV141 dracoV141_0111s.fits "SDSS r" dracoV141 dracoV141_0112s.fits "SDSS u" dracoV141 m13_0068s.fits "SDSS g" M13 m13_0062s.fits "SDSS r" M13 m13_0063s.fits "SDSS r" M13 m13_0064s.fits "SDSS r" M13 m13_0065s.fits "SDSS i" M13 m13_0066s.fits "SDSS z" M13 m13_0067s.fits "SDSS u" M13 ... cl> fields in2 1 > in3 !$myprog/prog59 in3 This flags is not being used, but it has to be there so other programs can run. cl < mch.cl hedit @in1 AZFLAG 0 add+ ver- up+ del junk.dat hsel @in1 $I,filter,utmiddle,airmass,azflag,exptime,hjd,mchfile yes > junk.dat $myprog/prog3b junk.dat 0 sep03 subset.dat where subset.dat is: 'SDSS z' 5 'SDSS i' 4 'SDSS r' 3 'SDSS g' 2 'SDSS u' 1 output: may27.inf If I have only griz filters, then I could use the following subset.dat file griz_subset.dat 'SDSS z' 4 'SDSS i' 3 'SDSS r' 2 'SDSS g' 1 'SDSS u' 5 or gri_subset.dat 'SDSS i' 3 'SDSS r' 2 'SDSS g' 1 You can create whatever .inf file you want =with as many filters you want. You only need to have all this filters in the .lib file which contains all the calibrated standards. ------------------------------------------------------- Cleaning the .als file from stars that have bad photometry. This maybe doesn't have to be runned because it is taken care with Knut's scripts CHECK Now run check on the images where it was run "autodao2". Check it's going to show all the psf star picked by the program. If the star is a good "psf star", ==> f If it is not good (companion) ==> r quit with "w" if I want to keep the remaining stars in the list quit with "y" if I want to get rid off the remaining stars. update? yes This is better and faster. You can also run $myprog/prog11 obj000 99 if you don't want to run check. This will eliminate automatically all the bad stars ############################################################################# NOTE: Sometimes "find" from daophot doesn't get all the star from the image, so if you want to include a specific star from the image into the .als file or .ap file so you can have the photometry of it, run the following iraf script. addals imagename (don't include ".imh") This is like imexame. Use the "a" key to mark the stars you are interested in. This script calls You can do and epar addals so see the parameters. To be able to run this you need to have the package "ctio" installed. If you want you can use the copy I have installed in my home directory. /home/ricardo/Iraf/ DO the following in you login.cl reset ctio =/home/ricardo/Iraf/ctio/ task ctio.pkg ="ctio$ctio.cl" Then you are going to be able to enter to the ctio package. END NOTE ######################################################################### DAOGROW Note: The .ap files are created using bfind2. ls -1 *ap > sep03.lis Note: We don't have the .kap files because I runned Knut's scripts. Knut's scripts are similar to those produced by breu2, but go deeper. ls -1 *.kap >> night1.lis Run daogrow with 3 variables. Enter the other two as "0.9 0". Check the fist with sm macros "see night1" and "gro obj000" etc. daogrow File with aperture radii (default photo.opt): A1 RADIUS OF APERTURE 1 = 3.50 A2 RADIUS OF APERTURE 2 = 4.06 A3 RADIUS OF APERTURE 3 = 4.90 A4 RADIUS OF APERTURE 4 = 6.01 A5 RADIUS OF APERTURE 5 = 7.41 A6 RADIUS OF APERTURE 6 = 9.08 A7 RADIUS OF APERTURE 7 = 11.04 A8 RADIUS OF APERTURE 8 = 13.27 A9 RADIUS OF APERTURE 9 = 15.79 AA RADIUS OF APERTURE 10 = 18.58 AB RADIUS OF APERTURE 11 = 21.65 AC RADIUS OF APERTURE 12 = 25.00 IS INNER SKY RADIUS = 25.00 OS OUTER SKY RADIUS = 50.00 PHO> File with airmasses: sep03 List of input files: sep03.lis Number of unknowns: 3 Values for remaining 2 parameters: 0.9 0 Maximum magnitude error: 0.025 .... This program created a the "*.tot" files. deldaogrow. This does: del *.tot ; del *.cur ; del *.poi ; del *.see ; del *gro ; del *.crl To run gro obj000, it is easier to create a file like this and then copy and paste it. gro BD+26o2606_101 gro BD+30o2428B_049 gro BD+30o2428B_050 ... ------------------------------------------------------------------------------ DAOMATCH, DAOMASTER, MONTAGE2 Make a file which sorts all the images into the same fields. Edit this file to be like: Create a file with all the tot files in order to feed them in daomatch [ricardo@granizo sep032004]$ daomatch Master input file: 109_71_0048.tot Output file name (default 109_71_0048.mch): Next input file: 109_71_0049.tot Frame 2: star 1 2 3 +--------- Frame 1: 1 | - 1 - 2 | 1 - - 3 | - - 1 109_71_0049.tot -1 -2 1.000 0.002 -0.002 1.000 0.10 3 0.992 0.000 0.000 0.013 0.009 2 2.000 2.000 0.400 0.500 WT 0.991619706 < 2. Frame 2: star 1 2 3 4 5 +--------------- Frame 1: 1 | - 2 - - - 2 | 2 - - - - 3 | - - 3 - - 4 | - - - - - 5 | - - - 2 - 109_71_0049.tot -2 -1 1.000 0.000 0.000 1.000 0.10 9 2.965 0.000 0.000 0.092 0.037 4 2.000 2.000 0.400 0.500 14 > 5 Next input file (default EXIT): 109_71_0050.tot ... So, the first file is the master file, the one we put in the first place when the file was created mch.cl DAOMASTER The output is a file with the traansformation equation between images (in case the telescope has moved between exposures. You have to include in this file all the images taken during the night for this particular field) If daomatch doesn't a good job (this can happen when you have only 2-5 stars in each field) then edit the file and the values by hand. What I usually do is to copy a paste one of the values that looks good. Now run daomaster. Daomaster it's going to use the transformation equation from the *mch files and will find a better transformation. 109_71_0048.mch 92_251_0104.mch FM_Del_0075.mch ox_her_0064.mch 111_1925_0053.mch 92_251_0105.mch GD246_0108.mch ross711_0036.mch 113_259_0089.mch 92_263_0099.mch draco_V141_0025.mch 113_339_0058.mch CV_Del_0082.mch draco_V194_0031.mch 114_531_0042.mch DR_Lyr_0071.mch m13_0013.mch You can use the perl script in /daophot_stetson/daophot/perl called daomaster.pl [ricardo@granizo sep032004]$ daomaster.pl Name "main::a" used only once: possible typo at /host/defile98/a2/stubbs/ricardo/daophot_stetson/daophot/perl/daomaster.pl line 19. Usage: daomaster.pl objxxx.mch daomaster.pl objxxx.mch --------------------------------------------------------------------------- FETCH Now run fetch. Use the master image for each field, or the image from montage2. loadit obj000m fetch 1 xo=?? yo=?? !fecth the ?? are the offsets form montage2. In this run we didn't have to run montage2, so we ru fetch like this: cl> display 110_340_209 1 fill+; fetch 1 new+ out=junk.fet then the program prompts me for the stars and I mark them interactively: z1=60.14626 z2=119.0723 1 479.859 509.296 : 340 ctrl D to finish Now run !fetch cl> !fetch Input photometry file: 110_340_209.tot 4 stars read in. File with starnames (default junk.fet): Critical radius: 10 Star ID prefix: 110- Save all captures? n 110-340 1 479.86 509.30 4.154 1 476.329 511.485 10.6053 0.0025 10.6640 -0.0587 9 Good bye. ------------------------------------------------------------------------ Collect and CCDSTD [ricardo@granizo sep032004]$ collect Name of output photometry file: sep03 Creating new file. Label for magnitude 1: u Label for magnitude 2: g Label for magnitude 3: r Label for magnitude 4: i Label for magnitude 5: z Label for magnitude 6: File with exposure information (default GIVE UP): sep03 Typical FWHM, maximum radius: 3.5 10 Photometry-filename prefix: Default filename extension (default als): Then just copy and past all the .tot files. The program will now exactly which file has to use to grab the data. You can also do collect for less filter, like gri only. ccdstd To run ccdstd you will need a .lib file, a .tfm file and .obs file The .lib file have to have the filters you will be using, i.e, if you will be using gri, then the lib file should look like this: gri.lib 3 FILTERS: g r i Hilt-31 11.583 0.0014 10.996 0.0010 10.702 0.0014 G-158-100 15.201 0.0100 14.691 0.0060 14.469 0.0092 If you will have grizu.lib then it looks like this grizu.lib 5 FILTERS: g r i z u Hilt-31 11.583 0.0014 10.996 0.0010 10.702 0.0014 10.555 0.0024 12.582 0.0033 G-158-100 15.201 0.0100 14.691 0.0060 14.469 0.0092 14.377 0.0136 16.302 0.0215 ... or maybe like this ugriz.lib 5 FILTERS: u g r i z Hilt-31 12.582 0.0033 11.583 0.0014 10.996 0.0010 10.702 0.0014 10.555 0.0024 G-158-100 16.302 0.0215 15.201 0.0100 14.691 0.0060 14.469 0.0092 14.377 0.0136 ... The order depends on how you created the obs file. For the ugriz.lib the .obs file was created like this: Label for magnitude 1: u Label for magnitude 2: g Label for magnitude 3: r Label for magnitude 4: i Label for magnitude 5: z If we have only gri filters, then you can create .obs file like this: Label for magnitude 1: g Label for magnitude 2: r Label for magnitude 3: i The transformation equations are in the file .tfm. They look like this: ugriz.tfm # M: UGRIZ # I: i,r-i,i-z,g-r,u-g I1 = M4 I2 = M3-M4 I3 = M4-M5 I4 = M2-M3 I5 = M1-M2 O1 = M1 + A0 + A1*I5 + A2*Q + A3*T O2 = M2 + B0 + B1*I4 + B2*Q + B3*T O3 = M3 + C0 + C1*I2 + C2*Q + C3*T O4 = M4 + D0 + D1*I3 + D2*Q + D3*T O5 = M5 + E0 + E1*I3 + E2*Q + E3*T # CLOUD - remove A2,A3 for cloudy weather # extinction from 98bu paper 1999, AJ, 117, 1175 A2 = 0.52 #B2 = 0.219 #C2 = 0.011 #C2 = 0.116 #D2 = 0.069 #E2 = 0.062 A3 = 0. B3 = 0. C3 = 0. D3 = 0. E3 = 0. grizu.tfm # M: UGRIZ # I: i,r-i,i-z,g-r,u-g I1 = M3 I2 = M2-M3 I3 = M3-M4 I4 = M1-M2 I5 = M5-M1 O1 = M1 + A0 + A1*I5 + A2*Q + A3*T O2 = M2 + B0 + B1*I2 + B2*Q + B3*T O3 = M3 + C0 + C1*I3 + C2*Q + C3*T O4 = M4 + D0 + D1*I3 + D2*Q + D3*T O5 = M5 + E0 + E1*I5 + E2*Q + E3*T # CLOUD - remove A2,A3 for cloudy weather # extinction from 98bu paper 1999, AJ, 117, 1175 #A2 = 0.52 #B2 = 0.219 #C2 = 0.011 #C2 = 0.116 #D2 = 0.069 #E2 = 0.062 A3 = 0. B3 = 0. C3 = 0. D3 = 0. E3 = 0. gri.tfm # M: GRI # I: g,g-r,r-i I1 = M1 I2 = M2-M3 I3 = M1-M2 O1 = M1 + A0 + A1*I3 + A2*Q + A3*T O2 = M2 + B0 + B1*I3 + B2*Q + B3*T O3 = M3 + C0 + C1*I2 + C2*Q + C3*T # CLOUD - remove A2,A3 for cloudy weather # extinction from 98bu paper 1999, AJ, 117, 1175 #A2 = 0.52 #B2 = 0.219 #C2 = 0.011 #C2 = 0.116 #D2 = 0.069 #E2 = 0.062 A3 = 0. B3 = 0. C3 = 0. D3 = 0. E3 = 0. You can create whatever combination you need. ############################################################ NOTE Sometimes there are nights in which the objects don't have all the filters taken or maybe some of the images have saturated stars so there is no object for that filter. If this happen and you took standards in all filters, and the night was reduced with all the filters, then, when you run ccdave the objects that are missing a filter will not be reduced. In order to fix this, you should create an .inf file, an .obs file and a .tfm and .lib file that only contains the filters you want to reduce (or you just have). ############################################################# CCDSTD [ricardo@granizo sep032004]$ ccdstd File with standard-star library: gri Library file contains data for 3 magnitudes: (1) g (2) r (3) i File with transformation equations: gri File with observations: sep03_gri.obs Stars not in the standard list: SA-113-337 SA-113-L1 cr-vel FM-del v141 v194 m13-1 m13-6 m13-2 This file already exists: sep03_gri.rsd New output file name (default OVERWRITE): # M: GRI # I: g,g-r,r-i # CLOUD - remove A2,A3 for cloudy weather # extinction from 98bu paper 1999, AJ, 117, 1175 #A2 = 0.52 #B2 = 0.219 #C2 = 0.011 #C2 = 0.116 #D2 = 0.069 #E2 = 0.062 Clear-weather reduction mode. Reducing sep03_gri g Nightly Coefficients..... Scatter 0 1 2 0.0044 0.0772 -0.0120 0.2198 +- 0.0038 0.0052 0.0060 8 standards 1 ? 0 #'s Reducing sep03_gri r Nightly Coefficients..... Scatter 0 1 2 0.0093 -0.0112 -0.0151 0.1144 This file already exists: sep03_grir.rsd New output file name (default OVERWRITE): 0.0093 -0.0112 -0.0151 0.1144 +- 0.0105 0.0142 0.0132 8 standards 0 ?'s 0 #'s Reducing sep03_gri i Nightly Coefficients..... Scatter 0 1 2 0.0079 0.2473 -0.0205 0.0845 This file already exists: sep03_grii.rsd New output file name (default OVERWRITE): 0.0079 0.2473 -0.0205 0.0845 +- 0.0053 0.0161 0.0104 9 standards 0 ?'s 0 #'s File with observations (default EXIT): Good bye. This created the .rsi files that contains the residuals and created a .clb file that contains the solution for this night. I1 = M1 I2 = M2-M3 I3 = M1-M2 O1 = M1 + A0 + A1*I3 + A2*Q + A3*T O2 = M2 + B0 + B1*I3 + B2*Q + B3*T O3 = M3 + C0 + C1*I2 + C2*Q + C3*T A3 = 0. B3 = 0. C3 = 0. D3 = 0. E3 = 0. A0 = 0.0771879 0.0037965 << 5 degrees of freedom A1 = -0.0119684 0.0052274 << 5 degrees of freedom A2 = 0.2198059 0.0059928 << 5 degrees of freedom B0 = -0.0112017 0.0104652 << 5 degrees of freedom B1 = -0.0150624 0.0141810 << 5 degrees of freedom B2 = 0.1144479 0.0132266 << 5 degrees of freedom C0 = 0.2473164 0.0053038 << 6 degrees of freedom C1 = -0.0204821 0.0161456 << 6 degrees of freedom C2 = 0.0845353 0.0104299 << 6 degrees of freedom S1 = 0.0044213 << S2 = 0.0092856 << S3 = 0.0078670 << Sometimes you don't have enoght standards to calculate the coefitients. You can add the coeff by hand. Usually it helps to add the extinction (which are pretty well knon for APO) A2 = 0.527 u B2 = 0.199 g C2 = 0.116 r D2 = 0.069 i E2 = 0.062 z This is froma compilation I made from Andrew West and other places. -------------------------------------------------------------------------- CCDAVE This is very straight forward. [ricardo@granizo sep032004]$ ccdave File with standard-star library: gri Output file name (default gri.net): sep_^?Interrupt [ricardo@granizo sep032004]$ ccdave File with standard-star library: gri Output file name (default gri.net): sep03_gri This file already exists: sep03_gri.net New output file name (default OVERWRITE): This file already exists: sep03_gri.ave New output file name (default OVERWRITE): File with observations: sep03_gri.obs 65 observations read from sep03_gri.obs 65 total File with observations (default PROCEED): Include non-library stars? y Display on terminal? n 160 gri.lib 169 1 sep03_gri.obs Maximum number of frames for a cloudy night 0 Maximum number of observations for one star 7 Good bye. Thius creates the files sep03_gri.net and sep03_gri.ave The .net file is the that contains the final photometry. ################################################################# Photometry to all the stars in the image If you want to do this, then you could add to the observation file the psf stars used to calculate the psf from each image. This stars are in the .lst file. Add this files to the .obs file..... continue later