2dfdr data reduction recipe ########################### 1. Run 2dfdr ------------ beforehand: separate each field into a different directory (maybe not essential but it avoids confusion) settings: extract: fit tram map to data = NO sky subtraction: method = Skyline (KGB) auto reduction: setup commands: find fibres (using first flat) -check on plot using 'z' to zoom; QUIT on plot auto reduction: start checks: commands: plot tram line map (zoom; check lines follow fibres) data: plot reduced arc image (check lines vertical) commands: combine reduced runs (makes combined_files.sdf) 2a & 3. Import 2dfdr files into IRAF (NEW) ------------------------------------------ .for Nov 2004 data reduced by Russell Jurek .force into equispec format, not multispec dispcor.input = "crop_041112f3c1" dispcor.output = "crop_041112f3c1a" dispcor.linearize = yes dispcor.database = "" dispcor.table = "" dispcor.w1 = INDEF dispcor.w2 = INDEF dispcor.dw = INDEF dispcor.nw = INDEF dispcor.log = no dispcor.flux = no dispcor.samedisp = yes dispcor.global = no dispcor.ignoreaps = no dispcor.confirm = no dispcor.listonly = no dispcor.verbose = yes dispcor.logfile = "" dispcor.mode = "ql" .update header flags and object IDs list2dfdr2.infile = "crop_041112f3c1a" list2dfdr2.outfile = "dor1s01c1.fits" list2dfdr2.targets = "dor1s01c1_ra" list2dfdr2.apfile = "dor1s01c1_aps" list2dfdr2.fibres = "Dorado_s02_p0_041112f3c1.list" list2dfdr2.field = 1 list2dfdr2.set = 1 list2dfdr2.plate = 0 list2dfdr2.ccd = 1 list2dfdr2.no_sky = yes list2dfdr2.clobber = yes list2dfdr2.verbose = yes list2dfdr2.s_fibres = "Dorado_s02_p0_041112f3c1.list" list2dfdr2.mode = "ql" 2b. Import 2dfdr files into IRAF (OLD) -------------------------------------- .convert SDF to generic FITS and list identifications NB: the data will be in extention 0 of the fits file. > ndf2fits combined.sdf NAME0.fits > 2dfinfo combined.sdf fibres > NAME.list .convert to IRAF-friendly FITS and make formatted object list run this in IRAF; get field,set,plate,ccd from log book cl> task list2dfdr = /home/mdrinkwa/tasks/list2dfdr.cl #the format for names after finding out the field, set, #plate and ccd is cluster,field,s set(two digits),c ccd #eg. virgo1s01c1 is virgo field 1, set 01 using ccd 1 #the plate number is not mentioned in the name cl> lpar list2dfdr infile = "NAME0.fits" input image(blank for list only) outfile = "NAME.fits" output image targets = "NAME_ra" output target list fibres = "NAME.list" 2dF fibre list file name field = 3 Target field ID (integer) set = 5 Target set ID (integer) plate = 0 2dF plate used (0 or 1) ccd = 1 2dF CCD used (1 or 2) (no_sky = yes) Skip skys etc. in target list? (clobber = yes) clobber output files? (verbose = yes) verbose output? (s_fibres = "fnx3s05p0c1.list") (mode = "ql") 3. data analysis recipe in IRAF ------------------------------- .cleaning #drop skys and broken fibres (i.e. N now < 200) scopy NAME.fits NAME_obj band=1 beam=1 renumber+ #interpolate over badly subtracted sky lines cl> display NAME_obj 1 cl> display NAME_obj 2 #zoom and inspec to find xrange of bad sky lines #y-range is 1 N where N is new no. of spectra cl> fixpix fnx1s10c1_objs STDIN 463 467 1 181 # e.g. x1 x2 y1 y2 534 540 1 181 ^D (CTRL-D) cl> display NAME_obj 2 (then blink to see if it worked) #restrict total wavelength range in case bad at one end #in splot, do "#" to select first, last spectra to check range #and pick smaller range (check first few at both ends sometimes #first and last frames aren't representative of spectra at ends) cl> splot NAME_objs (get good wavelength range) cl> scopy NAME_objs NAME_cln w1=3594 w2=7970 # edit out bad cosmic ray events, ie remove bad lines cl> splot NAME_cln # repeat for EVERY spectrum! # zoom on possible bad lines('w';'e'at bottom left;'e'top right) # zoom out with 'w' 'a' # -look for bad lines (very -ve or narrower than 8.5A resolution) # -measure width by typing 'k' twice around base of line # -if in doubt don't change it # -remove bad lines ('x' twice at good points either side of line) # if you removed a line save this NOW: 'i',NAME_cln,'yes' to overwrite # move to next spectrum ')' .take out atmospheric absorption (IGNORE for your stellar data sets) scombine NAME_cln smooth group=all splot smooth; normalise by fit; -> NAME_avgs sarith NAME_cln / smooths NAME_atm ignoreap+ .save in a different backup place NAME0 -> NAME_raw NAME_cln -> NAME_cln NAME_atm -> NAME_atm NAME_ra -> NAME_ra ###################################################################### ANALYSIS [to be continued!] .run xcsao automatically #load the package containing xcsao rvsao #set parameters for xcsao task cl log2022x # automatically after editing Proc1 ./Proc1 (make executable first) .use Proc2 to merge with RA Dec list # manually e.g.: paste -d" " NAME_ra log2071x > log2071y # automatically as before .xcsao -rerun manually; edit corrections into "Xcorrections" file #open up a Corrections file in your new log directory by typing the #following while working in your log directory emacs Xcorrections & #go back to your xgterm window and run xcsao manually xcsao NAME_cln specnum=1-N #at the top of the "Xcorrections" file put the name of the log that # it applies to eg. log1011y #you can add entries for more logs in the same file by just writing the next name "log1012y" and continuing. #go through xcsao checking that each spectrum is worthwhile data # q moves to the next spectra(works in line display as well) # l brings up a display of the lines used by xcsao # f exits the line display # z zooms in the line display, press twice on either side of a # region you would like to zoom in on # u unzooms .what to look for #good data will have R values clearly above 3 the higher the R #values are above 3 the better and the more of them above 3 the better #CZ values will be similiar eg. 135, 180, 157 (maybe 200 or 100) but #not something such as 135 and 1220, the more CZ values that match the #better, the velocity graph will have a predominant peak in its center #and only one peak(other peaks correspond to other possible solutions) #in the line display you should be happy that spectral features used #by xcsao really are features and not just noise used mistakenly, be #aware that even in good data not all features will be real, but the #more that are real the better .what not to look for #data with multiple peaks on it's velocity profile, R value/s only #just above 3, spectrums containing a lot of noise and almost no real #spectral features, CZ values that don't agree or which are very large #(note that large CZ values doesn't necessarily mean it is bad data, #just that the data is suspicious and you should check it carefully) #the main thing which makes bad data is a lack of discenible(real) #spectral features for xcsao to use in it's calculations .handy hint #the pair of O III lines are always in the ratio 3:1 .making corrections #the highest R value of most bad data will be below 3 so unless it is #close to 3 nothing needs to be done, if it is close to 3 or is #greater than 3, in your corrections file type the spectrum number #followed by a minus 1 eg. 112 -1 ,reads spectrum 112 is bad data #use a 0 to show something that you are not sure about, at any stage #if you see something that you want to edit before viewing again #make a note of it here .rerunning xcsao on files that are using bad sky subtraction, sky lines .or really bad noise as a feature #if a bad sky subtraction has taken place or a sky line is still #present,etc. and xcsao is using it as a feature in some data, #manually rerun xcsao on the specific spectrum excluding the #appropriate wavelengths using end_lambda and start_lambda parameters xcsao NAME_cln specnum=112 end_lambda=7400 #will run xcsao on spectrum 112 excluding the spectrum from 7400 #onwards during analysis, if the data is good after doing this record #the appropriate values in your "Corrections" file in the following #format eg. 13 3.57 -123.78 87.533 O54k50v.fits #spectrum number, highest R value, corresponding CZ value, #corresponding CZ error value, corresponding template # if you really believe the redshift although R<3 (sometimes with emission line objects) you can force it by fibbing that R=9: # 13 9 -123.78 87.533 femtemp00.fits .what to do about quasars #when you identify quasars mark them with qsa to show what they are #then load the appropriate parameters into xcsao and run it manually cl3) # if R<3 but you believe it, force its acceptance by fibbing R=9: # 19 9 270686.9 360.125 qsotemp00.fits .what to do about emission line galaxies # they often get a bad redshift even though you can see the lines # run xcsao limited to just the elg templates: xcsao NAME_cln specnum=112 templates=@tasks$templates/list_2dfe xcsao NAME_cln specnum=112 templates=@tasks$templates/list_2dfeb .use Proc3 to apply these corrections # manually /home/mjd/bin/apmcorrect Xcorrections no # or automatically with Proc3 .use Proc4 to remove repeat observations if any # first make a file called Xrepeats with one "log" line per # observations set and extra lines indicating any repeats to skip: log2082y1 log2091y1 142 -1 1 2131 18 better log2092y1 34 -1 1 2132 123 better log2101y1 log2102y1 # run Proc4 which causes the repeats to drop out and writes 3 files # listing the results: Xmeasured -all observations (minus repeats) Xmeasured3 -all good (R>=3) observations Xmeasured3m -all good ones which are cluster members sequence: 1. make initial Xrepeats with just the "log2091y2" lines 2. source Proc4 3. apmrepeat2 (searches for repeats) 4. paste any repeats into Xrepeats 5. GOTO step 2; check no repeats left ------------------ params_dofibers ------------------ dofibers.objects = "forn1" dofibers.apref = "flat1" dofibers.flat = "" dofibers.throughput = "sky1" dofibers.arcs1 = "arc1" dofibers.arcs2 = "" dofibers.arctable = "" dofibers.readnoise = "6" dofibers.gain = "3" dofibers.datamax = 60000. dofibers.fibers = 200 dofibers.width = 4. dofibers.minsep = 3. dofibers.maxsep = 8.5 dofibers.apidtable = "aplist" dofibers.objaps = "" dofibers.skyaps = "" dofibers.arcaps = "" dofibers.objbeams = "0,1" dofibers.skybeams = "0" dofibers.arcbeams = "" dofibers.scattered = no dofibers.fitflat = no dofibers.clean = yes dofibers.dispcor = yes dofibers.savearcs = yes dofibers.skysubtract = yes dofibers.skyedit = yes dofibers.saveskys = yes dofibers.splot = yes dofibers.redo = no dofibers.update = yes dofibers.batch = no dofibers.listonly = no dofibers.params = "" dofibers.mode = "ql" # EOF ------------------ params_sparams ------------------ sparams.line = INDEF sparams.nsum = 30 sparams.extras = no sparams.lower = -3. sparams.upper = 3. sparams.ylevel = 0.05 sparams.t_step = 30 sparams.t_function = "legendre" sparams.t_order = 3 sparams.t_niterate = 1 sparams.t_low = 3. sparams.t_high = 3. sparams.weights = "variance" sparams.pfit = "fit1d" sparams.lsigma = 3. sparams.usigma = 3. sparams.background = "fit" sparams.b_function = "legendre" sparams.b_order = 1 sparams.b_sample = "-12:-5,5:12" sparams.b_naverage = -100 sparams.b_niterate = 1 sparams.b_low = 3. sparams.b_high = 3. sparams.threshold = 10. sparams.coordlist = "linelists$idhenear.dat" sparams.match = 10. sparams.fwidth = 4. sparams.cradius = 10. sparams.i_function = "spline3" sparams.i_order = 1 sparams.i_niterate = 1 sparams.i_low = 3. sparams.i_high = 3. sparams.refit = yes sparams.addfeatures = no sparams.select = "interp" sparams.sort = "jd" sparams.group = "ljd" sparams.time = no sparams.timewrap = 17. sparams.linearize = yes sparams.log = no sparams.flux = yes sparams.s_function = "spline3" sparams.s_order = 1 sparams.fnu = no sparams.mode = "ql" # EOF ####################################################################### Analysis (very brief version!) 1) Shift to rest wavelengths sp> task get2df = /home/mjd/lib/tasks/get2df.cl task shift2df = /home/mjd/lib/tasks/shift2df.cl 2) Measure equivalent widths with sbands onedspec lpar sbands my files in: piscopia:/data1/mjd/melbourne/fornaxd/work_reduced> filter_4 filter_8 filter_a piscopia:/data1/mjd/melbourne/fornaxd/work_reduced> cat filter_a 3000 0.350 4000 0.350 5000 0.350 6000 0.350 7000 0.350 8000 0.350 9000 0.350 9999 0.350 piscopia:/data1/mjd/melbourne/fornaxd/work_reduced> cat bands_ha halpha 6560 70 none blue1 6475 100 filter_a red1 6750 100 filter_a