[seiscomp, scanloc] Install, add .gitignore
This commit is contained in:
70
include/seiscomp/processing/magnitudes/ML.h
Normal file
70
include/seiscomp/processing/magnitudes/ML.h
Normal file
@ -0,0 +1,70 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_ML_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_ML_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
#include <seiscomp/processing/magnitudes/utils.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_ML : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_ML);
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_ML();
|
||||
|
||||
|
||||
public:
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
std::string amplitudeType() const override;
|
||||
|
||||
|
||||
protected:
|
||||
bool initLocale(Locale *locale, const Settings &settings,
|
||||
const std::string &configPrefix) override;
|
||||
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
|
||||
private:
|
||||
LogA0 _logA0;
|
||||
double _maxDistanceKm;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
81
include/seiscomp/processing/magnitudes/MLc.h
Normal file
81
include/seiscomp/processing/magnitudes/MLc.h
Normal file
@ -0,0 +1,81 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_MLc_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MLc_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
#include <seiscomp/processing/magnitudes/utils.h>
|
||||
#include <seiscomp/math/geo.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_MLc : public MagnitudeProcessor {
|
||||
public:
|
||||
MagnitudeProcessor_MLc();
|
||||
|
||||
|
||||
public:
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
std::string amplitudeType() const override;
|
||||
|
||||
|
||||
protected:
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
protected:
|
||||
bool initLocale(Locale *locale, const Settings &settings,
|
||||
const std::string &configPrefix) override;
|
||||
|
||||
private:
|
||||
double _minDistanceKm{-1.0};
|
||||
double _maxDistanceKm{8.0 * KM_OF_DEGREE};
|
||||
double _maxDepth{80.0};
|
||||
std::string _distanceMode{"hypocentral"};
|
||||
std::string _calibrationType{"parametric"};
|
||||
// parameters for parametric magnitude calibration
|
||||
double _c0{0.0};
|
||||
double _c1{0.69};
|
||||
double _c2{0.00095};
|
||||
double _c3{1.11};
|
||||
double _c4{0.0};
|
||||
double _c5{1.0};
|
||||
// parameters for non-parametric magnitude calibration
|
||||
LogA0 _logA0;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
71
include/seiscomp/processing/magnitudes/MLv.h
Normal file
71
include/seiscomp/processing/magnitudes/MLv.h
Normal file
@ -0,0 +1,71 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_MLV_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MLV_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
#include <seiscomp/processing/magnitudes/utils.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_MLv : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_MLv);
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_MLv();
|
||||
|
||||
|
||||
public:
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
|
||||
protected:
|
||||
bool initLocale(Locale *locale, const Settings &settings,
|
||||
const std::string &configPrefix) override;
|
||||
|
||||
Status computeMagnitude(double amplitude,
|
||||
const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
|
||||
private:
|
||||
LogA0 _logA0;
|
||||
double _maxDistanceKm;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
52
include/seiscomp/processing/magnitudes/Mjma.h
Normal file
52
include/seiscomp/processing/magnitudes/Mjma.h
Normal 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_MAGNITUDEPROCESSOR_MJMA_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MJMA_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_Mjma : public MagnitudeProcessor {
|
||||
public:
|
||||
MagnitudeProcessor_Mjma();
|
||||
|
||||
protected:
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
63
include/seiscomp/processing/magnitudes/Ms20.h
Normal file
63
include/seiscomp/processing/magnitudes/Ms20.h
Normal file
@ -0,0 +1,63 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_MS20_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MS20_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_ms20 : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_ms20);
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_ms20();
|
||||
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
protected:
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
private:
|
||||
double lowPer;
|
||||
double upPer;
|
||||
double minDistanceDeg;
|
||||
double maxDistanceDeg;
|
||||
double maxDepthKm;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
56
include/seiscomp/processing/magnitudes/Mwp.h
Normal file
56
include/seiscomp/processing/magnitudes/Mwp.h
Normal 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_MAGNITUDEPROCESSOR_M_B_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_M_B_H
|
||||
|
||||
|
||||
#include <seiscomp//processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_Mwp : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_Mwp);
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_Mwp();
|
||||
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
Status estimateMw(const Config::Config *config, double magnitude,
|
||||
double &estimation, double &stdError) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
48
include/seiscomp/processing/magnitudes/mBc.h
Normal file
48
include/seiscomp/processing/magnitudes/mBc.h
Normal file
@ -0,0 +1,48 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_M_B_C_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_M_B_C_H
|
||||
|
||||
|
||||
#include <seiscomp//processing/magnitudes/m_B.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_mBc : public MagnitudeProcessor_mB {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_mBc)
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_mBc();
|
||||
|
||||
Status estimateMw(const Config::Config *config,
|
||||
double magnitude, double &Mw_estimate,
|
||||
double &Mw_stdError) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
65
include/seiscomp/processing/magnitudes/m_B.h
Normal file
65
include/seiscomp/processing/magnitudes/m_B.h
Normal file
@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_M_B_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_M_B_H
|
||||
|
||||
|
||||
#include <seiscomp//processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_mB : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_mB)
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_mB();
|
||||
MagnitudeProcessor_mB(const std::string& type);
|
||||
|
||||
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
Status estimateMw(const Config::Config *config,
|
||||
double magnitude, double &Mw_estimate,
|
||||
double &Mw_stdError) override;
|
||||
|
||||
private:
|
||||
double minDistanceDeg;
|
||||
double maxDistanceDeg;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
60
include/seiscomp/processing/magnitudes/mb.h
Normal file
60
include/seiscomp/processing/magnitudes/mb.h
Normal 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_MAGNITUDEPROCESSOR_MB_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MB_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_mb : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_mb)
|
||||
|
||||
bool setup(const Settings &settings) override;
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_mb();
|
||||
|
||||
protected:
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
|
||||
private:
|
||||
double minDistanceDeg;
|
||||
double maxDistanceDeg;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
54
include/seiscomp/processing/magnitudes/msbb.h
Normal file
54
include/seiscomp/processing/magnitudes/msbb.h
Normal file
@ -0,0 +1,54 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDEPROCESSOR_MSBB_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDEPROCESSOR_MSBB_H
|
||||
|
||||
|
||||
#include <seiscomp/processing/magnitudeprocessor.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
class SC_SYSTEM_CLIENT_API MagnitudeProcessor_msbb : public MagnitudeProcessor {
|
||||
DECLARE_SC_CLASS(MagnitudeProcessor_msbb);
|
||||
|
||||
public:
|
||||
MagnitudeProcessor_msbb();
|
||||
|
||||
protected:
|
||||
Status computeMagnitude(double amplitude, const std::string &unit,
|
||||
double period, double snr,
|
||||
double delta, double depth,
|
||||
const DataModel::Origin *hypocenter,
|
||||
const DataModel::SensorLocation *receiver,
|
||||
const DataModel::Amplitude *,
|
||||
const Locale *,
|
||||
double &value) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
64
include/seiscomp/processing/magnitudes/utils.h
Normal file
64
include/seiscomp/processing/magnitudes/utils.h
Normal file
@ -0,0 +1,64 @@
|
||||
/***************************************************************************
|
||||
* 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_MAGNITUDES_UTILS_H
|
||||
#define SEISCOMP_PROCESSING_MAGNITUDES_UTILS_H
|
||||
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace Processing {
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct TableXY {
|
||||
using Item = std::pair<double, T>;
|
||||
using Items = std::vector<Item>;
|
||||
|
||||
bool empty() const;
|
||||
bool set(const std::string &definition);
|
||||
bool set(const std::vector<std::string> &definition);
|
||||
|
||||
// Throws out_of_range if x is out of range
|
||||
T at(double x) const;
|
||||
|
||||
Items items;
|
||||
};
|
||||
|
||||
|
||||
using LogA0 = TableXY<double>;
|
||||
|
||||
|
||||
template <typename T>
|
||||
std::ostream &operator<<(std::ostream &os, const TableXY<T> &table);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#include "utils.ipp"
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user