Automated Object Finding / Tracing
For the large majority of programs, FIREHOSE's automated object finder and spectral tracing code should work very well. To turn on this mode, select either "Fully Automated" or "Inspect Results" under object finding preferences in the preferences pane.
If you use "fully automated" you will get no feedback about what took place; this will be used commonly when running in scripted pipeline mode for future releases. For interactive reductions, "Inspect Results" is most appropriate.
The automated routine performs a first-pass sky subtraction to facilitate finding the object, since not all objects (especially fainter ones) will be visible without sky subtraction. The code then searches a 1D profile of the slit collapsed in wavelength, and centroids on the brightest object. This peak is then used to trace the object profile in wavelength from the top to the bottom of the slit, and the trace position and FWHM is saved into a structure located in the Object directory of the reduction path. This same structure will eventually hold the extracted spectra.
Once the object is located, firehose performs a second-pass sky subtraction, with the newly-located object masked out (so as not to bias the sky model). This new model is also saved to disk.
If "Inspect results" is active, an xatv window will launch at completion. This shows the sky-subtracted frame, with the object highlighted in a solid black line, and the +/- 2 sigma limits of the profile shown in dotted black lines.
Manually Defined Traces
If automated object finding did not work properly, or your object is very faint, or other bright objects appear on the slit, you may need to intervene manually in the object finding process.
The first method we recommend you attempt is "User initial guess" mode. In this setting, the user interactively selects which object should be extracted, and then the software automatically fits the trace profile for that object.
Failing that, it is possible to force the software to use exactly the aperture and trace you command, via the "User Specify" mode.
User Initial Guess Mode
To specify an object in user initial guess mode, the software performs first-pass sky subtraction, and then launches an after-market version of atv modified for this purpose. The view below shows an example make using a brown dwarf spectrum:
Note that there are two objects on the slit for this exposure. We are interested in the brighter of the two but could specify either for extraction.
Also, you may notice the relatively poor quality of the sky subtraction. Don't worry: this is the first attempt, and the final version used for spectral extraction will be much better. This iteration is only being used for object finding.
To select the left hand object, zoom in, place the cursor on the object of interest, and press the space bar. A cross will appear indicating the location of your selection, as shown here:
You can specify multiple locations, although there is no particular advantage to doing so. The software will simply take the median x-value of the selections and use that as an initial guess for the trace finding code, which fits a polynomial for trace x-position as a function of y-pixel. Once you have selected your object, press 'q' or click 'Done' and the code will trace your selection. When it has finished, it will plot up the results:
Here the solid line shows the object profile, and the dotted lines indicate the +/- 2 sigma boundaries of the fitted extraction aperture.
If you are happy with the result, move on to object extraction. If not, then you can try your hand at fully manual apertures, described next.
Fully Manual Object Finding and Trace Definition
If you absolutely MUST put the trace in a certain region of the slit and are having trouble getting the automated finder to bow to your will, you can run trace finding in a fully manual mode by choice in the Preferences pane.
As usual, a first-pass sky subtracted frame is generated and launched in the xatv GUI. This time, use the space bar to select several points along the trace (rather than the one you selected above). Crosses will appear at the locations of your selections as shown here:
When you have enough points to feel happy fitting a trace, press capital 'P' to fit a polynomial to the trace points. The fit will appear as a solid line on the data:
The trace center is now defined. IF you don't like the fit, press 'C' to clear it and start over.
Now you must define the aperture width. Press lowercase 'a' to bring up a widget for this purpose (do not use capital 'A', this keystroke is reserved for echelle mode).
The default is to define the aperture in units of arcsec (FWHM) where the pixel scale is 0.15"/pixel. You may specify a radius in pixels as well.
At extraction, this width will be used as the aperture boundary in boxcar mode. In optimal extraction mode it is used to define a masking region around the object to exclude from the sky model.
Once you have set this and clicked "accept" the boundaries will be plotted on the image:
If you are not happy with the result, you can hit 'a' again to revise the aperture or 'C' to clear and start over.
Click 'Done' or press 'q' if you are satisfied and ready to move on to object extraction.