Data Central uses cookies to make your browsing experience better. By using Data Central you agree to its use of cookies. Learn more I agree


Find information, examples, FAQs and extensive descriptions of the data, curated by the survey teams.

Docs hc

Help Center

Browse FAQs, guides and tutorials on common use cases.
July 8, 2020 by B. Miszalski
Feb. 17, 2021, 12:44 a.m. B. Miszalski

Simple Spectral Access (SSA) Examples

Simple Spectral Access (SSA) service

This page details more advanced usage of the SSA service.

The examples provided below make heavy use of the pyvo, astropy, specutils and matplotlib Python modules.

The last example below shows how to use TOPCAT and SPLAT together to quickly preview spectra from SSA results.

The SSA service is particularly powerful when combined with queries to survey catalogues directly using the DataCentral API.

The Wigglez example and the interactive GALAH example below both make use of the API.

Please refer to the accompanying page:

Data Central SSA service

for details on the parameters and basic usage.

Please contact us if any of the following is unclear or you require further assistance in using the SSA service.

OzDES DR2 time series spectra retrieved from the Data Central SSA service

Access from Python


The SSA service can be accessed from your own Python scripts in various ways.

This page contains some example approaches with Python 3 that may be useful.

You may copy the code from the following linked pages (you can use the Copy button at top right of each code example) or you can download them from this gitlab repository.

Many of these examples make use of the SSA capabilities of the pyvo module found. More details can be found in the data access layer documentation for pyvo.

Simple Access to the SSA service:

  1. Retrieving and Parsing a VOTable
  2. Accessing the Original Spectra

Advanced access using the PyVO module

The pyvo Python module offers a better interface to querying the SSA service than specifying a long query url.

The following examples demonstrate more advanced usage of the SSA service:

  1. Plotting Time Series OzDES Spectra
  2. Fitting Gaussian Emission Lines in Time Series Spectra
  3. 6dF Galaxy Survey Spectra and Image Cutouts from Target Names
  4. GAMA Survey Spectra and Image Cutouts from Multiple Sky Positions
  5. GALAH DR3
  6. GALAH DR3 Interactive Spectra Explorer enhanced by the Data Central API
  7. Wigglez Spectra enhanced by the Data Central API

To generate the image cutouts we make use of the multicolorfits Python module, plus the hips2fits service or the Data Central SIA2 service.

Important: While the SSA service does not require the latest development version of the pyvo module, it is needed to use the Data Central SIA2 service. It is available from the pyvo github page.

You may need to uninstall any previous pyvo installations you have before installing the latest version.

Some technical details on specifying parameters with pyvo: Our typical usage below of SSA with pyvo involves creating a dictionary custom that contains parameters we would ordinarily pass to the SSA query URL. The custom dictionary is then passed to the pyvo SSA search function as the **keywords argument. This is a convenient and simple way to specify the parameters. Note that standard SSA parameters may be passed as normal arguments to the search function (e.g. band=...), but custom SSA parameters (e.g. BANDREST) may only be specified via **keywords. For more details see the data access layer documentation for pyvo.

Access from TOPCAT


The TOPCAT application is a versatile tool that allows for many operations to be performed on the VOTable results of the SSA service.

You can load a VOTable file saved to disk from an SSA service query or you can load the query URL directly into the Location: field of the Load New Table dialogue.

More advanced usage of TOPCAT with the SSA service is also possible:

  1. TOPCAT and SPLAT to Quickly Preview Spectra
July 8, 2020 by B. Miszalski
Feb. 17, 2021, 12:44 a.m. B. Miszalski