obspy.core.inventory.channel.Channel.plot
- Channel.plot(min_freq, output='VEL', start_stage=None, end_stage=None, label=None, axes=None, unwrap_phase=False, plot_degrees=False, show=True, outfile=None)[source]
Show bode plot of the channel’s instrument response.
- Parameters:
min_freq (float) – Lowest frequency to plot.
output (str) –
Output units. One of:
"DISP"
displacement, output unit is meters
"VEL"
velocity, output unit is meters/second
"ACC"
acceleration, output unit is meters/second**2
"DEF"
default units, the response is calculated in output units/input units (last stage/first stage). Useful if the units for a particular type of sensor (e.g., a pressure sensor) cannot be converted to displacement, velocity or acceleration.
start_stage (int) – Sequence number of first stage that will be used (disregarding all earlier stages).
end_stage (int) – Sequence number of last stage that will be used (disregarding all later stages).
label (str) – Label string for legend.
axes (list[
matplotlib.axes.Axes
,matplotlib.axes.Axes
]) – List/tuple of two axes instances on which to plot the amplitude/phase spectrum. If not specified, a new figure is opened.unwrap_phase (bool) – Set optional phase unwrapping using NumPy.
plot_degrees (bool) – if
True
plot bode in degreesshow (bool) – Whether to show the figure after plotting or not. Can be used to do further customization of the plot before showing it.
outfile (str) – Output file path to directly save the resulting image (e.g.
"/tmp/image.png"
). Overrides theshow
option; image will not be displayed interactively. The given path/file name is also used to automatically determine the output format. Supported file formats depend on your matplotlib backend. Most backends support png, pdf, ps, eps and svg. Defaults toNone
.
Basic Usage
>>> from obspy import read_inventory >>> cha = read_inventory()[0][0][0] >>> cha.plot(0.001, output="VEL")
(Source code, png)