Getting Help

In addition to the Juypter notebooks and online tutorial guide, other sources of help are available:

Examples

Several worked examples exist throughout these documents, in addition to examples.jl and the interactive tutorial.

Invoke the command-prompt examples with the following command sequence:

p = pathof(SeisBase)
d = dirname(realpath(p))
cd(d)
include("../test/examples.jl")

Tests

The commands in tests/ can be used as templates; to install test data and run all tests, execute these commands:

using Pkg
Pkg.test("SeisBase")      # lunch break recommended. Tests can take 20 minutes.
                        # 99.5% code coverage wasn't an accident...
p = pathof(SeisBase)
cd(realpath(dirname(p) * "/../test/"))

Command-Line Help

A great deal of additional help functions are available at the Julia command prompt. All SeisBase functions and structures have their own docstrings. For example, typing ?SeisData at the Julia prompt produces the following:

SeisBase.SeisDataType
SeisData

A custom structure designed to contain the minimum necessary information for processing univariate geophysical data.

SeisChannel

A single channel designed to contain the minimum necessary information for processing univariate geophysical data.

Fields

FieldDescription
:nNumber of channels [1]
:cTCP connections feeding data to this object [1]
:idChannel id. Uses NET.STA.LOC.CHA format when possible
:nameFreeform channel name
:locLocation (position) vector; any subtype of InstrumentPosition
:fsSampling frequency in Hz; fs=0.0 for irregularly-sampled data.
:gainScalar gain
:respInstrument response; any subtype of InstrumentResponse
:unitsString describing data units. UCUM standards are assumed.
:srcFreeform string describing data source.
:miscDictionary for non-critical information.
:notesTimestamped notes; includes automatically-logged information.
:tMatrix of time gaps in integer μs, formatted [Sample# Length]
:xTime-series data
  1. Not present in SeisChannel objects.

See also: InstrumentPosition, PZResp

source

Dedicated Help Functions

These functions take no arguments and dump information to stdout.

Submodule SEED

Submodule SUDS

SeisBase.SUDS.suds_supportFunction
suds_support()

Dump info to STDOUT on support for each SUDS structure type.

  • Green structures are fully supported and read into memory.
  • Yellow structures can be dumped to stdout by invoking read_data("suds", ...) with high verbosity (v=2).
  • Red structures are unsupported and have not been seen in available test data.
source

Formats Guide

formats is a constant static dictionary with descriptive entries of each data format. Access the list of formats with sort(keys(formats)). Then try a command like formats["slist"] for detailed info. on the slist format.

Help-Only Functions

These functions contain help docstrings but execute nothing. They exist to answer common questions.

SeisBase.web_chanspecFunction
web_chanspec

Specifying Channel IDs in Web Requests

StrLMeaningExample
NET2Network code"IU"
STA5Station code"ANMO"
LOC2Location identifier"00"
CHA3Channel code"BHZ"

A channel is uniquely specified by four substrings (NET, STA, LOC, CHA), which can be formatted as a String or a String array. Each substring has a maximum safe length of L characters (column 2 in the table).

Acceptable Channel ID Formats

TypeExample
String"PB.B004.01.BS1, PB.B004.01.BS2"
Array{String, 1}["PB.B004.01.BS1","PB.B004.01.BS2"]
Array{String, 2}["PB" "B004" "01" "BS?"; "PB" "B001" "01" "BS?"]

The LOC field can be blank in FDSN requests with getdata; for example, `chans="UW.ELK..EHZ"; getdata("FDSN", chans)`.

SeedLink only

For SeedLink functions (seedlink!, has_stream, etc.), channel IDs can include a fifth field (i.e. NET.STA.LOC.CHA.T) to set the "type" flag (one of DECOTL, for Data, Event, Calibration, blOckette, Timing, or Logs). Note that SeedLink calibration, timing, and logs are not in the scope of SeisBase.

See also: get_data, seedlink

source

Answers: how do I specify channels in a web request? Outputs channel id syntax to stdout.

SeisBase.seis_wwwConstant
StringSource
BGRhttp://eida.bgr.de
EMSChttp://www.seismicportal.eu
ETHhttp://eida.ethz.ch
GEONEThttp://service.geonet.org.nz
GFZhttp://geofon.gfz-potsdam.de
ICGChttp://ws.icgc.cat
INGVhttp://webservices.ingv.it
IPGPhttp://eida.ipgp.fr
IRIShttp://service.iris.edu
IRISPH5http://service.iris.edu/ph5ws/
ISChttp://isc-mirror.iris.washington.edu
KOERIhttp://eida.koeri.boun.edu.tr
LMUhttp://erde.geophysik.uni-muenchen.de
NCEDChttp://service.ncedc.org
NIEPhttp://eida-sc3.infp.ro
NOAhttp://eida.gein.noa.gr
ORFEUShttp://www.orfeus-eu.org
RESIFhttp://ws.resif.fr
SCEDChttp://service.scedc.caltech.edu
TEXNEThttp://rtserve.beg.utexas.edu
USGShttp://earthquake.usgs.gov
USPhttp://sismo.iag.usp.br
source

Answers: which servers are available for FDSN queries? Outputs the FDSN server list to stdout.

SeisBase.TimeSpecType
TimeSpec = Union{Real, DateTime, String}

Time Specification

Most functions that allow time specification use two reserved keywords to track time: s (start/begin) time and t (termination/end) time. Exact behavior of each is given in the table below.

  • Real numbers are interpreted as seconds
  • DateTime values are as in the Dates package
  • Strings should use ISO 8601 without time zone (YYYY-MM-DDThh:mm:ss.s); UTC is assumed. Equivalent Unix strftime format codes are %Y-%m-%dT%H:%M:%S or %FT%T.

parsetimewin Behavior

In all cases, parsetimewin outputs a pair of strings, sorted so that the first string corresponds to the earlier start time.

typeof(s)typeof(t)Behavior
DateTimeDateTimesort
DateTimeRealadd t seconds to s, then sort
DateTimeStringconvert t => DateTime, then sort
DateTimeStringconvert t => DateTime, then sort
RealDateTimeadd s seconds to t, then sort
RealRealtreat s, t as seconds from current time; sort
StringDateTimeconvert s => DateTime, then sort
StringRealconvert s => DateTime, then sort

Special behavior with (Real, Real): s and t are converted to seconds from the start of the current minute. Thus, for s=0 (the default), the data request begins (or ends) at the start of the minute in which the request is submitted.

See also: Dates.DateTime

source

All About Keywords

Invoke keywords help with ?SeisBase.KW for complete information on SeisBase shared keywords and meanings.