What this app does
It computes an instrument's complex frequency response (counts per unit of ground motion) from
StationXML, RESP or SAC pole-zero metadata, and plots amplitude and phase. The calculation is a port of
evalresp. The badge at the top shows where it runs: local Python (the
seismic-response gui server) or Python in browser (Pyodide). Files you load stay
on your machine.
Workflow
- 1 · Response source
- Drop or choose one or more files; they accumulate until you press Clear loaded responses.
Response file URL loads a StationXML, RESP or SAC PZ file from a URL, like a dropped file; the
server must allow cross-origin requests.
Fetch from an FDSN web service queries a station service for network, station, location and
channel (
* and ? wildcards allowed; an empty location means --).
The service must allow cross-origin requests.
- 2 · Channel & epoch
- Each Source ID is listed with its metadata epochs (UTC) beneath it; click a Source ID, or use the left and
right arrow keys, to expand or collapse it. Each loaded file or fetch is kept separate: a Source ID that
appears in more than one is listed once per source and numbered (#1, #2, …), and
hovering over an entry shows the file name or service query it came from. Click an epoch (or use the up
and down arrow keys) to make it the current one (highlighted). The current epoch is always
plotted. A ticked box means the epoch is kept in the plot when you select another epoch; unticked epochs
are replaced. Ticking an epoch, of the same or another Source ID, also ticks the current one, so both
stay in the plot for comparison. The box beside a Source ID ticks or unticks all its epochs. The stage
table, summary and text export follow the
current epoch, while the others are plotted with all stages included. The Source ID filter is a glob, or a
substring when it has no wildcards; ticks are kept while filtering and only visible ticked epochs are
plotted.
- 3 · Frequencies
- Minimum and maximum in Hz, number of points (1–20000), and log or linear spacing. Log spacing needs
values above zero. Until you edit the range, the maximum is 1.1 × the channel's Nyquist frequency. A
response with a response list in an evaluated stage uses the list's frequencies, or interpolates the list
at these with the interpolate option.
Options
- Output unit
- As documented (default) gives counts per the first stage's documented input unit, with no
conversion. Unlike evalresp, which defaults to velocity. Velocity, displacement and acceleration
convert the response accordingly; this requires a recognized ground-motion input unit, otherwise an
error is shown.
- Show each stage separately
- Overlays each included stage's contribution. Their product is the total response; unit scaling is
part of the first stage. Unavailable (greyed out) while several responses are plotted; your choice is
kept for when only one is.
- Unwrap phase
- Removes ±360° jumps (evalresp's method) and widens the phase axis to fit. FAP export is always
unwrapped.
- Show sensitivity & Nyquist lines
- Dashed lines at the sensitivity gain (the reported value, or the calculated one if none is
reported), the sensitivity frequency, and the Nyquist frequency (half the final output sample
rate). With several responses plotted, each has its own lines, coloured like its curve.
- Show measurement points
- Marks every evaluated frequency on the curves.
- Use reported total sensitivity
- Scales by the overall sensitivity reported in the metadata (stage 0) instead of the product of the
stage gains. Same as evalresp
-ts.
- Use estimated delay (asymmetric FIR)
- For asymmetric FIR stages, applies the stage's estimated delay as the time shift instead of the
correction applied minus the filter's calculated delay. Same as evalresp
-use-estimated-delay.
- Polynomial (B62) input value
- The input value at which a polynomial (blockette 62) response is evaluated. Must be above zero;
ignored for other response types.
Reading the results
The upper panel is amplitude (log scale), the lower is phase in degrees. The thick line is the total
response; thin lines are individual stages. With several responses ticked, each total response gets its own
colour (shown in the list and the legend) and stage curves are not drawn. Hover for frequency, amplitude and
phase. The summary line
compares the sensitivity calculated from the stages with the reported one, and consistency warnings
appear above the plot.
Stage table
Lists each stage's type, gain, gain frequency, units (input → output) and sample rate. Total
is stage 0, the reported overall sensitivity. Untick a stage to leave it out of the calculation;
All/None toggles every stage. Coloured stage numbers match the overlay curves.
Export
Text formats follow evalresp: freq / amp / phase (one file), amplitude & phase
(the AMP and PHASE listings in one file) and complex spectra (real and imaginary parts). The
plot exports as SVG or PNG as displayed, with its title above. File names end with the current epoch's start time (UTC,
YYYYMMDDThhmmssZ).
Page parameters
url
- Loads the response file at this URL when the page opens, as if entered in Response file URL.
Repeat it to load several (
?url=A&url=B). A relative URL is taken relative to the page.
Percent-encode a URL that contains &, ?, # or +,
such as an FDSN station query. The server must allow cross-origin requests. Example:
?url=https%3A%2F%2Fservice.earthscope.org%2Ffdsnws%2Fstation%2F1%2Fquery%3Fnet%3DIU%26sta%3DANMO%26loc%3D00%26cha%3DBHZ%26level%3Dresponse
Full documentation:
earthscope-labs.github.io/seismic-response