I used refspectra (noao.onedspec.refspec) to associate reference arcs with star spectra (Some stars have two arcs, which are averaged together)
To do this more easily, I used a cl file.
noao.onedspec.refspectra |
---|
I R A F Image Reduction and Analysis Facility PACKAGE = onedspec TASK = refspectra input = List of input spectra (referen= ) List of reference spectra (apertur= ) Input aperture selection list (refaps = ) Reference aperture selection list (ignorea= no) Ignore input and reference apertures? (select = average) Selection method for reference spectra (sort = jd) Sort key (group = ljd) Group key (time = no) Is sort key a time? (timewra= 17.) Time wrap point for time sorting (overrid= no) Override previous assignments? (confirm= yes) Confirm reference spectrum assignments? (assign = yes) Assign the reference spectra to the input spectrum? (logfile= STDOUT,logfile) List of logfiles (verbose= no) Verbose log output? answer = Accept assignment? (mode = ql) |
This didn't work ('not reference spectra') because I had not used identify yet. After some iraf problems, this finally worked (after a new version of iraf was installed).
I manually did the following files, to figure out how to do it.
1feb05.0038.0037.ms.fits
1feb05.0038.0039.ms.fits
1feb05.0041.0040.ms.fits
1feb05.0045.0044.ms.fits
I then used reidentify, with the first file (1feb05.0038.0037.ms.fits) as a template, to calibrate the rest. I checked the RMS for each fit, and if it was unusually large (over .5, the points were generally very scattered, randomly) checked the fit and identified or deleted lines.
noao.onedspec.reidentify |
---|
I R A F Image Reduction and Analysis Facility PACKAGE = onedspec TASK = reidentify referenc= 1feb05.0038.0037.ms.fits Reference image images = arcsum Images to be reidentified (interac= yes) Interactive fitting? (section= middle line) Section to apply to two dimensional images (newaps = yes) Reidentify apertures in images not in reference? (overrid= yes) Override previous solutions? (refit = yes) Refit coordinate function? (trace = no) Trace reference image? (step = 10) Step in lines/columns/bands for tracing an image (nsum = 10) Number of lines/columns/bands to sum (shift = 0.) Shift to add to reference features (INDEF to search) (search = 0.) Search radius (nlost = 4) Maximum number of features which may be lost (cradius= 5.) Centering radius (thresho= 0.) Feature threshold for centering (addfeat= no) Add features from a line list? (coordli= linelists$idhenear.dat) User coordinate list (match = -3.) Coordinate list matching limit (maxfeat= 50) Maximum number of features for automatic identification (minsep = 2.) Minimum pixel separation (databas= database) Database (logfile= logfile) List of log files (plotfil= ) Plot file for residuals (verbose= yes) Verbose output? (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input answer = yes Fit dispersion function interactively? crval = Approximate coordinate (at reference pixel) cdelt = Approximate dispersion (aidpars= ) Automatic identification algorithm parameters (mode = ql) |
I then ran refspec, successfully this time.
I ran dispcor to set the wavelength scale for the stars, found the wavelength per pixel to be 0.75, and there was a jump to zero on the left end, so ran it again starting at 3511 instead of 3500.
new names are w+original name
noao.onedspec.dispcor |
---|
I R A F Image Reduction and Analysis Facility PACKAGE = onedspec TASK = dispcor input = @starsms List of input spectra output = w//@starsms List of output spectra (lineari= yes) Linearize (interpolate) spectra? (databas= database) Dispersion solution database (table = ) Wavelength table for apertures (w1 = 3511.) Starting wavelength (w2 = INDEF) Ending wavelength (dw = 0.75) Wavelength interval per pixel (nw = 2680) Number of output pixels (log = no) Logarithmic wavelength scale? (flux = yes) Conserve flux? (blank = 0.) Output value of points not in input (samedis= no) Same dispersion in all apertures? (global = no) Apply global defaults? (ignorea= no) Ignore apertures? (confirm= no) Confirm dispersion coordinates? (listonl= no) List the dispersion coordinates only? (verbose= yes) Print linear dispersion assignments? (logfile= ) Log file (mode = ql) |
w1feb05.0042.ms.fits and w1feb05.0043.ms.fits are flat lines (?)
(after using the combined arcs, these spectra were normal)
w1feb05.0056.ms.fits is junk
w1feb05.0058.ms.fits is very noisy (this image was out of focus -
railroad tracks)
Using the log from the last run of dispcor, I found arcs with similar pixel shifts (i.e. they are shifted only a little from each other) and used imcombine to combine these arcs.
I used reidentify to redo the fits for these summed images.
I then again ran refspec using a new .cl file to reassign reference images for the stars whose arcs were summed, then ran dispcor again with the new references.
Several spectra have jumps to zero before 3515, so I reran dispcor starting at 3515. there is a jump to zero at the end also, so set the end wavelength to 5497.
Ran dispcor again, changing the following parameters:
(w1 = 3515.) Starting wavelength
(w2 = 5497.) Ending wavelength
used hedit to set the observatory to mmto (from MMT) to avoid entering this every time