--- External SPECROAD: A User's Guide to
Reducing Hectospec Data using E-SPECROAD

Other External SPECROAD Pages: What is E-SPECROAD? | Installing E-SPECROAD | Version History

Available Downloads:SizeLast Updated
hectoshell_MacOSX_20080807.tgz36 KThu., Aug. 7, 2008
hectoshell_Linux_20080807.tgz36 KThu., Aug. 7, 2008
idhenear.600gpm_4800.dat523 BytesTue., Aug. 5, 2008
Hectospec_HeNeAr_600gpm_4800.pdf485 KTue., Aug. 5, 2008
Hectospec_HeNeAr_Spectrum.pdf2430 KTue., Aug. 5, 2008

This is a quickly composed user's guide for using External SPECROAD (E-SPECROAD) to reduce Hectospec data. A guide to actually installing all the packages necessary to run E-SPECROAD is available here.

While E-SPECROAD is a derivative of the SPECROAD package used at SAO for reducing Hectospec data, there have been enough modifications that I felt it appropriate to document them. Despite these differences, the goal is to have E-SPECROAD provide the same data pipeline that SPECROAD does. It goes through most of the same steps that the original SPECROAD does. As such, you may want to review the documentation to the original SPECROAD available at

http://tdc-www.harvard.edu/instruments/hectospec/specroad.html

TECHNICAL SUPPORT NOTE:

While E-SPECROAD is designed to behave similarly to E-SPECROAD, The Smithsonian Astrophysical Observatory is not responsible for E-SPECROAD and they have no obligation to support it. If you have any questions, I ask that you please address your complaints/suggestions to me at . I will attempt to provide support for E-SPECROAD as time allows.

Preparing your Data Reduction

  1. Data Organization: If you have downloaded the Hectospec data the way Bill Wyatt suggests, you should have each night's data in a separate directory.
    1. If the night's run included changes to the grating, you should review the observing logs and make sure to separate all the different grating configurations into different directories. e.g. – If the night's data includes data shot on the 270gpm grating and data shot with the 600gpm grating at two different central wavelengths, you must create 3 directories, each with data corresponding to only one grating configuration.
    2. Remove any *skycam*.fits files you may have, they are the images from the skycam and not spectra to reduce.
    3. Remove any quick focus (qfocus.fits) files you may have.

  2. Backup your Original Data: E-SPECROAD is reasonably safe, but it does change the FITS files it is working on. These changes are not necessarily reversible. Always make a backup of your original data directories before processing them with E-SPECROAD.

  3. Go to the Directory you will process in the command line: E-SPECROAD is designed to process an entire directory's data in one shot. As such, you will need to choose the directory you are going to work with and go to that directory in the command line.

  4. If you want to use a custom comparison spectrum line list, copy it into the data directory now! When working with the high dispersion spectra, I found many of the lines in the default idhenear.dat file were not suitable for fitting. As such, I created my own line list. I have to install this idhenear.dat file into the data directory before processing (technically, before running specroadcal).

Running the E-SPECROAD pipeline

