IRISMustangMetrics (version 2.3.0)

transferFunctionMetric: Cross-spectral comparison

Description

The transferFunctionMetric() function calculates metrics that assess the relationship between two SNCLs with the same network, station and channel but separate locations. When seismometers are working properly, the transfer function amplitude and phase will match similar values calculated from the instrument responses.

This function calculates the transfer function from data in the incoming streams. Response information is then obtained from the evalresp web service.

Usage

transferFunctionMetric(st1, st2, evalresp1, evalresp2)

Arguments

st1

a Stream object containing a seismic signal

st2

a Stream object containing a seismic signal

evalresp1

a data frame containing an amplitude and phase spectrum

evalresp2

a data frame containing an amplitude and phase spectrum

Value

A list with a single SingleValueMetric object is returned. The metric name is transfer_function and it has three attributes:

  • gain_ratio -- reasonableness of cross-spectral amplitude between st1 and st2

  • phase_diff -- reasonableness of cross-spectral phase between st1 and st2

  • ms_coherence -- mean square coherence between st1 and st2

These values can be interpreted as follows:

Whenever ms_coherence ~= 1.0, properly functioning seismometers should have:

  • gain_raio ~= 1.0

  • phase_diff < 10.0 (degrees)

Details

Details of the algorithm are as follows

# compute complex cross-spectrum of traces x and y ==> Pxx, Pxy, Pyy
# calculate transfer function values:
#     Txy(f) = Pxy(f) / Pxx(f)
#     dataGain <- Mod(Txy)
#     dataPhase <- Arg(Txy)
#
# calculate avgDataGain and avgDataPhase values for periods of 5-7s
#
# calculate the corresponding response amplitude ratio and phase difference:
#     request responses for x and y
#     respGain = respGainy(f) / respGainx(f)
#     respPhase = respPhasey(f) - respPhasex(f)
#
# calculate avgRespGain and avgRespPhase values for periods of 5-7s
#
# calculate metrics:
#     gain_ratio = avgDataGain / avgRespGain
#     hase_diff = avgDataPhase - avgRespPhase
#     ms_coherence = |Pxy|^2 / (Pxx*Pyy)

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
# Create a new IrisClient
iris <- new("IrisClient", debug=TRUE)

# Get seismic data
starttime <- as.POSIXct("2011-05-01", tz="GMT")
endtime <- starttime + 3600
# These values are specific to two 40 sps channels
minfreq <- 0.005255603
maxfreq <- 19.7403
nfreq <- 96
units <- 'def'
output <- 'fap'

st1 <- getDataselect(iris,"CI","PASC","00","BHZ",starttime,endtime)
st2 <- getDataselect(iris,"CI","PASC","10","BHZ",starttime,endtime)
evalresp1 <- getEvalresp(iris, "CI", "PASC", "00", "BHZ", starttime, 
                         minfreq, maxfreq, nfreq, units, output)
evalresp2 <- getEvalresp(iris, "CI", "PASC", "10", "BHZ", starttime, 
                         minfreq, maxfreq, nfreq, units, output)

# Calculate metrics
metricList <- transferFunctionMetric(st1,st2,evalresp1,evalresp2)
print(metricList)
  
# }

Run the code above in your browser using DataLab