[seiscomp, scanloc] Install, add .gitignore

This commit is contained in:
2025-10-09 15:07:02 +02:00
commit 20f5301bb1
2848 changed files with 1315858 additions and 0 deletions

View File

@ -0,0 +1,79 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_ML_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_ML_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AbstractAmplitudeProcessor_ML : public AmplitudeProcessor {
public:
AbstractAmplitudeProcessor_ML(const std::string &type);
public:
void initFilter(double fsamp) override;
int capabilities() const override;
IDList capabilityParameters(Capability cap) const override;
bool setParameter(Capability cap, const std::string &value) override;
bool setup(const Settings &settings) override;
protected:
void setDefaultConfiguration();
bool deconvolveData(Response *resp, DoubleArray &data, int numberOfIntegrations) override;
/**
* Computes the zero-to-peak amplitude on the simulated Wood-Anderson
* trace.
*/
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt, AmplitudeValue *amplitude,
double *period, double *snr) override;
protected:
enum AmplitudeMeasureType {
AbsMax,
MinMax,
PeakTrough
};
AmplitudeMeasureType _amplitudeMeasureType;
std::string _preFilter;
bool _applyWA{true};
};
}
}
#endif

View File

@ -0,0 +1,109 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLc_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLc_H
#include <seiscomp/processing/amplitudes/ML.h>
namespace Seiscomp {
namespace Processing {
//! Wrapper class that allows access to protected methods for
//! the proxy (see below).
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_MLc : public AbstractAmplitudeProcessor_ML {
public:
AmplitudeProcessor_MLc();
friend class AmplitudeProcessor_MLc2h;
};
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_MLc2h : public AmplitudeProcessor {
public:
AmplitudeProcessor_MLc2h();
public:
int capabilities() const override;
IDList capabilityParameters(Capability cap) const override;
bool setParameter(Capability cap, const std::string &value) override;
void reset() override;
bool setup(const Settings &settings) override;
void setTrigger(const Core::Time &trigger) override;
void setEnvironment(const DataModel::Origin *hypocenter,
const DataModel::SensorLocation *receiver,
const DataModel::Pick *pick) override;
void computeTimeWindow() override;
void close() const override;
bool feed(const Record *record) override;
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt, AmplitudeValue *amplitude,
double *period, double *snr) override;
const AmplitudeProcessor *componentProcessor(Component comp) const override;
const DoubleArray *processedData(Component comp) const override;
void reprocess(OPT(double) searchBegin, OPT(double) searchEnd) override;
private:
void setDefaultConfiguration();
void newAmplitude(const AmplitudeProcessor *proc,
const AmplitudeProcessor::Result &res);
struct ComponentResult {
AmplitudeValue value;
AmplitudeTime time;
double snr;
};
enum CombinerProc {
TakeMax,
TakeMin,
TakeAverage,
TakeGeometricMean
};
mutable AmplitudeProcessor_MLc _ampE, _ampN;
CombinerProc _combiner{TakeMax};
OPT(ComponentResult) _results[2];
double _amplitudeScale{1.0};
};
}
}
#endif

View File

@ -0,0 +1,112 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLH_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLH_H
#include <seiscomp/processing/amplitudes/ML.h>
namespace Seiscomp {
namespace Processing {
//! Wrapper class that allows access to protected methods for
//! the proxy (see below).
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_MLh : public AbstractAmplitudeProcessor_ML {
public:
AmplitudeProcessor_MLh();
friend class AmplitudeProcessor_ML2h;
};
//! Proxy amplitude processor that holds two MLh processors to calculate
//! the amplitudes on both horizontals and then averages the result.
//! This class does not handle waveforms itself. It directs them to the
//! corresponding amplitude processors instead.
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_ML2h : public AmplitudeProcessor {
public:
AmplitudeProcessor_ML2h();
public:
int capabilities() const override;
IDList capabilityParameters(Capability cap) const override;
bool setParameter(Capability cap, const std::string &value) override;
bool setup(const Settings &settings) override;
void setTrigger(const Core::Time& trigger) override;
void setEnvironment(const DataModel::Origin *hypocenter,
const DataModel::SensorLocation *receiver,
const DataModel::Pick *pick) override;
void computeTimeWindow() override;
void reset() override;
void close() const override;
bool feed(const Record *record) override;
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt, AmplitudeValue *amplitude,
double *period, double *snr) override;
const AmplitudeProcessor *componentProcessor(Component comp) const override;
const DoubleArray *processedData(Component comp) const override;
void reprocess(OPT(double) searchBegin, OPT(double) searchEnd) override;
private:
void newAmplitude(const AmplitudeProcessor *proc,
const AmplitudeProcessor::Result &res);
private:
struct ComponentResult {
AmplitudeValue value;
AmplitudeTime time;
double snr;
};
enum CombinerProc {
TakeMin,
TakeMax,
TakeAverage,
TakeGeometricMean
};
mutable AmplitudeProcessor_MLh _ampE, _ampN;
CombinerProc _combiner;
OPT(ComponentResult) _results[2];
};
}
}
#endif

