[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,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

View 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

View 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

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_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

View 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

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_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

View 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

View 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

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_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

View 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

View 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