The next step is to generate the pixel flat field and slit illumination images.  The pixel flat corrects gain variations on the detector, and the illumination function corrects for the fact that the internal quartz lamp has a slight gradient in intensity across the slit (~5%).

Firehose needs 4 pieces of information to perform this operation: (1) The flat field file itself (internal quartz), (2) A sky flat for illumination correction, (3) a data frame (i.e. ThAr arc or long sky exposure) which helps firehose calculate the "tilt" of the slit on the detector, to facilitate its fitting out the wavelength dependence of the lamp and/or twilight sky, and (4) The file indicating slit positions and order numbers generated in the trace step.

Clicking in the "Flat" tab will allow you to enter these exposures in for the combine process:

In the "Flat Field Files" area, click the browse button to select the files you'd like to combine for the flat.  Typically one should not combine together flats that were taken after moves of the slit wheel.  Instead, you should generate a new composite flat for each time you moved the slit, and then the software will apply the appropriate one to your data.  You may select multiple files in the dialog box; these will be combined using an avsigclip algorithm when generating the composite.

In the Illum flat files area, enter in the names of the sky flat files you'd like to use for illumination correction.

For the Slit Tilt file, enter in the name of a long science exposure (to use OH lines to fit the slit tilt) or an Arc lamp file.  We've found that the OH lines work slightly better if you have a suitably long frame (>300 sec).

Finally, enter in the name of the order mask file (i.e. Orders_*.fits) generated in the previous step. 

Click "Make flat field" and the software will run.  This process takes some time, roughly 10 minutes per flat field generated. At the end of the process, the illumination flat and pixel flat will be displayed for inspection.

You will know that the software worked correctly if: The pixel flat looks like a flat image centered around 1.00 with fairly little structure, and the illumination image shows a smooth gradient with amplitude of 1.0 +/- ~0.05.  Also, two files should be created in the redux/Flat directory.  One named Pixflat_0123to0223.fits where the numbers again represent the range of files used.  And another named Illumflat_0.60_0122.fits where the 0.60 represents the slit used, and the 0122 is the frame number of the sky flat.

  • No labels

4 Comments

  1. Hit a bug in this one, during a call to func_fit.pro in the idlutils. The problem resulted from the "function_name" variable being passed as "chebyshev", when the routine expects this to be "fchebyshev". Put a quick fix in func_fit.pro to account for this, but whatever calls this routine from the firehose pipeline should probably be adjusted to pass "fchebyshev".

  2. Unknown User (phil.massey_1@touchstonenetwork.net)

    I'm curious what the absorption features are present in some of the orders: they're present in the raw data (see, e.g., y=1240 in the raw fire_0001-11 QF sample data).  These are clearly then visible in the Pixflat.   Looking at other people's data, these seem to always be present in the QF exposures; they shift by a couple of pixels if the slit is changed, and their width depends upon the slit width.  So, I'm going out on a limb and saying these are true absorption lines either in the output of the lamp or the reflectivity of the screen.  Don't these then compromise the flat-fielding?

    1. Hi Phil, I'm not in front of real data at the moment but I believe I know the features you are describing.  I think that at least some of these are real absorption features, coming from the air between the calibration lamps and the input to the spectrograph.  i.e. from the molecular absorption bands between J and H.  So indeed they negatively influence the flat field but it is in a spectral region where astronomical photons are also heavily attenuated.  For this reason we didn't work too hard to perfect the flat in that area.  

      1. Unknown User (phil.massey_1@touchstonenetwork.net)

        Okay, this makes sense–I knew it had to be external to the instrument.  Thanks!