Spec Viewer¶
Spec Viewer is where spectra are opened and looked at: an HST or JWST extracted spectrum, an ESPaDOnS product, a one-dimensional image, or a table you wrote yourself. It works without signing in. Open it from its Home tile, or Go ▸ Spec Viewer (⌘9).
What is measured from spectra — a line's profile, the continuum, epochs stacked, radial velocities, a redshift — runs on CANFAR, in Remote Analysis: a file you look at here goes into one of its projects with Add to Project.
Opening a spectrum¶
- Open… on the start screen, or drop a file onto it. The start screen also lists the spectra opened lately.
- From the FITS Viewer: a table that holds a spectrum has Open in Spec Viewer.
- From Research: Open In on any file of an observation, such as its
_x1d. - From Search: Open in Spec Viewer on a spectrum's detail. It finds which file is the spectrum from the files' headers and keeps it in Research.
- From Storage: Open on a FITS spectrum, or Open in Spec Viewer on a table.
- From the Cube Viewer: the spectrum probe's Send to Spec Viewer sends the spectrum of the pixel probed, on the cube's spectral axis. A velocity axis is shown as frequencies, from the cube's rest frequency, and Spec Viewer says so. A circle's or a box's Send Its Spectrum to Spec Viewer sends the mean spectrum of the spaxels inside it.
- It reads:
- FITS tables, such as an HST
_x1d, a JWSTx1dor an SDSS spectrum; - images whose rows are a spectrum, such as CFHT ESPaDOnS products;
- separate flux, wavelength and blaze images, a row an order, such as CFHT SPIRou
efiles; - one-dimensional images with a wavelength axis;
- cubes of one pointing along a spectral axis, such as JCMT ACSIS reduced spectra: the axis as the file writes it (a frequency stays a frequency), σ from the variance beside it, and the intensity in K on the temperature scale the file names (TA*, the corrected antenna temperature, for JCMT) — never turned into a flux, which would need the telescope's efficiencies;
- CSV and ECSV tables;
- any of these compressed with gzip (
.fits.gz,.csv.gz), read uncompressed.
A file that holds no spectrum says so, and nothing else changes. A file opened from another screen opens here to be looked at, whatever project is open in Remote Analysis: nothing asks.
Sources¶
Each file opened is a source in the list on the left; the one selected is shown. A source's menu has Close, Add to Project when you are signed in (see Into a project), and Show in Finder, which shows its file.
Some files hold more than one spectrum. An ESPaDOnS product holds four: normalized or not, each with
or without the automatic wavelength correction. A SPIRou e file holds two for each fibre — divided by
its blaze, the flat view it opens on, and as extracted — the science fibre, AB, first. Its wavelengths
are vacuum, as measured on Gl 251's K I and Al I lines (they agree in vacuum, and would be 82 km/s off in
air), and it is as observed: its BERV is not applied,
and Source says so. Spectrum chooses which one is shown.
What was read¶
Beside the list, Spec Viewer says what it read and how:
- Read as: the kind of file, and the columns or rows it took.
- Points and Range: the spectrum's size, in its own unit.
- Flux and Uncertainty: the flux unit, as the file wrote it, and whether the file gives an uncertainty.
- Wavelengths: in air, in vacuum, or not said.
- Already corrected: a velocity correction the file's pipeline already applied, such as the heliocentric one in an ESPaDOnS product. A radial velocity measured on it must not be corrected again.
- Taken, as the file does not say: every unit or fact the file left out, and what Spec Viewer took for it. An ESPaDOnS product, for one, writes its wavelengths in nm without saying so.
What the file does not say¶
The Source pane says, for each spectrum, what is taken from its file, and you can say what the file does not, or says wrongly: Wavelengths (air or vacuum), Axis unit (when Verbinal took it), Frame (as observed, heliocentric or barycentric) and, for photometry, Magnitudes (AB). Each says where it comes from: from the file, taken (Verbinal's assumption), You said, or You said; the file says otherwise. What you say never changes the file. It goes with the file into a project (below), where each analysis run on it says it used it.
A photometry table whose magnitudes do not say their system is not opened: its message has These Magnitudes Are AB, which opens it with that said by you. Vega magnitudes are not taken, as each band's zero point would have to be guessed.
Into a project¶
Signed in, the selected source has Add to Project, in its Source pane and in its row's menu. It puts the file into a project of Remote Analysis, with what you said of it and the spectrum shown. The project refers to the file where it is: nothing is moved or copied.
- With a project open in Remote Analysis, Add to “…” adds it there. Spec Viewer stays on screen, and the button then reads In “…”: it shows the file in Remote Analysis.
- Open Project with It lists the projects: the one chosen opens in Remote Analysis, holding the file.
- New Project with It… starts a project in Remote Analysis that holds it.
Signed out, Add to Project is not shown, and nothing else changes.
The plot¶
The selected spectrum is drawn at full resolution at every zoom: a narrow line is never averaged away. Echelle orders alternate in blue and orange, so where they overlap you see both. The cursor reads the wavelength and flux under it, and, when the file gives an uncertainty, σ and S/N.
Everything the plot does has a control over it. ? lists every gesture.
- Move · Select Band · Mark Line says what a drag on the plot does: move along the spectrum, select a band, or, with a click, mark a line. Esc goes back to Move.
- The magnifiers zoom out and in around the middle of the view (⌘− and ⌘+); Fit, ⌥⌘0 or a double-click shows the whole spectrum.
- Scroll, ⌘-scroll or pinch to zoom around the pointer; swipe or drag to move along the spectrum.
- ⌥-scroll zooms the flux; Auto Flux gives the range back to what is in view.
- ⌘-drag selects a band, whatever the tool; Clear Band, or Esc, clears it.
- The strip under the plot is the whole spectrum, with its marks and the band, and the stretch the plot shows framed on it. Drag the frame to move it, one of its edges to widen or narrow it, or anywhere else to draw a new one; a click centres it there, and a double-click shows it all.
Over the plot, the Spectral unit menu shows the axis in Å, nm, µm, cm⁻¹, GHz, MHz or keV, and the Flux unit menu shows the flux in any unit it converts to, such as Jy or AB magnitudes. A choice of unit only changes what you see: measurements are made on the data in its own units. ±1σ shows or hides the band of the file's uncertainty.
Smooth draws the spectrum smoothed, to see a weak line through the noise: Hanning (¼ ½ ¼, the
radio astronomer's three channels), a Boxcar of 3, 5 or 9 channels, or a Gaussian of FWHM 2, 3,
5 or 10 channels. Each order of an echelle spectrum is smoothed on its own; a gap stays a gap, and at an
edge the channels there are used. The ±1σ band and the cursor's σ and S/N are the smoothed spectrum's.
The menu says the smoothing chosen, and a figure's legend says it ("Hanning-smoothed"). It is for the
eye only: Export's data, the assistants' get_spectrum and the analyses in
Remote Analysis take the spectrum as read.
When the file names a line's rest (a radio spectrum's RESTFRQ, or a RESTWAV), the menu's
Velocity section shows the axis in km/s from it, as a radio astronomer reads a line:
- in the radio or the optical convention, the one the observatory used (
DOPPLER) first; - in the frame the file's axis is in, and in LSRK when that frame is barycentric or heliocentric and
the file gives the direction. LSRK is the Sun's 20 km/s toward 18h +30° (B1900), as astropy defines it.
The source's frame comes first when the file names it (
SSYSSRC).
The axis is named with its convention and frame, such as "Velocity, radio, LSRK (km/s)". A figure's
legend gives the rest and the line (MOLECULE, TRANSITI). Wavelengths in air are not offered a
velocity: against a vacuum rest they would be 82 km/s off. A mark stays on its feature in any unit.
A spectrum whose file names no rest, an optical one most often, gets a velocity axis from a line you mark: the gauge button on a line mark in Marks shows the axis in km/s from it. The rest is the mark's place in the spectrum's own medium, so an air spectrum too; the menu then offers its conventions and frames, named "from Hα".
A table written on a velocity axis says, in its meta (in a CSV, its comments), the rest, convention, frame and offset it is from, so it opens again on the same axis.
Lines and redshift¶
Lines over the plot lays known lines over the spectrum, from lists kept in Verbinal with their sources (the SDSS line list and the NIST Atomic Spectra Database):
- Nebulae and galaxies: Hα, Hβ, [O III], [N II], [S II], [O II] and the other emission lines of H II regions, planetary nebulae and star-forming galaxies.
- Stars and galaxies, absorption: Ca II H and K, Mg b, Na D, the Ca II triplet and the Balmer lines.
- Ultraviolet: quasars and hot stars: Lyα, C IV, C III], Mg II and their neighbours, seen in the optical at a quasar's redshift.
- Near-infrared hydrogen and helium: the Paschen and Brackett lines, and helium at 1.083 µm.
- Radio: molecules and masers: CO and its isotopologues, HCO⁺, HCN, HNC, CS, SiO, N₂H⁺ and other dense-gas tracers, [C I] and [C II], H I 21 cm, OH, water and ammonia, and the methanol maser, by their rest frequencies (CDMS and Lovas 2004).
The lines are drawn at the redshift in the z field beside the menu: type it, or step it. Each list is written in vacuum. A spectrum in air gets air wavelengths (Morton 2000), and Wavelengths in the menu chooses air or vacuum when the file does not say. Move the pointer near a line and the readout says how far it is from that line, in km/s. Right-click a line, then Mark Hα Here, to keep it as a mark of yours, named. The lists, their z and their medium go on an exported figure's legend.
Marks¶
Marks name what you find on a spectrum: a line, or a band over a stretch of it, such as the window of a line or of the continuum. They are kept with the file, as wavelengths, so they stay on their feature in whatever unit you show the spectrum in.
- With Select Band (or ⌘-drag), select a band, then Mark Band.
- With Mark Line, click the plot where the line is. Or right-click the plot, then Mark a Line Here.
- The Marks list beside the plot gives each mark and where it is in the unit shown, in order along the spectrum as the plot draws them. Type a mark's label and press Return to keep it; click a mark to pick it out and centre the view on it; its bin deletes it. Right-click a mark on the plot to remove it.
- ⌘Z takes back a mark you added, renamed or removed; ⇧⌘Z does it again.
- Filter marks… finds marks by the words of their labels or by where they are: "Hα", "Ha" and "H alpha" all find Hα, "OIII" finds [O III], and "656" finds what is at 656 nm. Its menu shows only lines, bands or labels, and only yours or the assistant's. The list counts what is found ("2 of 7"), the plot and the strip show the rest faint, and the words also find the marks in the other spectra open, under In other sources: a click shows that spectrum at its mark.
- ‹ › step to the mark before or after along the spectrum, among those found.
Labels close together are written one under the other, so none covers another.
Your marks are vermillion, an assistant's bluish green.
Export¶
Export… over the plot saves a figure of the spectrum or its data, of all of it or a part, as the FITS and Cube viewers do:
- It starts on what the plot shows: the View on screen, as you zoomed it, flux too, or the Whole spectrum when you have not zoomed. You can choose the Selected band instead, or Around the mark picked out (a band with its width again on each side; a line with ±0.5 % of its wavelength, ±1,500 km/s).
- A Figure is the plot as you see it — its units, ±1σ band, the band you selected, and each mark with its label; labels too close together for the screen, which you part by zooming, are each written — on the plate every viewer's figure has: the object, the instrument, the file and when the figure was made at the top; under it, a legend of what of the spectrum it is (the region and its range), the flux unit, the number of points, the band selected, the date observed, the resolving power, air or vacuum, and the marks; and, for an echelle spectrum, how many orders it shows, which alternate in colour; its smoothing, when it is smoothed; where the spectrum came from (CADC's observation, your storage or this Mac, and its program); and "Exported from Verbinal". An ECSV says where it came from in its header too. Choose its theme, font, text colour and scale; Spec Viewer keeps your choices. With a transparent background the preview shows a checkerboard where the page will show through: Journal light's dark ink is for a light page, Cockpit dark's light ink for a dark one. Save it as PNG at 2× or 4×, or as a PDF.
- Data is a table of the points: ECSV, which astropy reads with its units and what is known of the spectrum, or CSV, with each column's unit in its name. Write it in the units shown or the file's own. Spec Viewer opens what it writes.
When you keep your results in CANFAR storage, exports go there too (Settings ▸ Storage).