COMPILING GETJOB ---------------- Source code: getjobv2.2.m, phdlibsd.f imslib2d.f Language: Mortran and Fortran Libraries: pgplot, cfitsio, X11 1. Compile the Mortran Source ----------------------------- To compile getjob into Fortran, use the mortran copiler: mortex getjobv2.4.m This produces the Fortran file FTN.f, which is compiled in the next step. The mortran compiler in included with the GETJOB source distribution. 2. Install the pgplot library ----------------------------- Although the PGPLOT library may exist on your site/machine the PGPLOT does not correctly deal with Linux xgterm windows. Therefore I have made small modifications to the PGPLOT routine "ttdriv.f" to enable the use of color in PGPLOT and xgterm. You should replace your existing PGPLOT ttdriv.f routine with the one included in the GETJOB directory. Run "f77 -c ttdriv.f" iand put the new ttdriv.o in your pgplot directory, and then run "make", in order to produce the new "libpgplot.a" library. 3. Compile the Fortran ---------------------- On my Linux machines I compile the fortran code as follows: g77 FTN.f phdlibsd.f imslib2d.f -lcfitsio -L/home/andy/pgplot -lpgplot -L/usr/X11R6/lib -lX11 /usr/lib/libpng.so.3 It was necessary for me to modify the PGPLOT library to function with an "xgterm" window, which is why I have my own version of PGPLOT. Note: For SUN f77 compileirs it may be necessary to use the -Nx4000 and -Nn3000 flags. 4. Set the environment variable ------------------------------- To use pgplot it is necessary to indicate the environment variable PGPLOT_DIR, which specifies the directory location of certain pgplot files (eg grfont.dat). On my laptop redhat 4.2 I use: export 'PGPLOT_DIR=/usr/local/pgplot' On my desktop redhat6.0 I use: setenv 'PGPLOT_DIR=/usr/local/pgplot' 5. Use a gterm window ------------------------- To run the program you need a gterm or xgterm window. INPUT FILES ----------- To run GETJOB four files may be required: 1. The spectrum, which must be fits or gzipped fits files (.fits or .fits.gz) produced by IRAF. The spectrum should be approximately normalized to unit continuum (this does not have to be precise). 2. A variance file (optional), which has the same dispersion solution as the spectrum file, but each element is the square of the S/N of the corresponding spectrum pixel. If this option is omitted, then the keyword S/N must be present in the spectrum header, with a value which indicates S/N for the continuum level. 3. A file named "LINES", which contains the list of lines to measure, a list of bad pixels, a list of continuum regions (or instructions for continuum handling), and plotting instructions, as well as various keywords for specialized functions. 4. A file named "rvlist.dat". This contains a list of expected strong lines in the spectrum, used to determine radial velocity. These lines should be the strongest features within the search range. THE LINES FILE -------------- 1. Continuum Keywords --------------------- AUTOCONTIN #1 #2 In continuum windows of #1 pixels, adopt the #2 contiguous pixels with the highest flux as the continuum level in that window. This is a quick way to estimate the continuum, but care is required to select #1 and #2, especially for heavily blanketed spectra or low S/N spectra. Cosmic ray noise can result in spuriously high continua. (A10,2F10) CONTINUUM #1 #2 (#3)(#4) Tells GETJOB to use the mean of the highest contiguous #3 pixels in the wavelength interval #1 to #2 (blue to red) as a continuum point. This has the advantage that continuum regions determined previously can be utilized, thus avoiding errors due to random or systematic noise. If #3 is omitted, or set to 0.0, then all pixels from wavelength #1 to #2 are used. If #4 is set it gives a scale factor, default 1.000, to multiply by the continuum flux; it is useful for estimating continuum levels from regions near the continuum which suffer from line blanketing. (A10,4F10) FITCONTIN Fit the continuum regions with a polynomial, up to order 20. A minimum in the reduced Chi-squared is used to adopt the order of the fit. If FITCONTIN is not used the continuum is linearly interpolated between continuum points. NORMALISED Tells GETJOB that the continuum flattening has already been performed. In this case no continuum regions or continuum fits are required; the continuum is assumed to be 1.00 througout. OLDCONTIN filename Tells GETJOB to use the continuum polynomial fits from an OUTPUT file from a previous run. For rows not covered by the OUTPUT file the continuum is determined by use of other methods (e.g. with CONTINUUM or AUTOCONTIN keywords). (A10,A70) 2. Line Width Keywords ---------------------- FOCUS #1 #2-#8 Provide a polynomial fit to the resolving power of the spectrum as a function of wavelength. The function should be determined from comparison line measurements (A5,F5.1,7F10.5). Note that this is not absolutely required by GETJOB. #1 The line in the 2-dimensional image to which the fit applies; if zero or left blank, then it is assumed to be a global focus function. NOTE: For a global focus function the #1 parameter is not wavelength, but the A1 term of the focus function. #2 The central or zero wavelength, W0, in Angstroms; the polynomial fit is made with X=W-W0 to reduce the number of digits required for a good fit. #3-#8 Coefficients of the poynomial, A1-A6. The resolving power at any wavelength in the order is given by: R = A1 + A2*X + A3*X**2 + A4*X**3 + A5*X**4 + A6*X**5 INST_PROF Assume that the line widths are equal to the instrumental profile; this is useful for lower-resolution spectra, where the instrumental width is much larger than the natural line widths. VSINI #1 Enters the adopted vsini of the star. Line fitting with this option is presently quite slow. This option has not been used much, so is not as good as it could be, and slow. (A10,F10) FWHM #1 #2 #3 #4 Generally not used. Specifies a depth-width relation to override one otherwise computed from the GOOD lines. The width to depth relation is used to improve the EW estimates of blended and weak lines. (A10,4F10) The coefficients #1-#4 are: #1 INTERCEPT: the intercept of the straight line fit of 1/(R**2) with central line depth, where R is width/wavelength. #2 SLOPE: the slope of the straight line fit. #3 MINIMUM DEPTH: The depth at which all weaker lines have the same width. #4 SIGMA_R: the standard deviation of the scatter about the fit, as a fraction of the R value; for the INST_PROF option this is assumed to be 0.05 (ie 5%). 3. Display Keywords ------------------- PLOT #1 #2 Display the wavelength region #1 to #2 on the screen. Many regions can be displayed; although plotting is not required. (A10,2F10.3) PLOTALL Display the entire spectrum of any image line, or order, which contains a measured spectral line (my preferred mode). A10 PLOTCONTIN Generally not used. Display each order for continuum fitting BEFORE any lines are measured. I prefer to employ the CONTINUUM PLOT ('cp') command in the interactive session. A10. 4. Other Keywords ----------------- BADDIODE #1 #2 #3 The pixels from #1 to #2 in line #3 of the image are bad, and should be ignored when making line or continuum fits. (A10,3F10.3) IGROW #1 Grow parameter for new method of identifying bad pixels (diodes): In version "getjobv2.12" an alternative method of identifying bad diodes, or bad pixels, was introduced. Any pixels with normalized flux of -0.50, or less, are flagged as bad and are not used. The "igrow" parameter gives the number of pixels adjacent to the bad pixels, identified in this way, to also exclude. (A10,F10.3) 5. Line Parameters ------------------ Each line to be fit should have a LINES file entry, in A10,4F10,3I5 format; but only the LINE ID and WAVELENGTH parameters are required. LINE ID, WAVELENGTH, [ATOM], [EP_LOW], [GF], [IFLAG], [ILEFT], [IRIGHT] LINE ID A 10 character identification WAVELENGTH Wavelength in Angstroms ATOM Numerical ID for the atomic or molecular species, e.g. 26.1 = Fe II EP_LOW The lower excitation potential of the line (usually in eV). GF The gf value of the line. IFLAG Indicates a "GOOD" line if set to 999, GOOD lines are used to refine the radial velocity and determine a width to depth relation. If IFLAG is set to 100 the line is assumed to be naturally broad, so GETJOB will not over-ride the fitted width with the width to depth relation, as is normally done with blended broad lines. ILEFT Should not be used, unless desperate problems occur. Indicates the number of pixels left of the center that should be used in the fit; if set to a negative value, indicates that the left wing is badly blended. IRIGHT Same as ILEFT, but for right side of the line. Don't use it! THE "rvlist.dat" FILE --------------------- This is a simple file to help determine the stellar radial velocity. Only the wavelength is necesary, as the first non-blank entry one for each line. The present crude implementation requires that each line center is the deepest point in the spectrum within the search range (the first guess RV and search range is entered interactively at the start of the program). Here is a sample rvlist.dat file: 6230.736 Fe I 6243.114 V I 6430.856 Fe I 6439.083 Ca I 6494.994 Fe I 6496.908 Ba II 6643.638 Ni I 6677.997 Fe I 6717.687 Ca I 7122.206 Ni I 7207.396 Fe I 7462.342 Cr I 7495.077 Fe I 7511.031 Fe I OUTPUT FILES ------------ OUTPUT Contains the measured continuum and line parameters (including EW) for each line, in each order, of each spectrum. MOOGINP A file in MOOG-LINES format containing the EW and atomic data for all lines; this can be piped directly into A.McWilliam's MOOG-LINES spectrum synthesis program. MOOGINP.2002 for Sneden's MOOG (year 2002) input format. MOOGDEPTH Similar to MOOGINP, but contains central line depths instead of EWs. WIDPLOT Contains information to plot the width to depth relation in an out-dated plotter language. SPECPLOT Contains data for making plots of the display screen when the 'ha' command is issued, including any overplotted MOOG synthesis spectra. The plotter language is out-dated and needs to be improved. ERRORS Lists all the problems encountered; frequently problems occur with line fitting, but GETJOB recovers from these by restricting the parameters. This is not a very useful output file; don't take the complaints seriously if you are in interactive mode. INTERACTIVE WIDTH TO DEPTH RELATION COMMANDS -------------------------------------------- '? ' Help provides keyword help for W-D session 'al' ALL LINES Load all lines detected in LINES file for WIDTH-DEPTH relation 'b ' BLOWUP use cursor and x, y, or e to blowup: x or y to expand in X and Y directions and e for both 'fs' FULLSCALE remake the current plot, but scale X and Y axes to the range of data points 'if' INTERACTIVE FIT perform an interactive fit to current data points for the W-D relation. User is prompted for data bounds and sets robust or least squares estimation. 'q ' QUIT quit the W-D interactive session and continue to next phase 'r ' REJECT POINT reject a single point from the current W-D dataset 'rg' RELOAD GOOD LINES erase current line W-D dataset and reload GOOD LINES INTERACTIVE COMMANDS FOR GETJOB ------------------------------- 'a ' AGAIN refresh the present data display 'ac' ADD CONTINUUM add a continuum region, indicated with the cursor 'b ' BLOWUP use cursor and x, y, or e to blowup: x or y to expand in X and Y directions and e for both 'z ' ZERO replot present screen with zero flux at base 'cc' CORRECT CONTINUUM replace a continuum point 'dc' DELETE CONTINUUM delete continuum 'cp' CONTINUUM PLOT plot continuum points and fit 'fc' FIT CONTINUUM fit continuum with polynomial (up to order 20) 'nf' NO FIT linear interpolation between continuum points 'ml' MARK LINES mark line positions 'op' OVERPLOT overplot data points on continuum plot window 'ds' DISPLAY plot present spectrum window and line fits 'ew' EQUIVALENT WIDTH measure EW by Simpson's Rule integration 'fl' FULL LENGTH plot entire spectrum on screen 'ha' HARD COPY produce a file with present data window and syntheses 'r ' REJECT reject line from list 'rm' RE-MEASURE re-compute line fits; necessary if continuum has changed 'p ' POINT print pixel position of cursor 'pb' PAGE BACK go back one display page 'pl' PLOT overplot a spectrum synthesis file produced by MOOG 'pt' PLOT TYPE change spectrum plotting between connected, binned, or points 'n ' NEXT LINE go to the next line 'nn' NEXT go to the next plot region, order or spectrum 'l ' LAST LINE go to the previous line 'll' LAST go to the last plot region 'c ' CONTINUE go to next display page of present plot region 'q ' QUIT quit interactive inspection of this plot region 'sg' SINGLE GAUSSIAN make a single gaussian fit. If 'f' is used to mark line apex, then user may fix center, depth or FWHM. 'dg' DOUBLE GAUSSIAN make a double gaussian fit. If 'f' is used to mark line apex, then user may fix center, depth or FWHM. 'tg' TRIPLE GAUSSIAN triple gaussian fit. If 'f' is used to mark line apex, then user may fix center, depth or FWHM. 'sl' SHOW LINES show the saved gaussian line fits in the present screen 'v ' VSINI set vsini (if vsini>0 fitting is slow) 'ab' ABORT write-out present results and exit the program