Ex 04: Query by TimeΒΆ

This is an example of converting Voyager 1 PWS waveform data to power spectral density in client code.

For long time durations it’s more efficent to read dynamic spectra directly from the server, for example this data source: tag:das2.org,2012:site:/uiowa/voyager/1/pws/uncalibrated/highrate_spectrogram, however dust hit processing must be preformed on the time-series data directly.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# das2 module example 4
#   Using the low-level server specific query interface to download Voyager
#   PWS waveforms and plotting spectra generated from reference and offset
#   time values

import numpy
import das2

# Read a data source definition given a catalog ID.  The returned item will
# vary based on the contents of catalog file.  This ID below corresponds to
# a data source collection.
sId = 'site:/uiowa/voyager/1/pws/uncalibrated/waveform'
col = das2.get_source(sId)

# Show the available query parameters for the primary data interface.  Other
# ancillary interfaces can be defined such as coverage, psd, histogram etc.
dIface = col.interface('primary')