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

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

Embed Size (px)

Citation preview

Page 1: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Specview Tutorial for Low dispersion spectra

M. Smith, I. Busko

Space Telescope Science Institute

Rev. March, 2010

Page 2: 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.

Page 3: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 4: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 5: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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).

Page 6: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Read in spectra using VO services:

Open Read from VO window from File menu…

Page 7: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 8: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 9: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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:

Page 10: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 11: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 12: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Once files are loaded in…

…which opens the Spectrograms in Memory window…

Page 13: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 14: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 15: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

…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.

Page 16: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 17: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 18: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Res

c al e

d

Page 19: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 20: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 21: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

•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:

Page 22: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Inspect the resulting dual panel plots:

Upper:rescaled& trimmed

Lower:raw data,unchanged.

Page 23: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 24: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

The scaled, trimmed & resampled spectra:

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

Page 25: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Section 5: Co-add spectra

(last chance to exclude spectra!)

Click on Execute this Step + Execute.

Page 26: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Our scaled, trimmed, resampled and coadded spectrum:

Page 27: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

…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.

Page 28: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 29: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 30: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 31: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 32: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 33: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 34: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 35: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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:

Page 36: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

… 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.

Page 37: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 38: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 39: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 40: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Original

Rectified

Page 41: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

Do the filtering:

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

Page 42: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 43: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 44: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

… type in desired frequency. Then click Execute again.

Page 45: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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

Page 46: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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.

Page 47: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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).

Page 48: Specview Tutorial for Low dispersion spectra M. Smith, I. Busko Space Telescope Science Institute Rev. March, 2010

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).