### Summary

This metric identifies DC shifts in the mean amplitude (sample_mean) metric lasting more than one day. First, a 60-day time series of sample_mean metrics is scanned for isolated outlier values using a Mean Absolute Deviation approach. These outliers are replaced with the rolling median value of a seven-day surrounding window. After this “cleaning” of the time series, the algorithm differences the current day’s mean amplitude with those of the previous four days and averages these differences to form a daily weight that is larger for longer-lived offsets. Last, this daily weight is divided by the standard deviation of the median of the daily means for the full five-day window, which decreases the value of the metric in cases where variations in the daily mean are commonplace. Larger, longer-lasting DC offsets will have larger values for this metric.

### Uses

Large values of this metric could indicate loss of differential output, sensor loss, masses drifting against their stops and mass recentering successes.

### Data Analyzed

**Traces** – one N.S.L.C (Network.Station.Location.Channel) per measurement

**Metrics** – 5 days of sample_mean values for this N.S.L.C

**Window** – 24 hours starting at 00:00:00 UTC. The measurement compares mean amplitude from the 24-hour window with daily means from a five-day window ending with the current day

**Data Source** – IRIS SEED archive or IRIS PH5 archive, and MUSTANG metrics database

**SEED Channel Types** –
?H?, ?P? | High Gain, Geophone | excluding very long period channels

### Algorithm

- Request 60 days of channel mean amplitude measurements.
- Replace isolated outliers with the 7-day rolling median value of the daily sample_means.
- For each day in a 5-day window where the current day is last,
- Calculate the difference in sample_mean between the current day and each of the past days in the window,
- Geometrically average the differences looking back over a 5-day window prior to the current day to create a weight:

weight(i) = { [product( sample_mean(i) - sample_mean(i-N) )] ^ (1/5) } for N = 1,…,5

- Report the weight divided by the standard deviation of sample_means over a 5-day window as the metric:

dc_offset_value = weight / median_rolling_standard_deviation_of_amplitude_means_over_5_days

### Metric Values Returned

**value** – dc_offset indicator – increases with likelihood of an offset

**target** – the trace analyzed, labeled as N.S.L.C.Q (Network.Station.Location.Channel.Quality)

**start** – beginning of the data day requested (00:00:00 UTC)

**end** – end of the data day requested (truncated as 23:59:59 UTC)

**lddate** – date/time the measurement was made and loaded into the MUSTANG database (UTC)