@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@ @% %@ @% There are TWO sample reductions here. Both represent %@ @% leaner, meaner first-pass reductions than the more %@ @% thorough job outlined in the prior set of notes. %@ @% %@ @% -luv, steve 08 May 2002 %@ @% %@ @%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@ ## ----------------------------------------------------- ## ## Reducing the (scanty) 2002 April/May Lick/Gemini data ## ## ----------------------------------------------------- ## steve, at Lick, 30 April 2002 only worrying about K' data for now ######################################## ## First swap FTS extension for .fits ## ######################################## ls > filenames awk '{ printf("mv %s %s.fits\n",$1,$1)}' filenames > runme :.,$s/\.FTS\.fits/\.fits/g source runme ################ ## Make Darks ## ################ This may not be necessary. Let's do some statistics first: FRAME MEAN STD sample dark: 29APB011 (10 x 12) 88429 9724 sample bias: 29APB001 (0.4 x 1) 876 125 sample science: 29APB045 (10 x 12) 28865 1806 Oh shit - we had a problem initializing the filter wheel, such that we only know for sure that we had the K' filter in after the first focus frame. We *thought* the darks were taken in the blank position, but those counts are really high (and I checked that all of the darks have high counts). So the darks are useless. That's fine, as Wim was arguing that in a situation like this: MEAN RMS science 1000 100 dark 100 100 bias 1 100 you really don't benefit from dark- or bias- subtracting. Just make a sky frame (out of the data) and subtract *that* off of the science frames. #################### ## Make Twi Flats ## #################### No twilight flats. We'll make a flat out of the science frames themselves. #################### ## Make Sky Flats ## #################### Dimsum will do a sky-subtraction, but we still need to flatten as a separate step. I'm going to treat only the science data since the conditions were WAY non-photometric and were quite variable over the course of the night. Upshot: photometry is out the window. 1) Check input science frames. If the conditions got really bad during some data frame, you won't want to include it in the sky flat, so check out the mean/rms in the science frame first: IMAGE NPIX MEAN STDDEV MIN MAX 29APB045 65536 28554. 2121. -1080. 59915. 29APB046 65536 28068. 2089. -1013. 59808. 29APB047 65536 28027. 2083. -1010. 59705. 29APB048 65536 27977. 2079. -1005. 59747. 29APB049 65536 27859. 2070. -989. 59682. 29APB050 65536 27724. 2057. -964. 59490. 29APB051 65536 27458. 2041. -954. 59406. 29APB052 65536 27531. 2045. -961. 59541. 29APB053 65536 27508. 2041. -933. 59554. 29APB054 65536 27483. 2038. -942. 59538. 29APB055 65536 27281. 2023. -923. 59410. 29APB056 65536 27117. 2014. -901. 59220. 29APB057 65536 26572. 1975. -828. 59164. 29APB058 65536 26994. 2004. -876. 59206. 29APB059 65536 26958. 2000. -864. 59345. 29APB060 65536 27089. 2007. -880. 59327. 29APB061 65536 26027. 1934. -774. 59030. 29APB062 65536 25669. 1913. -730. 58719. 29APB063 65536 25584. 1906. -732. 58693. 29APB064 65536 25257. 1883. -676. 58553. 29APB065 65536 26692. 1974. -841. 59054. 29APB066 65536 28321. 2084. -1027. 59610. 29APB067 65536 33606. 2485. -1638. 61935. 29APB068 65536 57744. 4522. -4215. 80787. Check it -- the clouds rolled in an upset the mean in the last 3 frames, so reject them from the sky flat. 2) Combine sky flat. You might think to scale the images that are going into the skyflat. Wim argues that scaling causes the RMS to blow up, so it's wiser to use a zero point offset. Okay. Imcombine will do this automatically; I decided to determine the zpt from the median. imcombine ("@list.skyflat_k", "skyflat_k_10x12", rejmask="", plfile="", sigma="", logfile="STDOUT", combine="average", reject="minmax", project=no, outtype="real", offsets="none", masktype="none", maskvalue=0., blank=0., scale="none", zero="median", weight="none", statsec=" ", expname="", lthreshold=INDEF, hthreshold=INDEF, nlow=1, nhigh=1, nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="6", gain="3.8", snoise="0.", sigscale=0.1, pclip=-0.5, grow=0.) Looks like there are no objects in the flat. Now normalize... 3) Normalize sky flat. imstat skyflat_k_10x12 ---> # IMAGE NPIX MEAN STDDEV MIN MAX MIDPT skyflat_k_10x12 65536 27115. 2014. -923. 59327. 27339. Imstat uses "MIDPT" to signfify the median. Hence: imarith skyflat_k_10x12 / 27339. skyflat_k_10x12_nrm 4) Flatten data. I'm going to concern myself with object frames 45 - 64, data which concerns the first target field only. The clouds rolled when we pointed to the second field and we had to abort after 3 2-minute exposures anyway, due to humidity. imarith @list.obj_k / skyflat_k_10x12_nrm @list.obj_k//ff ######################### ## Make Bad Pixel Mask ## ######################### Dimsum will update the bad pixel mask. All you need to do at this stage is make a fits file with all 1's, then feed that to dimsum as the BPM. Wim says it doesn't even matter if you call it .pl, just divide some image by itself and shove it into Dimsum. imarith 29APB045ff / 29APB045ff bpm NB: At the end of the first pass redux, you could see all kinds of bad shit in the final frame. I'm gonna try it again with a bad pixel mask... imcopy skyflat_k_10x12_nrm bpm_K imreplace bpm_K 0 lower=INDEF upper=0.5 imreplace bpm_K 1 lower=0.5 upper=1.5 imreplace bpm_K 0 lower=1.5 upper=INDEF imcopy bpm_K.fits bpm_K.pl #################### ## Fire up DIMSUM ## #################### 1) Make separate directory for object(s). Put in flattened science frames and the BPM. 2) Run reduce... 3) Uh, looks ugly -- bad parts of chip are clearly evident. I'm going to go back and make a BPM like I'm accustomed to doing... (Check it: J1432+3434-1.52_mp_firstpass.) Oh, the problem might have been that I had bpm.pl instead of bpm.fits in the reduce parameters... Looks fine now. ################### ## Do astrometry ## ################### 1) Get dss image, 4' x 4'. 2) Imexam in dss image, pipe to ref.xy. Cut ref.xy to just two columns: x,y. 3) Convert to RA/Dec: xyeq yes dss_plate_finder "" ref.xy iraf 1 2 0 > ref.rade 4) Find matching objects in K' image: tvmark 2 ref.xy mark=circle radii=5 color=206 label=no number=yes Pipe to image.xy. 5) Run matchpos.pro --> image.xyradec 6) Now create solution with imcoords.ccmap ccmap ("image.xyradec", "image.db", solutions="", images="J1432+3434-1.52_mp", results="image.summary", xcolumn=1, ycolumn=2, lngcolumn=3, latcolumn=4, xmin=INDEF, xmax=INDEF, ymin=INDEF, ymax=INDEF, lngunits="hours", latunits="deg", insystem="j2000", refpoint="coords", lngref="INDEF", latref="INDEF", refsystem="INDEF", lngrefunits="", latrefunits="", projection="tan", fitgeometry="general", function="polynomial", xxorder=2, xyorder=2, xxterms="half", yxorder=2, yyorder=2, yxterms="half", reject=INDEF, update=yes, pixsystem="logical", verbose=yes, interactive=yes, graphics="stdgraph", cursor="") ## ----------------------------------------------------- ## ## Reducing the (scanty) 2002 April/May Lick/Gemini data ## ## ----------------------------------------------------- ## steve, at Lick, 02 May 2002 only worrying about K' data for now (not interested in J, and it's out of focus) these terse notes follow redux.txt in n1 directory 1. Rename files. 2. Consider darks. FRAME MEAN STD sample dark: 01MYB001 (10 x 12) 410.4 1362. sample science: 01MYB037 (10 x 12) 29891. 2238. Gonna skip making a dark frame. The dark current is 1% of the signal in the science frames. It gets subtracted to some extent during the sky subraction phase anyway (if left in at this stage). 3. Make sky flat from science frames. a) First check mean/RMS in each: imstat @list.science (where list.science contains frames 01MYB032 to 01MYB055). They all look stable! b) Now combine: imcombine ("@list.science", "skyflat_k_10x12", rejmask="", plfile="", sigma="", logfile="STDOUT", combine="average", reject="minmax", project=no, outtype="real", offsets="none", masktype="none", maskvalue=0., blank=0., scale="none", zero="median", weight="none", statsec=" ", expname="", lthreshold=INDEF, hthreshold=INDEF, nlow=1, nhigh=1, nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="6", gain="3.8", snoise="0.", sigscale=0.1, pclip=-0.5, grow=0.) c) Check for lingering objects. display skyflat_k_10x12 1 display 01MYB032 2 display 01MYB054 3 beep Looks good. d) Normalize. imstat skyflat_k_10x12 --> # IMAGE NPIX MEAN STDDEV MIN MAX MIDPT skyflat_k_10x12 65536 29305. 2161. -1148. 60396. 29470. imarith skyflat_k_10x12 / 29470. skyflat_k_10x12_nrm e) Flatten science frames. imarith @list.science / skyflat_k_10x12_nrm @list.science//ff 4. Make BPM. imcopy skyflat_k_10x12_nrm bpm_K imreplace bpm_K 0 lower=INDEF upper=0.5 imreplace bpm_K 1 lower=0.5 upper=1.5 imreplace bpm_K 0 lower=1.5 upper=INDEF imcopy bpm_K.fits bpm_K.pl 5. Make object directory containing object files and BPM. (Just J1426+3415-1.48.)