The flux calibration is done with a set of IDL routines written by Tom Matheson. They are described at length in Sec. 2.2 of the reductio.ps file contained in the redux/ directory created during the installation process (see below). You are strongly advised to read this document as you go through the Step by step tutorial!
/data/www/projects/supernova/SNfast/redux.tar /data/www/projects/supernova/SNfast/wombat.tarCopy both tarballs to your IDL directory and unpack them there. This will create redux/ and wombat/ directories that contain all the IDL routines. Make sure these directories are in your IDL path, e.g.:
setenv IDL_STARTUP /home/username/idl/idl_startup.pro [in your .cshrc]where idl_startup.pro contains the following:
pathsep = path_sep(/search_path) !path = expand_path('+/home/username/idl/') + pathsep + !path
Start by copying the data over to a directory of your choice (hereafter called <REDUCE_DIR>):
~> cp /data/www/projects/supernova/SNfast/reduced/d*ms.fits <REDUCE_DIR>These d*ms.fits files are the 1D wavelength-calibrated spectra extracted in multispec format using standard IRAF routines.
Go to <REDUCE_DIR> and create a file (here called dlist) containing the names of all the d*ms.fits files:
~> cd <REDUCE_DIR> ~> ls d*.ms.fits > dlist ~> cat dlist d0107.HD84937.ms.fits d0108.HD84937.ms.fits d0109.HD84937.ms.fits d0111.Feige34.ms.fits d0117.sn2008bf.ms.fits d0119.sn2008ax.ms.fits d0121.sn2008bm.ms.fitsThese files comprise spectra of two standard stars (three spectra of HD84937 and one spectrum of Feige34) and three supernova spectra.
Then start idl in that same directory:
~> idl IDL>
cal, second [, /fast]where second is a positive integer that should be non-zero to enable second-order correction mode (in which case two standard stars are used instead of one). In this tutorial we will apply a second-order correction, so we should type the following command at the IDL prompt:
IDL> cal, 1This will open up an IDL graphics terminal with the title Wombat. Feel free to resize this window.
Star type Coords. (J2000.0) ---------------------------------------------- HD 19445 red 03:08:25.589 +26:19:51.39 HD 84937 red 09:48:56.100 +13:44:39.32 BD+26 2606 red 14:49:02.357 +25:42:09.16 BD+17 4708 red 22:11:31.374 +18:05:34.17 Hiltner 600 red 06 45 13.371 +02 08 14.70 Feige 34 blue 10:39:36.740 +43:06:09.25 BD+28 4211 blue 21:51:11.022 +28:51:50.36 Feige 110 blue 23:19:58.398 -05:09:56.21NOTE on the /fast option: Running cal.pro with the /fast option (i.e. IDL> cal, 1, /fast) will tune the settings to those commonly used for SN spectral reductions with the FAST spectrograph. In this tutorial we will not use this option, but check out the various "NOTE on the /fast option" for more info. (Note that you should use this option when reducing FAST SN spectra for sake of consistency!)
You should see the following output on your screen:
% Compiled module: CAL. Welcome to cal.pro This program is a driver for the calibration routines. It expects files that have been dispersion calibrated, usually through IRAF (you know, with a -d- in front). (In other words, include the d in your file names.) First, should this be an interactive or non-interactive session? Interactive sessions ask more questions so you have more control, but take longer. You have selected second-order correction mode Interactive? (y/n)Answering 'y' here will turn on the interactive mode for the four core routines (realmkfluxstar.pro, calibrate.pro, realmkbstar.pro, and final.pro; see below). You are stongly advised to use interactive mode!
NOTE on the /fast option: setting the /fast option will automatically select interactive mode.
You are then prompted to enter a "grating code":
Interactive? (y/n) y We now need a grating code, such as opt or ir2. This will be used to keep track of the fluxstar and bstar as in fluxstaropt.fits or bstarir2.fits Enter the grating code:You should enter a name that corresponds to the "blue" standard star (or to the single standard star if you haven't selected second-order correction mode). That name is used to generate various files along the way. Here our "blue" standard is Feige34, so let's pick f34b as our grating code ("f34" for "Feige34", with a "b" appended for "blue"; note that you can pick any name you want here):
Enter the grating code: f34b
You then need to enter the filename corresponding to the "blue" standard star:
Now the fits file for the fluxstar. Fluxstar file:Here we should enter the name of the 1D wavelength-calibrated extracted spectrum (in multispec format) corresponding to Feige34:
Fluxstar file: d0111.Feige34.ms.fitsThen comes this most obscure question:
Do you want to use the same star as the b-star? (y/n)This simply means "do you want this same standard star spectrum to be used for removal of telluric features?", cf. the section below on Making the B-star spectrum. If the standard star spectrum has a flat continuum at the wavelengths of the atmospheric A- and B-bands (7620 A and 6880 A, respectively), as is the case here, answer 'y':
Do you want to use the same star as the b-star? (y/n) ySince we are running cal.pro with the second-order correction mode, the same set of questions is asked for the "red" standard star (HD84937 in our case):
Enter the grating code for the second standard: h84r Now the fits file for the second fluxstar. Fluxstar file: d0109.HD84937.ms.fits Do you want to use the same star as the b-star? (y/n) yNOTE: There are three spectra available for HD84937. In general one should pick standard stars that were taken closest in airmass to the science targets. In our case, all spectra were taken at an airmass ≤ 1.1:
~> gethead d*ms.fits airmass d0107.HD84937.ms.fits 1.110352 d0108.HD84937.ms.fits 1.110944 d0109.HD84937.ms.fits 1.111565 d0111.Feige34.ms.fits 1.027796 d0117.sn2008bf.ms.fits 1.027708 d0119.sn2008ax.ms.fits 1.018854 d0121.sn2008bm.ms.fits 1.075248so any HD84937 spectrum will do here.
~> cat std.list Feige34 HD84937Check out lines 118-130 in cal.pro for the list of available standard star names and corresponding grating codes (more can be added if necessary).
Next we need to specify the name of the file containing the list of spectral filenames (dlist in our case):
Now for the file containing the list of objects. Object list file: dlist OK, here we go.We are now ready to make the flux stars (see below).
The syntax of realmkfluxstar.pro is as follows:
realmkfluxstar, fluxfile, gratcode, intera [, /fast]In our current example, this routine is automatically called by cal.pro as: (again starting with the "blue" standard star)
realmkfluxstar, 'd0111.Feige34.ms.fits', 'f34b', 1The "blue" standard star is plotted up in the graphics output terminal (normal extraction in red, optimal in white). Click on the thumbnail below to see the result:
Flux star routine % Compiled module: REALMKFLUXSTAR. % Compiled module: READFITS. % Compiled module: SXPAR. % Compiled module: GETTOK. % Compiled module: VALID_NUM. % READFITS: Now reading 2683 by 1 by 4 array % Compiled module: PACHECK. % Compiled module: SXADDPAR. 120 % Compiled module: GETMSWAVE. % Compiled module: FINALSCALER. Plotting optimal as white, normal as red Do you want to use the (n)ormal or the (o)ptimal extraction? oYou then have to select which star your "blue" standard corresponds to from a long list. In our case the "blue" standard is (27) FEIGE 34 (STONE):
% Compiled module: QUADTERP. % Compiled module: ZPARCHECK. % Compiled module: ABCALC. The object is Feige34 WHICH STANDARD STAR IS THIS ? ORIGINAL MCSP FLUX STANDARDS (AB79 SCALE): (1) HD 19445 (2) HD 84937 (3) BD+262606 (4) BD+17 4708 (5) HD 140283 (SOMEWHAT OBSOLETE) OTHERS (AB69, AB79, STONE, OR BALDWIN/STONE SCALE): (6) GD-248 (AB79) (7) G158-100 (AB79) (8) LTT 1788 (B/S) (9) LTT 377 (B/S) (10) HZ 4 (~AB79) (11) HZ 7 (~AB79) (12) ROSS 627 (~AB79) (13) LDS 235B (~AB79) (14) G99-37 (~AB79) (15) LB 227 (~AB79) (16) L745-46A (~AB79) (17) FEIGE 24 (~AB79) (18) G60-54 (~AB79) (19) G24-9 (AB79) (20) BD+28 4211 (STONE) (21) G191B2B (~AB79) (22) G157-34 (AB79) (23) G138-31 (AB79) (24) HZ 44 (~AB79) (25) LTT 9491 (B/S) (26) FEIGE 110 (STONE) (27) FEIGE 34 (STONE) (28) LTT 1020 (B/S) (29) LTT 9239 (B/S) (30) HILTNER 600 (STONE) (31) BD+25 3941 (STONE) (32) BD+33 2642 (STONE) (33) FEIGE 56 (STONE) (34) G193-74 (AB79) (35) EG145 (OKE,74) (36) FEIGE 25 (STONE) (37) PG0823+546 (38) HD 217086 (39) HZ 14 (40) FEIGE 66 (41) Feige 67 (Groot special) (42) LTT 377 (43) LTT 2415 (44) LTT 4364 (45) Feige 15 (46) Hiltner 102 (lousy) (47) LTT 3864 (48) LTT 3218 (49) CYG OB2 (50) VMa 2 (51) EG 274 (Hamuy) (52) LTT 3218 (Hamuy) (53) LTT 6248 (Hamuy) (54) LTT 7987 (Hamuy) (55) L870-2 (56) CD 32 (57) LTT 4816 (58) EG 131 : 27Now you need to manually fit a spline to the continuum of the blue standard star (this is the most time-consuming part of the flux calibration).
Time to fit the continuum manually. % Compiled module: FITSPLINE. % Compiled module: GET_ELEMENT. % Compiled module: UNIQ. % Compiled module: INT. % Compiled module: SIGN. % Compiled module: CAST. % Compiled module: TYPE. % Compiled module: DEFAULT. Is this ok? (y/n)If you answer 'n', you will be asked whether you want to change the plot scale, which enables you to zoom in on certain parts of the spectrum. I typically answer 'y' here, and then you can mark the lower-left and upper-right corners of the zoom region with the left mouse button:
Change scale? (y/n) Mark the corners of your box...Click on the thumbnail below to see the result of zooming in on the blue part of the spectrum:
Select continuum points for spline fit (up to 500). (a)dd point (d)elete point (f)it splineNOTE: If you'd rather use mouse buttons instead of keyboard keys to add points, delete the point nearest to the cursor, and (re)fit a spline, you can uncomment lines 315-361 in the fitspline.pro routine. You would then see the following message:
Click on continuum points for spline fit (up to 500). Left button = add point Middle button = delete point Right button = doneYou can iterate back and forth, constantly redrawing the fit so that it is clear. A good rule to follow is to fit to the white part, and to make a smooth curve (the true stellar continuum) over the purple parts. Another thing is to make sure the ends of the spline don't do anything crazy. We don't trust the data out there anyway, but it can give enormous flux values to spurious data, and this makes it hard to see the whole spectrum later on when it is scaled to the crazy data in final.pro (see Final calibrations).
Is this ok? (y/n) % Compiled module: SXDELPAR. Writing data to fluxstarf34b.fits % Compiled module: WRITEFITS. % Compiled module: CHECK_FITS. % Compiled module: FXPAR. % Compiled module: FXADDPAR. % CHECK_FITS: NAXIS keywords in FITS header have been updated % CHECK_FITS: BITPIX value of -64 added to FITS headerNOTE on the /fast option: setting the /fast option will automatically chose the optimal extraction, and select the number in the standard star list corresponding to the flux star spectrum.
Second flux star routine % READFITS: Now reading 2683 by 1 by 4 array 12 Plotting optimal as white, normal as red Do you want to use the (n)ormal or the (o)ptimal extraction? o The object is HD84937 WHICH STANDARD STAR IS THIS ? ORIGINAL MCSP FLUX STANDARDS (AB79 SCALE): (1) HD 19445 (2) HD 84937 (3) BD+262606 (4) BD+17 4708 (5) HD 140283 (SOMEWHAT OBSOLETE) OTHERS (AB69, AB79, STONE, OR BALDWIN/STONE SCALE): (6) GD-248 (AB79) (7) G158-100 (AB79) (8) LTT 1788 (B/S) (9) LTT 377 (B/S) (10) HZ 4 (~AB79) (11) HZ 7 (~AB79) (12) ROSS 627 (~AB79) (13) LDS 235B (~AB79) (14) G99-37 (~AB79) (15) LB 227 (~AB79) (16) L745-46A (~AB79) (17) FEIGE 24 (~AB79) (18) G60-54 (~AB79) (19) G24-9 (AB79) (20) BD+28 4211 (STONE) (21) G191B2B (~AB79) (22) G157-34 (AB79) (23) G138-31 (AB79) (24) HZ 44 (~AB79) (25) LTT 9491 (B/S) (26) FEIGE 110 (STONE) (27) FEIGE 34 (STONE) (28) LTT 1020 (B/S) (29) LTT 9239 (B/S) (30) HILTNER 600 (STONE) (31) BD+25 3941 (STONE) (32) BD+33 2642 (STONE) (33) FEIGE 56 (STONE) (34) G193-74 (AB79) (35) EG145 (OKE,74) (36) FEIGE 25 (STONE) (37) PG0823+546 (38) HD 217086 (39) HZ 14 (40) FEIGE 66 (41) Feige 67 (Groot special) (42) LTT 377 (43) LTT 2415 (44) LTT 4364 (45) Feige 15 (46) Hiltner 102 (lousy) (47) LTT 3864 (48) LTT 3218 (49) CYG OB2 (50) VMa 2 (51) EG 274 (Hamuy) (52) LTT 3218 (Hamuy) (53) LTT 6248 (Hamuy) (54) LTT 7987 (Hamuy) (55) L870-2 (56) CD 32 (57) LTT 4816 (58) EG 131 : 2 Time to fit the continuum manually. Is this ok? (y/n) Change scale? (y/n) Mark the corners of your box... Select continuum points for spline fit (up to 500). (a)dd point (d)elete point (f)it spline Is this ok? (y/n) Writing data to fluxstarh84r.fits % CHECK_FITS: NAXIS keywords in FITS header have been updated % CHECK_FITS: BITPIX value of -64 added to FITS headerAgain, you can click on the thumbnails below to see a satisfactory to the blue part of the spectrum (left); a satisfactory to the red part of the spectrum (middle); and the fit to the overall spectrum (right):
The syntax of calibrate.pro is as follows:
calibrate, infile, gratcode, intera, second, gratcode2The "infile" is the file containing the list of spectral filenames (dlist in our case). The "gratcode" is the grating code for the blue standard ('f34b' here), and "intera" should be set to a strictly positive integer for interactive mode. "second" should also be set to a strictly positive integer if in second-order correction mode, in which case "gratcode2" is the grating code for the red standard ('h84r' here).
calibrate, 'dlist', 'f34b', 1, 1, 'h84r'which produces the following terminal output:
Calibration % Compiled module: CALIBRATE. % READFITS: Now reading 2683 array % READFITS: Now reading 2683 array % READFITS: Now reading 2683 by 1 by 4 array The object is HD84937 Aperture 1: % Compiled module: WOMIDLTERP. % Compiled module: INTERPOL. % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is HD84937 Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is HD84937 Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is Feige34 Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is sn2008bf Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is sn2008ax Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS header % READFITS: Now reading 2683 by 1 by 4 array The object is sn2008bm Aperture 1: % CHECK_FITS: BITPIX value of -64 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS headerand creates the following files:
~> ls c*ms.fits cf34bd0107.HD84937.ms.fits ch84rd0107.HD84937.ms.fits cf34bd0108.HD84937.ms.fits ch84rd0108.HD84937.ms.fits cf34bd0109.HD84937.ms.fits ch84rd0109.HD84937.ms.fits cf34bd0111.Feige34.ms.fits ch84rd0111.Feige34.ms.fits cf34bd0117.sn2008bf.ms.fits ch84rd0117.sn2008bf.ms.fits cf34bd0119.sn2008ax.ms.fits ch84rd0119.sn2008ax.ms.fits cf34bd0121.sn2008bm.ms.fits ch84rd0121.sn2008bm.ms.fitsFor example, cf34bd0111.Feige34.ms.fits is the Feige34 spectrum calibrated by itself, while ch84rd0111.Feige34.ms.fits is the same spectrum calibrated using the HD84937 flux star file. Note the difference between the two spectra in the plot below (click to enlarge), especially blueward of 4000 A! (the first spectrum is in white; the second in red).
IDL> calibrate, 'dlist', 'f34b', 1, 1, 'h84r'In that case, you will also need to run final.pro as a standalone routine (see Final calibrations).
The syntax of realmkbstar.pro is as follows:
realmkbstar, infile, gratcode, intera [, /fast]In our current example, this routine is automatically called by cal.pro as: (again starting with the "blue" standard star)
realmkbstar, 'cf34bd0111.Feige34.ms.fits', 'f34b', 'y'NOTE: The "infile" here is the blue standard star spectrum calibrated by itself (see plot below). This makes it easier to fit the continuum on either side of prominent telluric features. Also note that for some reason the "intera" argument is now a string ('y' or 'n') as opposed to an integer.
B-star routine % Compiled module: REALMKBSTAR. % READFITS: Now reading 2683 by 1 by 4 array % Compiled module: AVG. Plotting optimal as white, normal as red Do you want to use the (n)ormal or the (o)ptimal extraction? oThe value of the AIRMASS keyword in the fits header is then displayed, and the user is asked to chose an airmass limit above which the airmass is considered "high" (we enter 1.1 in the example below to correct for weaker atmospheric bands; see the NOTE on the airmass limit):
Airmass = 1.0277960 Above what airmass is considered high? 1.1In non-interactive mode this limit is set to 1.5.
Range (A) Source Identifier ------------------------------------------- 3000-3190 O_3 Huggins 3216-3420 O_3 Huggins 5600-6050 (*) H_2O --- 6250-6360 O_2 --- 6450-6530 (*) H_2O --- 6840-7410 O_2(+H_2O) B(+alpha)-band 7560-8410 O_2(+H_2O) A(+z)-band 8800-9900 H_2O gamma & rho-bands (*) High airmass, sec z ≥ 1.5Under certain circumstances, namely extremely high signal-to-noise ratio observations, the high-airmass water bands will appear even at low airmass. (This is most easily observable in the band-head at 6515 A.) To correct this, there is an interactive version of realmkbstar.pro that allows the user to set the airmass at which the weaker bands are corrected. If you want to correct for these weaker bands, just set the limit to something less than the B-star airmass.
Time to fit the B-star continuum manually. Is this ok? (y/n) Change scale? (y/n) Select continuum points for spline fit (up to 500). (a)dd point (d)elete point (f)it spline 5477.4738 1.4437443 Is this ok? (y/n)Click on the thumbnails below to see a zoom in on the red part of the spectrum, including a satisfactory spline fit, and the resulting normalized spectrum (right):
Do you want to blotch the b-star (y/n, default=n)? n Writing data to bstarf34b.fits % CHECK_FITS: NAXIS keywords in FITS header have been updatedSince we are running cal.pro with the second-order correction mode, the same set of operations needs to be done for the "red" standard star:
Second B-star routine % READFITS: Now reading 2683 by 1 by 4 array Plotting optimal as white, normal as red Do you want to use the (n)ormal or the (o)ptimal extraction? o Airmass = 1.1115650 Above what airmass is considered high? 1.1 Time to fit the B-star continuum manually. Is this ok? (y/n) Change scale? (y/n) Mark the corners of your box... Select continuum points for spline fit (up to 500). (a)dd point (d)elete point (f)it spline Is this ok? (y/n)Here our chosen airmass limit of 1.1 is less that the airmass of the spectrum, and so the weaker atmospheric absorption bands are highlighted in purple (see plot below):
Do you want to blotch the b-star (y/n, default=n)? y % Compiled module: BBLO. Select regions to blotch % Compiled module: WOMWAVERANGE.We can then zoom in on the region with the noise feature to blotch (here we select this zoomed wavelength range with the mouse by typing 'm'). The region is highlighted in red (as in the plot of the normalized spectrum above) and the user is asked to confirm the choice:
Do you want to select wavelength range by entering (w)avelengths or marking with the (m)ouse? (w/m) m Spectrum runs from 3476.6941 to 7420.9327. Mark the two end points of the region 6947.8159 0.93004597 7096.3679 0.94952248 Range selected: 6947.3887 to 7095.9227 Is this range correct? (y/n, default y) yThe zoom region is plotted in the graphics terminal, and the user can select the bounds of the blotch region (in the example below with the mouse by typing 'm').
Do you want to enter blotch wavelengths by hand (w) mark points (m), fit a spline (s), or quit (q) ? m Mark the two end points of the blotch region 7012.3311 0.96511189 7022.5025 0.95930190 Is this acceptable? (y/n, default=y) y Do another region? (y/n, default=n) n Writing data to bstarhd84r.fits % CHECK_FITS: NAXIS keywords in FITS header have been updatedClick on the thumbnails below to see a zoom in on the blotch region with the blotched spectrum overplotted in red (right), and the resulting normalized spectrum, saved as bstarhd84r.fits.
The syntax of final.pro is as follows:
final, inputfile, gratcode, intera, secondord, gratcode2 [, /fast]In our current example, this routine is automatically called by cal.pro as:
final, 'dlist', 'f34b', 1, 1, 'h84r'NOTE: If you have fluxstar*.fits and bstar*.fits files from another night, you can run the above command directly (after having executed calibrate.pro) without starting cal.pro.
Final calibration (atmos. removal, sky line wave. adjust, etc.) % Compiled module: FINAL. % READFITS: Now reading 2683 array % READFITS: Now reading 2683 array % READFITS: Now reading 3395 array Hello, sblondin % READFITS: Now reading 2683 by 1 by 4 array % READFITS: Now reading 2683 by 1 by 4 array The object is HD84937 % Compiled module: GET_COORDS. % Compiled module: TEN. 2008 3 30 6 1 20.000000 % Compiled module: JDCNV. % Compiled module: BARYVEL. % Compiled module: PREMAT. The velocity of the Earth toward the target is -20.903974 km/s. There are 1 apertures in this spectrum. Aperture 1: % Compiled module: MOMENT. Plotting optimal as white, normal as red Do you want to use the (n)ormal or the (o)ptimal extraction? oYou can see a plot of the HD84937 spectrum below:
The spectral flux values are then scaled by a factor 1e15, and
the extracted sky spectrum (in red below) is then cross-correlated
with a master sky spectrum (in white below) for a final wavelength
adjustment:
Scaling data up by a factor of 10^15... The x-cor shift in Angstroms is 0.29412667 White spectrum = master sky Red spectrum = object sky shifted to match master sky Is this ok (y/n, default=y)?Since the exposure time for the HD84937 spectrum is only 12s, the sky lines are far from prominent. Nonetheless, the weak OI line at 5577 A matches that of the master sky spectrum, and the small correction of 0.29 A can be applied here, so we answer 'y' (if not, then you can specify the wavelength shift you want to apply, including 0 A).
Is this ok (y/n, default=y)? y Removing redshift due to motion of the Earth...The heliocentric correction is applied after this wavelength adjustment.
The next step is the removal of atmospheric absorption features using the B-star spectra. These are cross-correlated with the object spectrum at the B-band and the A-band. It determines a wavelength shift at each band, and averages them if both bands are in the spectrum:
% Compiled module: TELLURIC_REMOVE. The ratio of airmasses (object/B-star) is 1.0803233. Cross-correlating object with B-star spectrum... The shift at the B band is 2.4999023 Angstroms. The mean shift is 2.4999023 Angstroms. Plotting spectrum before and after atmospheric band correction... Is this ok? (y/n, default=y) The ratio of airmasses (object/B-star) is 0.99890875. Cross-correlating object with B-star spectrum... The shift at the B band is 1.1764246 Angstroms. The mean shift is 1.1764246 Angstroms. Plotting spectrum before and after atmospheric band correction... Is this ok? (y/n, default=y)You can see the result of applying this correction using the bstarf34b.fits and bstarh84r.fits B-star spectra below:
Next the two ends of the spectra are plotted (see plot below) and you
can input a rebinning wavelength scale and endpoints (in the example
below we accept the defaults by hitting <CR>):
Current A/pix is 1.4705308 Rebinning to 1.47 A. OK? [y/n; default=y] OK, rebinning to 1.47 A. newdelt = 1.47 Current range: 3476.1576 7420.1212 New suggested wavelength range is: 3477.00 7420 Is this OK? [n/y; default=y] NON-INTEGER number of bins Closest match is: 3477.0000 7421.0100 Would you like this wavelength range? (y/n, default=y) y
This next step only applies to the second-order correction mode, which
is the case here. The idea is to use the blue part (meaning blueward
of the Balmer break) of the blue standard star spectrum to calibrate
the blue portion of the spectra. Same line of argument for the red
portion. The routine called is secondcat.pro.
The user first has to select a range over which to an average flux
value is used to scale the two spectra (i.e. a given spectrum
calibrated using the blue standard, and that same spectrum calibrated
using the red standard). You should usually pick a ~4300-4700 A range
to compute the average (4368-4804 A below), i.e. slightly redward of
the Balmer break. See the plot below:
Combining two calibrated spectra: Plotting blue side as blue, red side as red Change y-scale? (y/n, default=n) n Mark the two end points of the region to compute average 4368.3344 2008.9856 4804.7993 1869.5640 Are these points ok? (y/n, default=y) y Average for range 4367.8200 to 4804.4100 Average for 4367.8200: 4804.4100 Blue side: 1995.0804 Red side: 1937.5141 Scale to blue or red? (b/r) r scale to red by 0.97114587Note that scaling to the blue or red spectrum is up to you. Here we chose to scale to the red spectrum because HD84937 is our red standard star. You should check that the scale factor is close to unity (here it's 0.97).
Next we need to select a more restricted range over which the spectra
will be combined. Blueward of this range, the blue standard star will
be used to calibrate the spectrum; redward of this range, the red
standard star will be used to calibrate the spectrum; within this
range, a combination of the blue/red standards is used. In the example
below we will combine the spectra over the range ~4450-4550 A (see
plot below):
Plotting blue side as blue, red side as red Change y-scale? (y/n, default=n) n Mark the two end points of the region to combine 4450.5798 2036.4501 4551.7310 2033.1986 Are these points ok? (y/n, default=y) y Combining over range 4450.1400 to 4551.5700
We're almost done! The final spectrum is plotted (see below), and you
will be prompted for the object name. The output fits file will be
called <OBJECT_NAME>-<UT-DATE>.fits, and the corresponding
error spectrum will be saved as
<OBJECT_NAME>-<UT-DATE>-sigma.fits.
The file is cf34bd0107.HD84937.ms.fits The object is HD84937 The DATE-OBS is 2008-03-30 The aperture is 1 Previous name was Enter the object name for the final fits file: Object name is: HD84937 (UT date and .fits will be added): HD84937-a % CHECK_FITS: NAXIS keywords in FITS header have been updated % CHECK_FITS: BITPIX value of -32 added to FITS header % CHECK_FITS: BITPIX value of -64 added to FITS headerSince there are several (three) spectra of HD84937, we append a -a to the object name. The output files are then HD84937-a-20080330.fits and HD84937-a-20080330-sigma.fits.
Several non-standard keywords are added to the fits header, listed below:
Keyword Explanation ------------------------- W_RANGE wavelength range (A) BSTAR_Z airmass of B-star BSTARNUM file number of B-star BSTAROBJ name of B-star BARYVEL velocity of the Earth toward the target (km/s) SKYSHIFT wavelength shift applied from cross-correlation with a master sky spectrum ATMSHIFT wavelength shift at position of the B- (and A- when present) atmospheric bands EXTRACT 'optimal' or 'normal' REDUCER username of reducer RED_DATE epoch of reduction OBJECT user-defined object name ------------------------- the keywords listed below are only for second-order correction mode ------------------------- SECOND 'yes' if second order correction attempted COMBRANG range over which the blue and red spectra were combined (A) BSTAR_Z2 airmass of 2nd B-star BSTARNU2 file number of 2nd B-star BSTAROB2 name of 2nd B-star FLX2_Z airmass of 2nd flux star FLX2_NUM file number of 2nd flux star FLX2_OBJ name of 2nd flux star
The same process is repeated (apart from the selection of average and
combine regions for the second-order correction, which is kept
identical to the previous selection). You can see the terminal output
for all other files: final_other.txt.
You can see plots of the 7 final spectra below (3 spectra of HD84937,
1 of Feige34, then one of sn2008ax, sn2008bf, and sn2008bm):
There, was that so hard?The answer is entirely up to you!