version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
algorithms.h
1#ifndef _MSPASS_ALGORITHMS_H_
2#define _MSPASS_ALGORITHMS_H_
3/* This file should contain function protypes for all simple function
4 algorithms that are to be part of mspass.
5 *
6 */
7#include "mspass/algorithms/TimeWindow.h"
8#include "mspass/seismic/Ensemble.h"
9#include "mspass/seismic/Seismogram.h"
10#include "mspass/seismic/TimeSeries.h"
11#include "mspass/seismic/TimeSeriesWGaps.h"
12namespace mspass::algorithms {
13/* \brief Apply agc operator to three component seismogram data.
14
15 Automatic gain control (agc) is a standard operation in seismic
16reflection processing. The algorithm used her is a variant of that in
17seismic unix but applied to vector data. That is scaling is no
18determined by absolute value of each sample but th vector amplitude of
19each sample. Scaling is determined by the average vector amplitude
20over a specified time window length. There isa ramp in and ramp off
21range of size equal to the window length. agc was notorious in the
22early days of seismic processing for making it impossible to recover
23true amplitude. We remove that problem here by returning a TimeSeries
24object whose contents contain the gain applied to each sample of the
25original data.
26
27\param d - data to apply the operator to. Note it is altered.
28\param twin - length of the agc operator in seconds
29
30\return TimeSeries object with the same number of samples as d. The
31 value of each sample is the gain applied at the comparable sample in d.
32
33This function does not throw an exception, but can post errors to the
34ErrorLogger object that is a member of Seismogram.
35*/
37 const double twin);
58WindowData(const mspass::seismic::Seismogram &parent,
80WindowData(const mspass::seismic::CoreSeismogram &parent,
82
102WindowData(const mspass::seismic::TimeSeries &parent,
123WindowData(const mspass::seismic::CoreTimeSeries &parent,
125
126/* This set of procedures are ancessors of seismogram_helpers. They
127 * were moved to algorithms June 2020 for mspass */
150std::shared_ptr<mspass::seismic::Seismogram>
151ArrivalTimeReference(mspass::seismic::Seismogram &din, std::string key,
176ExtractComponent(const mspass::seismic::Seismogram &tcs,
177 const unsigned int component);
178/* Enemble algorithms */
194std::shared_ptr<mspass::seismic::ThreeComponentEnsemble>
195ArrivalTimeReference(mspass::seismic::ThreeComponentEnsemble &din,
196 std::string key, mspass::algorithms::TimeWindow tw);
219 const unsigned int comp);
235sparse_convolve(const mspass::seismic::CoreTimeSeries &wavelet,
300BundleSEEDGroup(const std::vector<mspass::seismic::TimeSeries> &d,
301 const size_t i0, const size_t iend);
365void seed_ensemble_sort(
368splice_segments(std::vector<mspass::seismic::TimeSeries> &segments,
369 bool save_history);
370std::vector<mspass::seismic::TimeSeries>
371repair_overlaps(std::vector<mspass::seismic::TimeSeries> &segments);
372} // namespace mspass::algorithms
373#endif
Defines a time window.
Definition TimeWindow.h:12
Vector (three-component) seismogram data object.
Definition CoreSeismogram.h:39
Scalar time series data object.
Definition CoreTimeSeries.h:17
Definition Ensemble.h:9
Template class that extends Ensemble to include an error log and live tests.
Definition Ensemble.h:135
Implemntation of Seismogram for MsPASS.
Definition Seismogram.h:14
Implemntation of TimeSeries for MsPASS.
Definition TimeSeries.h:14
Definition TimeSeriesWGaps.h:6