View File

@ -0,0 +1,50 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLv_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MLv_H
#include <seiscomp/processing/amplitudes/ML.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_MLv : public AbstractAmplitudeProcessor_ML {
public:
AmplitudeProcessor_MLv();
public:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt, AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,57 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MJMA_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MJMA_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_Mjma : public AmplitudeProcessor {
public:
AmplitudeProcessor_Mjma();
AmplitudeProcessor_Mjma(const Core::Time& trigger);
public:
virtual void initFilter(double fsamp) override;
protected:
bool deconvolveData(Response *resp, DoubleArray &data, int numberOfIntegrations) override;
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,55 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MS20_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MS20_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_ms20 : public AmplitudeProcessor {
public:
AmplitudeProcessor_ms20();
public:
void initFilter(double fsamp) override;
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,60 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_Mwp_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_Mwp_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_Mwp : public AmplitudeProcessor {
public:
AmplitudeProcessor_Mwp();
public:
const DoubleArray *processedData(Component comp) const override;
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
private:
void init();
private:
DoubleArray _processedData;
};
}
}
#endif

View File

@ -0,0 +1,173 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_IASPEI_H_INCLUDED
#define SEISCOMP_PROCESSING_IASPEI_H_INCLUDED
#include <vector>
namespace Seiscomp {
namespace Processing {
namespace IASPEI {
// IASPEI Amplitude Measurement Procedure
//
// From:
// Summary of Magnitude Working Group Recommendations on Standard Procedures
// for Determining Earthquake Magnitudes From Digital Data - 2013 March 27
//
// Amplitudes [...] to be measured as one-half the maximum deflection of the
// seismogram trace, peak-to-adjacent- trough or trough-to-adjacent-peak,
// where peak and trough are separated by one crossing of the zero-line: the
// measurement is sometimes described as "one-half peak-to-peak amplitude."
// None of the magnitude formulas presented in this article are intended to
// be used with the full peak-to-trough deflection as the amplitude. The
// periods are to be measured as twice the time-intervals separating the
// peak and adjacent-trough from which the amplitudes are measured.
struct AmplitudePeriodMeasurement
{
// Amplitudes
//
// Note that "peak" here refers to both maxima and minima and
// thus can also refer to a trough. So peak-to-peak is either
// peak-to-trough or trough-to-peak. Just to avoid confusion.
//
// - az2p Max. zero-to-peak amplitude found at index iz2p
// - ap2p1 first peak of the max. peak-to-peak amplitude pair
// - ap2p2 second peak
//
// Note that az2p is the larger of ap2p1 and ap2p2.
double az2p;
double ap2p1;
double ap2p2;
// Sample indices corresponding the above peaks
std::size_t iz2p;
std::size_t ip2p1;
std::size_t ip2p2;
// From the above numbers we can now derive:
//
// - Period in sampling intervals:
//
// (ip2p2 - ip2p1)*2
//
// To be divided by the sampling rate in order to get the period
// in seconds.
//
//
// - One half of the max. peak-to-peak amplitude in data units:
//
// (ap2p1 + ap2p2)/2
//
//
// - Time of measurement as offset from first sample of the middle
// of the two peaks:
//
// (ip2p1 + ip2p2)/2
//
// To be divided by the sampling rate in order to get the time
// in seconds.
};
// Compute amplitude and dominant period for the given data vector.
//
// The data may have an offset to be removed during the amplitude measurement.
// If dealing with demeaned data the offset should be zero.
//
// We only work on the time window between samples istart and iend.
//
// A reference to a struct AmplitudePeriodMeasurement is speciefied, where the
// result will be written to. See above for details.
bool measureAmplitudePeriod(
const std::vector<double> &data,
double offset,
std::size_t istart,
std::size_t iend,
AmplitudePeriodMeasurement &measurement
);
// Interface for raw pointer.
bool measureAmplitudePeriod(
std::size_t ndata,
const double *data,
double offset,
std::size_t istart,
std::size_t iend,
AmplitudePeriodMeasurement &measurement
);
/**
* @brief Finds a zero crossing within the data portion.
* @param n The number of samples
* @param data The data pointer
* @param offset An optional data offset which is removed from each sample checked.
* @param istart Index to start from
* @param iend Index before to end
* @return The zero crossing index or -1 if none was found.
*/
double findZeroCrossing(
std::size_t n,
const double *data,
double offset,
std::size_t istart,
std::size_t iend
);
/**
* @brief Finds a zero crossing within the data portion.
* @param data The data vector
* @param offset An optional data offset which is removed from each sample checked.
* @param istart Index to start from
* @param iend Index before to end
* @return The zero crossing index or -1 if none was found.
*/
double findZeroCrossing(
const std::vector<double> &data,
double offset,
std::size_t istart,
std::size_t iend
);
// Compute the WWSSN-SP displacement amplitude response needed for the
// mb amplitude correction.
//
// The response is based on the poles and zeros specified in the IASPEI
// Magnitude Working Group Recommendations.
double wwssnspAmplitudeResponse(double frequency_hz);
} // namespace IASPEI
} // namespace Processing
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,51 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mBc_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mBc_H
#include <seiscomp/processing/amplitudes/m_B.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_mBc : public AmplitudeProcessor_mB {
public:
AmplitudeProcessor_mBc();
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,85 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#include <vector>
class Measurement {
public:
Measurement(std::size_t nsamp);
virtual ~Measurement();
public:
// offset of the data samples
// must be measured prior to the measurement
void setOffset(double x) { offset = x; }
// Feed n broadband ground velocity values v.
// feed() calls update() automatically!
virtual void feed(std::size_t n, const double *v) = 0;
double progress() const { return nsamp>0 ? double(processed)/nsamp : 0; }
protected:
// an offset to be subtracted before the actual measurement
double offset;
// number of samples anticipated to contribute to measurement
std::size_t nsamp;
// number of samples already processed
std::size_t processed;
};
class Measurement_mBc : public Measurement {
public:
Measurement_mBc(std::size_t nsamp, double q=0.6);
public:
void feed(std::size_t n, const double *v) override;
public:
// Accessors to subevents. mBc specific and meant for debugging, e.g.
// for plotting the individual subevents contributing to the sum.
//
// "Subevents" are individual extrema that contribute to the sum.
std::size_t subeventCount() const;
std::size_t subeventIndex(std::size_t i) const;
double subeventValue(std::size_t i) const;
public:
double vcum; // cumulative velocity
double vmax; // zero-to-peak maximum velocity
std::size_t icum; // index at which vcum was observed ( = index of last subevent)
std::size_t imax; // index at which vmax was observed
private:
// Cutoff threshold, normally fixed to 0.6, don't change!
// See also Bormann & Saul (2009)
double _q;
std::vector<std::size_t> _subeventIndices;
std::vector<double> _subeventValues;
int _previous;
std::size_t _ipeak;
double _vpeak;
};

View File

@ -0,0 +1,56 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mB_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mB_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_mB : public AmplitudeProcessor {
public:
AmplitudeProcessor_mB();
public:
void finalizeAmplitude(DataModel::Amplitude *amplitude) const override;
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,61 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mb_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_mb_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_mb : public AmplitudeProcessor {
DECLARE_SC_CLASS(AmplitudeProcessor_mb)
public:
AmplitudeProcessor_mb();
public:
void initFilter(double fsamp) override;
void finalizeAmplitude(DataModel::Amplitude *amplitude) const override;
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif

View File

@ -0,0 +1,52 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MSBB_H
#define SEISCOMP_PROCESSING_AMPLITUDEPROCESSOR_MSBB_H
#include <seiscomp/processing/amplitudeprocessor.h>
namespace Seiscomp {
namespace Processing {
class SC_SYSTEM_CLIENT_API AmplitudeProcessor_msbb : public AmplitudeProcessor {
public:
AmplitudeProcessor_msbb();
protected:
bool computeAmplitude(const DoubleArray &data,
size_t i1, size_t i2,
size_t si1, size_t si2,
double offset,
AmplitudeIndex *dt,
AmplitudeValue *amplitude,
double *period, double *snr) override;
};
}
}
#endif