In some cases one cannot see flux from a science target unless many exposures are added together.  Nevertheless you might want to sly subtract the data and/or use FIREHOSE to solve for the 2D wavelength map and rectify the image.  In this case one can choose "reference star" mode in the Object/Aperture Definition tab of the extraction preferences menu.

FIREHOSE does not by default associate science frames with reference stars since this reference star mode is still a relatively new feature.  To get it to work properly, you will need to modify the fire structure to tell it which frames go together.  The easiest way to do this is by using the "Run Script (and Save)" button on the "Structure" tab in firehose.  The script is used to add keywords to the fire structure by hand.  The keywords you need to check are 

  • POSSLIT - this can be either "A" or "B" and denotes the position of the object in the slit
  • OBJTRACEFILE - this is the filename of the reference star exposure to be associated with your science frame.

You will need to set posslit for all of your reference and science frames (the pipeline makes sure A's and B's are matched between ref and science).  You only need to set objtracefile for the science frames, since reference and calibration frames do not need this information.

The script file is a simple is a simple text file, which MUST be named firestrct_script.txt and MUST be located in your reduction directory (i.e. where you run firehose).  

The snippet below shows an example of what your firestrct_scipt.txt file should look like:

---------------- Start of snippet -------------

### object obj_id posslit objtracefile
0061 NGC4258 3 A fire_0059.fits
0062 NGC4258 3 B fire_0060.fits
0063 NGC4258 3 A fire_0059.fits

### posslit

0059 A

0060 B

---------------- end of snippet ---------------

The line beginning with ### is critical, as it tells firehose the format of the subsequent lines of text.  The "###" field denotes an exposure number, then the next 4 fields are keywords to be edited in the fire structure.  OBJECT is the object name, which needn't be edited, but I like to change it so I know which objects I'm extracting, then obj_id is the unique number given to each object to group them for reductions (these two should already be set). 

POSSLIT and OBJTRACEFILE are as described above and need to be set - these are the fields that will set the reference star exposure.  In the case above, frames 59 and 60 are telluric exposures taken just before frames 61, 62, and 63, which are science exposures.  Frame 59 is in the A position, and 60 is in the B position.  We make sure that the posslit field in 59 and 60 are set correctly in the last few lines.

Once you set these properly, the code will run reference star object tracing when selected during extraction.  

In case you are interested in what happens when you run this: The code matches the centroid of the object trace to the centroid of the reference star.  Then, it calculates the FWHM of the reference star.  FIREHOSE performs sky subtraction, masking out pixels within 2sigma of the trace (with sigma determined from the reference star fit) during estimation of the sky.  After 2d sky subtraction is finished, it performs an optimal extraction using the reference star's spatial profile, unless boxcar extraction is selected, in which case it performs a simple sum.

If you are feeling adventurous, it is possible to create co-added 2D, rectified spectra of each order.  For this, you have to run firehose in reference star mode as described above, and then you can take a look at "fire_addrectified.pro" in your $FIRE_DIR/Utils location.  That is not presently supported but you are welcome to try it as well as fire_extrectified.pro (although the latter is still in development).

 

 

 

 

 

  • No labels