Learn R Programming

kitagawa (version 1.1-1)

kitplot: Quickly plot the amplitude and phase spectra

Description

Used to mimic plots of frequency response spectra, as in Kitagawa et al (2011), e.g. Figures 7--9.

Usage

kitplot(Resp., xlim. = c(-4, 0),
    ylims = list(amp = c(5, 7), phs = 180 * c(-1, 1)),
    prep.resp = TRUE)

Arguments

Resp.
the response information as from well_response (see Details)
xlim.
frequency limits (assume log10 Hz scale)
ylims
list of limits (assume log10 m/strain for amplitude), use amp and phs for variable assignments
prep.resp
boolean, should the units of Resp. be appropriately transformed ?

Value

  • A data.frame with the (transformed) values that have been plotted; this will include only the subset of data falling in the range of xlim. inclusively.

Details

This is primarily a diagnostic tool, and is thus not very flexible in its implementation.

The input data are assumed to be structured as they would be out of well_response, specifically three vectors representing: [object Object],[object Object],[object Object] These will be transformed to have units of $[\log10 Hz]$, $[\log10 m/strain]$, and $[rad]$ respectively, unless prep.resp=FALSE.

References

Kitagawa, Y., S. Itaba, N. Matsumoto, and N. Koisumi (2011), Frequency characteristics of the response of water pressure in a closed well to volumetric strain in the high-frequency domain, J. Geophys. Res., 116, B08301, doi:10.1029/2010JB007794.

http://www.agu.org/pubs/crossref/2011/2010JB007794.shtml

See Also

well_response

Examples

Run this code
# dummy example: get some lines on the figure
n <- 10
ones <- rep(1, n)
fakeResp <- data.frame(f=2*pi*10**seq(-4, 0, length.out=n), amp=1e6*ones, phs=.9*pi*ones)
kitplot(fakeResp)
# focus in on a certain range:
fakeResp.foc <- kitplot(fakeResp, xlim.=c(-3, -1), ylims=list(amp=c(5.5, 6.5), phs=180*c(0, 1)))
kitplot(fakeResp.foc, prep.resp=FALSE) # fakeResp.foc has already been transformed

Run the code above in your browser using DataLab