version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
dpss.h
1#ifndef __DPSS_H__
2#define __DPSS_H__
3#include <cmath>
4#include <string.h>
5namespace mspass::algorithms::deconvolution {
6
7// Error classes for LAPACK, and a general error
8class ERR {
9public:
10 ERR() {};
11 ERR(const char *msg);
12 void getmsg(char *errmsg);
13 const char *getmsg();
14
15protected:
16 char msg[30];
17};
18
19class LAPACK_ERROR : public ERR {
20public:
21 LAPACK_ERROR() {};
22 LAPACK_ERROR(const char *errmsg);
23};
24
25void compute_energy_concentrations(double *h, int n, double NW, double *lambda,
26 int nseq);
27
28void eig_iit(int n, double *D, double *E, int il, int iu, double *eig_val,
29 double *eig_vec, int vec_length);
30
31// normalizes a vector h
32void normalize_vec(double *h, int n);
33
34// polarizes the sequences
35void polarize_dpss(double *h, int n, int iseq);
36
37// Reduces the problem using simple even/odd splitting (exploiting double
38// symmetry)
39void dpss_calc(int n, double NW, int seql, int sequ, double *h);
40} // namespace mspass::algorithms::deconvolution
41#endif