Running E-SPECROAD data pipeline just involves running three scripts which automate most of the processing. These scripts are called specroad, specroadcal, and specroadobj. In fact, if things go well, the only command you will have to run is specroad, since as each script finishes, the next one begins unless you intervene.

  1. Running specroad: In the directory containing the data you want to process, type specroad on the command line to launch the E-SPECROAD data reduction script. The specroad script is tasked with performing the processing on the dome flats, sky flats, and comparison spectra images before the calibration is to be performed.

    1. Initially specroad attempts to determine where you store your IRAF parameters (this is why you should declare a environmental variable called UPARM that is the full path of your IRAF "uparm" directory). It then tries to determine if you are running MacOS X, Linux, or SunOS/Solaris and tries to determine the number of CPUs you have installed.

    2. HSCREEN runs. It attempts to screen FITS files to find the "target" files (by which I mean FITS files containing the targets you want spectra for) for further analysis. I have found it doesn't always properly identify "target" files. So typically, it presents me with a list of files it proposes to delete which are actually my object files!
      1. I generally answer "no" to

        Delete all these files? (yes or no, or ^C to break):

        because typically what it proposes to delete are files I actually want to process. I then answer "no" to

        Iterate on the list? (yes or no, or ^C to break):

        You can choose differently if you feel it is properly screening the files.

      2. I generally answer "yes" to

        Delete all *.cfg and *.cat files? (yes or no, or ^C to break):

      3. I then answer "yes" to

        OK to proceed with these files? (yes or no, or ^C to break):

      Possible conflict note:
      If an X-window titled "column" opens up immediately after hscreen is called or if hscreen immediately fails with some error, you may have starbase's version of 'column' in your PATH after another executable called "column". I would suggest modifying your PATH so the starbase binaries come first. See the installation notes section on how to "Tweak your command line environmental settings" for notes on modifying your ~/.tcshrc to have the proper PATH environmental variable setting.

    3. MAPCHECK is run to check for the presense and integrity of *_map files using thescript . This portion is non-interactive.

    4. HCALIBPROC is called to combine all the biases into a single Zero.fits file and all the darks into a single Dark.fits file using the hproc command in IRAF. hproc runs preampfix to clean up the overscan region of the image, it then calls ccdproc to bias-subtract, trim, and remove bad pixels from all amplifiers, and then it calls gaincorr to correct for gain variations between the amplifiers. The original images are saved in the Raw/ subdirectory, and images which have only had preampfix run on them are saved in the Unproc/ subdirectory.

      As HCALIBPROC is running, you should see it combining all the bias.*.fits files into one Zero.fits file, it then asks you:

      ccdproc.zerocor=? (yes or no, or ^C to break):

      You should probably answer "yes" as this will then use the (newly created) Zero.fits file to apply the bias correction to all subsequent images we process.

      Then HCALIBPROC will process all the darks, combining them into a single Dark.fits file, at which point it prompts:

      ccdproc.darkcor=? (yes or no, or ^C to break):

      Again, you probably want to answer "yes" to applying the Dark.fits file to all the remaining images we process.

    5. MULTIHPROC is called to process all the remaining comparison spectra (comp.*.fits), sky flats (sflat.*.fits), and dome flats (domeflat.*.fits) through hproc in IRAF. As before, the original images are saved in the Raw/ subdirectory, and images which have only had preampfix run on them are saved in the Unproc/ subdirectory. This process is non-interactive.

      Note: This is also the first of the "multi-" scripts you will see. All the "multi-" scripts try to increase the efficiency of the IRAF tasks by spliting up the job across multiple processors on systems with more than one CPU.

    6. MULTIHMERGE is called to to merge the 4 amps into 1 image for all non-object, non-bias, non-dark FITS files using the hmerge script in IRAF. Copies of the unmerged files are saved in the Unmerged/ subdirectory before processing. This process is non-interactive.

    7. MULTICOMBINE is called to combine domeflats into a single domeflat.fits file, skyflats into sflat.fits file, and all comparison spectra into a single comp.fits . Copies of the uncombined files are saved in the Uncombined/ subdirectory before processing. This process is non-interactive.

    8. At this point, specroad gives you a chance to make a backup of the current data directory. It shows you the command it will use to make the backup directory (which has the same name as the current data directory, except with the suffix _POST_SPECROAD attached) and the copy command. It will then show you the disk space used by the current data directory and the free disk space on the drive. THERE IS NO CHECK TO SEE IF IT IS ACTUALLY POSSIBLE TO PERFORM THE BACKUP, so please check these numbers to make sure enough drive space exists to allow the backup to occur. You are then asked:

      Should SPECROAD perform this backup now?
      (yes or no, or ^C to break):

      If there is enough disk space, you should say "yes", since this gives you the option of backing up to this point if you need to.

    9. Once the backup is completed (or skipped), you are then asked if you want to run the next reduction script, specroadcal. You are asked:

      OK to do specroadcal? (yes or no, or ^C to break):

      Assuming everything has gone OK, answer "yes". You will be shown the command that is called to launch specroadcal. Something like:

      specroadcal -j 8 -u /Users/juan/iraf/uparm/ -s 11:16:03_2008-06-03

      If you answer "no," you will be shown the same specroadcal command necessary to continue the data reduction, but it will not be executed. This might be necessary if you have to backup the data to another drive (something specroad doesn't do).

      In either case, you should make note of the command that should be used, in case you need to relaunch specroadcal manually (although if you have followed my instructions about setting up your user environment, just typing specroadcal should work).

  2. Running specroadcal:Either when launched by specroad or manualy, specroadcal is the script that takes you from raw calibration spectra images to creation of calibrated spectra, creation of the dispersion function, and creation of the throughput correction of the fibers from the flats.
    1. APFLATTEN:
      1. specroadcal checks to see if a "database/aplast" file exists. If it does, it assumes you you have already defined the aperature mask for this field and skips the remaining APFLATTEN steps. Otherwise, you will be asked

        OK to do apflatten?

        Answer "yes" to create "a pixel to pixel normalization file which also removes fringing" from the domeflat.fits file.

      2. specroadcal quickly some parameters for IRAF procedures that will be called during its calls on apflatten.

      3. specroadcal forks an xgterm window running an IRAF session to interactively construct an aperature mask from domeflat.fits.

        In the IRAF session, you should be asked the following questions. Answer with the defaults (shown below):

        Find apertures for domeflat? (yes):
        Number of apertures to be found automatically (300):
        Resize apertures for domeflat? (yes):
        Edit apertures for domeflat? (yes):

        At this point you are dropped into IRAF apedit script. If you haven't used apedit, I strongly suggest you read the helpfile on this IRAF command (within IRAF, type "help apedit") to learn how to properly flag the aperatures.The graphics window that appears shows you a cross-section of all the spectra on the domeflats.fits image. You should also see all 300 apertures labeled. You will likely have to use "windowing" commands to zoom in to sections of the graphics window to make sure all the aperatures are correctly identified. I have generally found apedit was correct in its aperature identifications off the bat, but you need to review the spectra. NOTE: The aperture betwen 150 and 151 is blank, I believe this is correct (its located at roughly 2050 pixels).

        Once you have inspected the apertures, hit 'q' to quit while in the graphics window and accept the identified aperatures.

      4. You now have to fit the individual aperture shapes. Essentially you have to tell IRAF the shape of each of the 300 aperatures on the image. When you quit apedit, you will be asked now the following two questions:

        Fit traced positions for domeflat interactively? (yes):
        Fit curve to aperature 1 of domeflat interactively (yes):


        You should answer "yes" to both. At this point you will be kicked into a graphics window showing the shape of aperture 1 in the domeflat and a dashed line showing the functional fit of this aperture. If you are lucky, the IRAF procedure aptrace (which has called apfit to perform the fit) has defaulted to using a 3rd order Legendre function to fit the profiles (to be consistent with the SAO procedure). If the function isn't set up that way, change it by typing the following commands in the graphics window (the leading colons must be typed):

        :func legendre
        :order 3


        Read the instructions on apfit in IRAF in order to understand how to set this function, delete points, refit the function, etc. When you are done with the fit, type "q" to quit and accept the fit to this aperture.

        You will then be asked:

        Fit curve to aperature 2 of domeflat interactively (yes):

        You should probably say "yes" and inspect this fit. If you are in a hurry, after inspecting a few apertures, you could probably say "NO" to interactive fitting to let the software progress on its own, but that's your risk to take.

      5. Once you have finished fitting the shape of all 300 aperatures, you need to fit the shape of the domeflat profile in all 300 apertures. You will be asked the following:

        Write apertures for domeflat to database? (yes):
        Flatten apertures in domeflat? (yes):
        Fit spectra from domeflat interactively? (yes):
        Fit spectrum for aperature 1 for domeflat.fits interactively? (yes):


        Answer "yes" to all these questions. At this point you are presented with the spectrum in each aperture of the dome flat to fit with a 70 point cubic spline. If the first aperture looks good,you can accept the fit by hitting 'q'. If not, refit with a different function (you are in the IRAF procedure apfit so that help page will contain what you need to know). The fitting should be OK from now on, so at some point, after inspecting a few spectra, you could probably say "NO" to interactive fitting to let the software progress on its own, but again, you do so at the risk of missing a poorly fit spectrum.

        Once done, it will process for a bit, then the xgterm session will quit and you are done with apflatten. A file called flat.fits has been created containing the normalization image.

    2. MULTIHFLAT is called to execute the IRAF process hflat on multiple CPUs in parallel. hflat is run on all the dome and sky flats as well as the spectral calibration images. it divides the original image by the normalization image you created in apflatten in order to remove pixel to pixel variations and fringing. The pre-hflat-processed images are moved to the Nonorm/ subdirectory.

      When this part of specroadcal starts, unless the extracted spectra files already exist (their names are domeflat.ms.fits, sflat.ms.fits, and comp.ms.fits), you are asked:

      Proceed to multihflat? (yes or no, or ^C to break):
      answer 'yes' and these should be no more interaction from this portion of the script.

    3. HEXTRACT At this point, the specroadcal script opens an xgterm window running the IRAF procedure hextract to extract the spectra from domeflat.fits files, storing the extracted spectra in a smaller FITS file named domeflat.ms.fits. This file is smaller because each spectra is stored as a single row of data in the FITS file.

      The xgterm window pops up asking you two questions:

      Resize apertures for domeflat? (yes):
      Edit apertures for domeflat? (yes):


      Say 'yes' to both. For reasons I am not clear on, you will be asked to fit the apertures again as you did during the apflatten stage a bit earlier.

      Fit traced positions for domeflat interactively? (yes):

      I answered 'yes'. Then it asks:

      Fit curve to aperture 1 of domeflat interactively (yes):

      Interestingly, this time around it may default to another function. I reset the function to a 3rd order Chebyshev polynomial fit and fit the shape of the aperatures. Again, when you are done with the fit, type "q" to quit and accept the fit to this aperture. At this point you are asked...

      Fit curve to aperature 2 of domeflat interactively (yes):

      and you will continue to be asked about each aperture. You can answer 'NO' after the first few apertures in which case it will automatically fit the rest (again, you do this at the risk of missing some problem aperture).

    4. MULTIHEXTRACT should run without user interaction to extract spectra from skyflats and comparison spectra into their correspondng *.ms.fits files (unless they already exist).

    5. HCAL must now be run in order to determine the dispersion function for all the apertures from the calibration image. The IRAF procedure hcal calls identify to allow the user to identify calibration lines in both the odd and even apertures. Then hcal will continue running freidentify combining the data into a single database/idcomp.ms file. dispcor is run after the spectra are calibrated to apply the dispersion correction. The pre-dispersion corrected files are moved to the Nodisp/ subdirectory.

      specroadcal looks for database/idcomp.ms file. If it finds it, it skips hcal altogether. If not, it checks to see if the coordinate list file, idhenear.dat, exists in this directory. If not, it will prompt you:

      No user coordinate list (./idhenear.dat) found - Retrieve default list? (yes or no, or ^C to break):

      You should probably answer 'yes' if this comes up, in which case a copy of the idhenear.dat file from the hectospec IRAF script library is copied to the current data directory.

      At this point, the script asks

      OK to do hcal? (yes or no, or ^C to break):

      Assuming you answer "yes", you will now be presented with instructions for running hcal in a separate IRAF session which will look like

      >> You now need to go to a separate IRAF window and in that window:
           1) please switch to this directory:
               cd /Users/juan/iraf/hectodata/2007.0514
           2) please launch hcal and identify all the calibration lines:
               hcal comp.ms
           When you have completed that task, return to this window.
           
       Did hcal run successfully? (yes or no, or ^C to break):
      Now open IRAF in a seperate window and do as the instructions indicate. This approach of requiring a separate IRAF session is necessary to get around a problem in using the IRAF identify procedure if it is launched by the specroadcal script directory. Once hcal starts, you will almost immediately start using the IRAF procedure identify to identify all the lines in the odd aperature spectrum. Here are some hints based on my experience in identifying the lines.

      • If you have never used the IRAF procedure identify, I would suggest reading the IRAF documentation on the procedure to learn of its capabilities.

      • Since the hectospec images have the bluer portion of the spectra at the top of the images, the spectra as presented is initially shown with wavelength increasing to the left. As such, it can be very helpful to start by flip the horizontal axis using the windowing commands 'w' followed by 'f' to flip the x-axis. Use the windowing 'r'ight and 'l'eft commands to scroll the spectrum right and left. Once you have an initial dispersion solution, you can flip it back.

      • If you are using the HeNeAr lamp as your calibration spectra, you need to be aware that the Helium leaked out quite some time ago and the spectra looks different than you might expect based on a a HeNeAr spectral Atlas. Susan Tokarz at SAO faxed me a sample of the current HeNeAr spectral reference they use, with the lines labeled. It is available as Hectospec_HeNeAr_Spectrum.pdf. I have also built my own hi-resolution version of the Hectospec HeNeAr spectrum obtained using the 600gpm grating centered at 4800 Ångstroms available as Hectospec_HeNeAr_600gpm_4800.pdf with the idhenear.dat file with a few added spectral lines available as idhenear.600gpm_4800.dat.

      • Make sure you are fitting a high-order polynomial function (say a 5th order Legendre, which is what SAO uses) and not a cubic spline since you expect the dispersion correction to be a smooth function. identify uses the IRAF procedure icfit, so you can only change the fitting function after hitting 'f' to fit the spectral lines.

      • Keep in mind the higher dispersion of the hectospec spectrum at 600gpm versus the 270gpm grating normally used results in many blended lines being resolved if you are using the 600gpm spectra.

      • I worked on the identifications until I got the RMS of the dispersion correction down to 0.05Å, but this may not be possible with 270gpm spectra.

      Once done with running identify on that one (odd) aperture (aperture 89), you will be asked:

      Write feature data to the database (yes)?

      Say "yes". Now you have to repeat the identifications for the even aperture using freidentify, which will use the information from the first odd aperture fit to do a fit on the next odd aperture (aperture 87). The

      compodd.ms - Ap 87 21/21 31/31 0.197 -0.11 -2.4E-5 0.331
      Fit dispersion function interactively? (no|yes|NO|YES) (yes):


      The last number in the first line above is the RMS. If it is low enough, you can skip the interactive fit (answering "no"), otherwise you can perform an interactive fit ("yes"). The capitalized version of those answers applies to all the remaining apertures. Once you are done processing all the odd apertures, hcal will have you repeat everything you just did for the odd apertures for the even apertures. HINT: If you have one consistently bad point, if you set the number of iterations to 2 or above during a fit, it will often eliminate the bad points automatically.

      Once you have finishing fitting all the apertures, the dispersion correction will be applied with the IRAF procedure dispcor, which will burp the minimum and maximum wavelength in each aperture (called w1 and w2, probably in reverse order, since blue wavelength are on the top of the image) and the stepsize (dw, which is negative). If you are using the 600gpm grating, you should make a note of these numbers, you will need them in the next part of the script. Once you are done identifying all the spectral lines in the calibration spectrum, return to your original specroadcal window

      Did hcal run successfully? (yes or no, or ^C to break):

      Assuming it did, enter "yes" to continue. Warning for 600 gpm Users: If you are using the 600gpm grating, make note of your final dispersion solutions as you will need to know the minimum and maximum wavelengths of your solutions as well as the wavelength step per pixel in order to properly run the next step in the pipeline.

    6. HLIN is run after hcal in order to dispersion correct and rebin the sky flat spectra (it automatically kicks over to dome flats if those are the only flats available). The pre-dispersion corrected files are moved to the Nodisp/ subdirectory. The IRAF process hlin runs and then calls sumspec to rebin all of the spectra to the same linear dispersion. This this procedure needs to know what grating you used, so it will query you

      Which grating did you use (270 or 600):

      If you answer 600, it will then query you with the following:

      Since you used the 600gpm grating, you must also answer the following
      questions about the wavelength range (it may be good to review your
      hcal dispersion correction solutions):
      Enter minimum wavelength (in Angstroms):
      Enter maximum wavelength (in Angstroms):
      Enter wavelength step per pixel (in Angstroms):


      You will need to correctly answer the minimum and maximum wavelengths covered in your spectrum as well as the wavelength step per pixel (which should be around 0.545 Å/pixel for the 600gpm grating).

      Once you have answered the questions, the IRAF procedure hlin is called unless the script detects a previously generated tpc_domeflat.ms.fits file in the directory. It requires no user interaction.

    7. MAKETRAN is the final IRAF procedure called by specroadcal. maketran creates a fiber transmission multispec file named tpc_*.ms.fits. It takes the mean of apertures, divides every aperture by that mean,and then uses the IRAF procedure sumspec to fit a low-order function to each aperture (currently set to be a 8 point cubic spline fit). It then corrects each fiber for the variation in projected sky area and adjusts fiber throughput (placing the original files in the subdirectory Notran/). Then, if requested, redleak and sky absorption corrections are applied. The sky correctionis based on using the skyab.ms.fits "skyfile" in the hectospec IRAF scripts library directory (hectospec$lib/skyabs.ms.fits in IRAF's notation). At this stage, specroadcal will make the following two queries:

      Do you want to apply the redleak correction? (yes or no, or ^C to break)
      Do you want to correct for sky absorption? (yes or no, or ^C to break)


      These last two corrections (redleak and sky absorption line correction) are less important at the blue end of the spectrum where I was working, so I made them optional. You should answer these questions based on your project's needs HINT:I would examine the resultant tpc_*.ms.fits file using a procedure like splot in IRAF. I found that sometimes the solution fit for the tranmission went a bit wild and actually indicated negative transmissions! If this is the case, you might need to manually re-run maketran on the original file stored in Notran/.

    8. Like specroad, specroadcal gives you a chance to make a backup of the current data directory when it is finished. It will show you the commands it is about the execute (copying the entire directory to one with the suffix _POST_SPECROADCAL) and the disk space needed and available. You are then asked:

      Should SPECROADCAL perform this backup now?
      (yes or no):

      If there is enough disk space, you should say "yes", since this gives you the option of backing up to this point if you need to.

    9. Once the backup is completed (or skipped), you are then asked if you want to run specroadobj. You are asked:

      OK to do specroadobj? (yes or no, or ^C to break):

      Assuming all has gone well, answer "yes". You'll see the command used to launch specroadobj. Something like:

      specroadobj -j 8 -u /Users/juan/iraf/uparm/ -s 11:16:03_2008-06-03

      If you answer "no," you'll see the same command printed out, but it will not be executed. You should make note of the command that should be used, in case you need to relaunch specroadobj manually (although, again, if you have followed my instructions about setting up your user environment, just typing specroadobj should work).

  3. Running specroadobj: The last of the E-SPECROAD scripts run, this script reduces all the object data files to completion. There is no user interaction during a typical specroadobj run, although I will document what it is doing here.

    1. MULTIHPROC is run on all the object files. It applies the preampfix, flat field, and zeropoint corrections. As with previous hproc calls, the original images are saved in the Raw/ subdirectory, and images which have only had preampfix run on them are saved in the Unproc/ subdirectory.

    2. MULTIHMERGE is run on all object images to to merge the 4 amps into 1 image. Copies of the unmerged files are saved in the Unmerged/ subdirectory before processing.

    3. MULTIHFLAT runs on all the object images dividing those images by the normalization image you created in apflatten in order to remove pixel to pixel variations and fringing. The pre-hflat-processed images are moved to the Nonorm/ subdirectory.

    4. MULTIHCOSMIC runs on all the object images. It calls the IRAF hcosmic procedure, which in turn calls the hcosmed procedure to make a median file from the input images. hcoslim is used to an image of the by pixel range limits for cosmic ray detection, and hcosbad is used to create bad pixel images where comparison of the two images shows exceptionally high flux. The areas of bad pixels are grown by 1.5 pixels and fixpix is run to replace those bad pixels with the linear interpolation along lines or columns using the nearest good pixels. Pre-hcosmic-processed images are copied to the Nocosmic/ subdirectory.

    5. MULTIHEXTRACT is run on all the object images, extracting the spectra into smaller *.ms.fits files.

    6. MULTIHLIN is run on all the object image files that have been processed through hextract to dispersion correct, shift, and linearize the spectra. The pre-dispersion corrected files are moved to the Nodisp/ subdirectory.

    7. MULTIHSCOMBINE is run on all the object image files that have been processed through hextract to combine all wavelength-linearized spectra of same field into one. If you shoot spectra of the same field on different nights, the hscombine routine is the one you would use to combine the linearized spectra, assuming you used the same wavelength limits on all the input spectra. During this stage in the script, you will be asked two questions about how you want the images combined:

      How do you want to combine images (average|median|sum)? :

      Which method should be used to reject pixels? (none|minmax|ccdclip|crreject|sigclip|avsigclip|pclip):

      It is your choice as to which method of combining images works best for you. The defaults used at SAO are "average" and "ccdclip" respectively. The pre-hscombine-processed images are copied to the Uncombined/ subdirectory.

    8. MULTIHTRAN uses the fiber transmission multispec file you created at the end of the maketran call near the end of specroadcal to correct the spectra of all the object images for differences in fiber transmission. Uncorrected images are placed in the Notran/ subdirectory.

    9. MULTIHSPLIT is used to split all the object image files into individual 1-dimensional spectra FITS files, all placed in 1d.field_name/ subdirectories, where "field_name" is the name of the field in the original multispec image file.

    10. MULTIHSKYPROC is now run all the individual 1-dimensional spectra files to remove the background from the fiber spectra. It calls the IRAF routine hskyproc which is a re-write of the original skyproc used by SAO into an IRAF native form that is much more portable. This is the one point in the E-SPECROAD pipeline where we differ in the original SPECROAD code used at SAO in the code called to process the images. hskyproc was written by Doug Mink based on the original ksh code in skyproc and has been observed to produce identical results by Doug Mink.

      Because hskyproc (like skyproc) needs to know about a good strong sky line to scale the sky subtraction two, it defaults ti the OH linke at 8399Å. If this line is not in the spectral range you are working in, you will likely see a notice like:
      NOTE: Can't use OH8399 for sky line to use for scale factor.
            Switching to O5577.
      If it does this, it will also increase the allowed sky standard deviation (hskyproc.skystdlim) in the solution to 0.4Å (from 0.2Å) since the 5577Å dominates the sky standard deviation in these cases. If the oxygen line at 5577Å is also outside your range, specroadcal will quit since it isn't coded to know about any other sky lines.

      Bug Report: I am getting reports that hskyproc is crashing or not properly subtracting sky in some situations. I am working on determining why. For now, you could just sum take the average of all your sky fibers and remove that from your object images if you want a quick and dirty sky subtraction.

    11. Finally, DOSKYXCSAO is called to perform a xcsao call to cross-correlate various spectral templates with the 1-D spectra in order to obtain radial velocity estimates (which are stored in the FITS headers). The spectral file templates used are listed in the templatelist file in the /usr/local/hectospec directory. templatelist is copied to your data directory during each run of specroadobj. You could edit /usr/local/hectospec/templatelist to select different templates by default if you wish. You could certainly edit the specroadobj script to not run this if you prefer

At this point, you should have completely reduced your night's data using E-SPECROAD. Here are some final hints I can provide regarding hectospec data reduction.

Funding: The creation of E-SPECROAD was supported by National Science Foundation Grant AST-0729989 ("RUI: Collaborative Research to Map the Asymmetric Thick Disk").


Copyright © 1995 - 2008 Juan Cabanela
Minnesota State University Moorhead | 1104 7th Ave South, Hagen 307B | Moorhead, MN 56563 USA | 1.218.477.2453
a member of the minnesota state colleges and universities system (mnscu)
mission | an equal opportunity educator and employer | accessibility questions? | contact Juan Cabanela | Last Updated
08/22/08