Type: string
Type: string
Type: string
Type: string
(any)
boolean
(any)
boolean
(any)
boolean
(any)
boolean
(any)
boolean
(any)
boolean
Converts entire DataView to a string as utf-8.
(DataView)
bytes to convert
any
:
the string
Log a message to the console. Put here to limit lint console errors for the times we really do want to use console.log. Will also append a p tag to a div#debug if it exists.
(string)
the message to log
void
String representation of input. This is kind of dumb but makes flow happier.
(any)
any kind of thing that can be turned into a string
string
:
a string
Calculates offset of remote server versus local time. It is assumed that the argument was acquired as close in time to calling this as possible.
(moment)
now as reported by remote server
number
:
offset in seconds to now on local machine
Any two of startTime, endTime and duration can be specified, or just duration which then assumes endTime is now. startTime and endTime are moment objects, duration is in seconds. clockOffset is the seconds that should be subtracted from the computer time to get real world time, ie computerUTC - UTC or moment.utc().diff(serverTimeUTC, 'seconds', true). default is zero.
((moment | null))
((moment | null))
((moment.duration | number | null)
= null
)
((number | null)
= 0
)
Type: moment.duration
Type: moment.duration
Check if this time window contains the given moment. Equality to start or end is considered being contained in.
((moment | StartEndDuration))
moment to check
boolean
:
true if moment is inside this time range
(StartEndDuration)
boolean
(StartEndDuration)
(StartEndDuration | null)
(StartEndDuration)
StartEndDuration
converts the input value is a moment, throws Error if not a string, Date or moment. Zero length string or "now" return current time.
(any)
'now', string time, Date, number of milliseconds since epoch, or moment
moment
:
moment created from argument
Converts name and value into a html query parameter, with appending ampersand.
(string)
parameter name
(any)
parameter value
string
:
formated query parameter
converts to ISO8601 but removes the trailing Z as FDSN web services do not allow that.
(moment)
moment to convert to string
string
:
ISO8601 without timezone Z
*
string
:
the protocol, http or https for the document if possible.
*
Create default fetch init object with the given mimeType. Sets no-cache, follow redirects, cors mode, referrer as seisplotjs and mimetype as a header.
(string?)
requested mime type
{}
:
object with fetch configuration parameters
Does a fetch, but times out if it takes too long.
({}?)
fetch configuration, initialization
(number?)
maximum time to wait in seconds
Promise<Response>
:
promise to the result
Recursively calculates the mean of a slice of an array. This helps with very long seismograms to equally weight each sample point without overflowing.
((Int32Array | Float32Array | Float64Array))
slice of a seismogram
(number)
number of points in the original seismogram
number
:
sum of slice data points divided by totalPts