Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute...

Post on 02-Jan-2016

219 views 0 download

Tags:

Transcript of Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute...

Specview Tutorial for Low dispersion spectra

M. Smith, I. Busko

Space Telescope Science Institute

Rev. March, 2010

In this tutorial we will combine five IUE and HST spectra as follows:

•Read spectra,•Scale fluxes, trim spectrum ends, as needed,•Coadd spectra and plot the coadded spectrum,•Rectify or detrend the continuum,•Apply a Fourier filter to spectrum,•Coplot the filtered and coadded spectra,•Save result to file.

NOTICE: Specview works either as a desktop application, or an applet. This tutorial is designed for use by either, but the applet version has been tested and runs only on certain platform/browser combinations:

OS Browser• Mac OS X 10.6 Safari 4.0.3. (6531.9) • Windows XP Pro 2002 Internet Explorer 7• Windows XP Pro 2002 Firefox 3.5.8

For better performance, we strongly suggest that you install the desktop application version of Specview.

First, get into Specview:

(spectrum plotting window)

Version 2.14

Click on Run link at: http://www.stsci.edu/resources/software_hardware/specview/applet_demo

…or…

start the Specview desktop application.

Section 1a: Read data and select spectra of interest:

•Read spectra from VO spectral services: next slide.

•Read files in your own computer disk: go to Section 1b (slide 11).

Read in spectra using VO services:

Open Read from VO window from File menu…

Set up VO search query:

• Enter object name and either hit the Return/Enter key, or click on Resolve to let the resolver fill up the R.A. and Dec. fields.

• Enter the desired search radius.

•Click now on Search and wait a minute or so until all data is downloaded from the VO services.

Were you patient?!

If so, tables of available spectra appear on the Search Results pane.

Click on the Servers table to select a particular VO service and have its table of available spectra appear on the Search Results pane.

Select (click on) the spectra you want to download and then click on Download.

Observe the download status column; when YES appears, the spectrum has been downloaded and is in memory.

Downloading spectra:

The download actions explained before bring your spectra into the Spectrograms in Memory window:

Confirm contents, then select multiple spectra you want to combine by clicking with the Shift or Ctrl key pressed.

Then click on Process button to start the processing engine.

To read in a data file from your computer, click on File menu and then Read from File menu entry, and ……

…select and open file to display the spectrum in the main display window.

Section 1b: Reading files from your computer

…click on Coplot menu and select the Coplot/process menu entry…

Once files are loaded in…

…which opens the Spectrograms in Memory window…

Tip: we recommend you keep the Spectrograms in Memory window open.

Confirm contents, then select multiple spectra you want to combine by clicking with the Shift or Ctrl key pressed.

Then click on Process button to start the processing engine.

The Processing pipeline window displays previously selected spectra as inputs to the first step in processing pipeline: the “scale, offset, trim” step.

…and at the same time…

Section 2: The processing pipeline

…the result of the processing pipeline displays along the raw input spectra:

The pipeline, as soon as it is created, runs with default settings for all steps and creates a trimmed and resampled version of the input spectra. Since default settings were used, no difference in between the two plots can be seen at this point.

Upper panel displays the result coming out of the pipeline.

Lower panel shows the raw, unchanged, input spectra.

The pipeline executes by default the first two steps, as indicated by the “Active steps” indicator.

For this exercise, we want to leave just the first step on.

Select the Resample tab and uncheck the “Execute this step” box.

Go back to the first tab.

To modify scale and offset factors, click to open table text field, type in new factor, click text field shut(guess values: trial & error!)

Then click Executeand examine results at the top plot.

Section 3: Condition (trim/scale) spectra

Continue changing scale factors as necessary and keep clicking Execute to plot the modified data.

Res

c al e

d

Two-panel plot shows before/after effects of inter alia scaling of the spectra:

Now work through red/blue wavelength limits in the same way to trim spectra. When done, click Execute.

•Note that offsets and wavelength limits can all be defined using the graphics cursor, without actually typing any value in the text fields.

•See the Specview documentation for the processing pipeline to better understand its functionality.

•Note also the offset values must be entered in photolam units (ergs/cm^2/sec/Angstroms).

NOTES:

Inspect the resulting dual panel plots:

Upper:rescaled& trimmed

Lower:raw data,unchanged.

Let’s go to Single panel mode. Then click Execute this Step…and Execute

Accept default (finest grid sampling)or input your own value.

Section 4: Resample spectra

The scaled, trimmed & resampled spectra:

In Single panel mode, only the end result of the pipeline is plotted.

Section 5: Co-add spectra

(last chance to exclude spectra!)

Click on Execute this Step + Execute.

Our scaled, trimmed, resampled and coadded spectrum:

…or, if displayed in Dual panel mode, the result of the processing pipeline displays along the raw input spectra:

Upper panel displays the result coming out of the pipeline.

Lower panel shows the raw, unchanged, input spectra.

Section 6: Digression

You might now wish to save your coadded spectrum. Click on File/Save As in spectrum plot window.

Enter file name and click on Save to save spectrum to file.

Section 7: Continuum rectification.

Activate step and run pipeline once. By default, the auto-compute algorithm will build two data points corresponding to the blue and red ends of the spectrum. These data points are built by averaging wavelength and flux values over a 10% range of wavelengths at each end. The continuum rectification algorithm then proceeds to fit a first-order polynomial to the two data points, and subtract it from the spectrum.

Select Rectify tab

The resulting plot shows the rectified spectrum in black, as well as the original co-added spectrum in pink:

Editing data points in table:

Just click in any table cell (its background goes pink) and type in desired value. Click cell shut, or just type Enter/Return. After changing all desired values, make sure Auto-compute is un-selected, and re-run the pipeline.

Data points defined in the previous slide by the auto-compute process can be manually edited.

type values

unselect

Adding data points to table:

Click on Add point to add a new data point. Type in desired values in table cells and re-run the pipeline. You can also change the polynomial order.

Data points can be added by typing in wavelength/flux values, or by defining wavelength ranges on the spectrum plot.

type values

fit order

Click on Add range. Message “Click cursor to mark one of the range’s end points” shows up on the rectification window. Go to the spectrum plot and click cursor on the wavelength you want to define one of the end points of the wavelength range.

Data points can also be added by selecting wavelength ranges on the spectrum plot.

Message “Click cursor again to mark other end point” will then show up, instructing to repeat the above operation once again to define the other end of the wavelength range.

Once the second end point is defined by a cursor click, the wavelength range will be indicated by a blue bar on the spectrum plot, as show below:

… and a new data point will appear on the rectification table. The values written in the cells are the average values of respectively all wavelengths, and all fluxes, encompassed by the range.

The new wavelength and flux values can be edited by clicking on their cells as explained before.

The process can be repeated as many times as you wish:

Any data point can be removed from the rectification table. Just select the desired row by clicking on it, and then click on the Remove point button.

Notice that at least two data points must remain in the table at all times. The allowed polynomial order can be selected anywhere in between zero and npoints-1.

The continuum rectification performed in the last step removed low-frequency components from the data, thus enabling the Fourier-based low-pass filter in the next pipeline step to be properly computed.

Once the data is low-pass filtered, the polynomial that was removed from the data in the previous step, is added back to the filtered spectrum.

In this way average fluxes are locally restored.

Section 8: Fourier filtering

Rectified data has its zero point, linear trend, and eventually higher order terms, removed:

Original

Rectified

Do the filtering:

Select the Filter tab and activate the step. Click Execute to initiate Fourier filtering.

The processing window will display the Power Spectrum of the spectral data in the pipeline:

Data in the spectrum plot window will be filtered by a Brault-White Fourier filter with an automatically computed cut-off frequency (depicted by the blue low-pass function).

Brault-White filter

… and the plot window will display the filtered spectrum in black, superimposed on the original, co-added but not rectified spectrum, in pink:

Want to change the default filter? Unclick Auto cutoff and…

… type in desired frequency. Then click Execute again.

The new result, with a not so strong low-pass filter:

Want to see only the final result, without over-plotting anything? Select the Processed spectrogram in the Spectrograms in memory window:

…and click the Plot/Coplot button.

The final spectrum:

Save the spectrum as in slide #28 (Sec. 6). It is the final product of the pipeline. Use any format that is better for you (FITS, Excel, plain text).

We are now done.

Note that spectral data can be saved in FITS, Excel, or text files. However, the plots cannot be saved except as screen shots (JPEG).