作者
digoal
日期
2020-03-26
标签
PostgreSQL , GNU Scientific Library (GSL)
背景
This Postgresql extension primarily provides wrapper functions for functions from the GNU Scientific Library (GSL) http://www.gnu.org/software/gsl/. Additional useful functions are provided to work with the wrapper functions.
This first release provides wrappers for 2 of the GSL functions, the same methods could be applied to many of the remaining 1900+ GSL functions.
The GSL library uses the system malloc(), free(), realloc() and calloc() functions and can be used with the pg_gsl extension. It is also possible to modify the GSL library to use the Postgresql memory management function palloc(), pfree() and repalloc(), details on how to make these changes is given in the later section 'Using Postgresql memory management'.
This first release wraps 2 of the 1900+ GSL functions:
pg_gsl_fft_real_transform(double precision[]) returning double precision[]
To return the transform of the input time series as the amplitudes of a series of sine and cosine waves.
pg_gsl_fft_halfcomplex_inverse(double precision[]) returning double precision[]
To return the re-constructed input time series from a set of sine and cosine waves
2 functions have been added to work with the retuned set of cosine and sine ways from pg_gsl_fft_real_transform():
pg_gsl_x_fftToSpectrum(double precision[]) returning double precision[]
To return the normalised spectrum
pg_gsl_x_fftTruncate(double precision[], n integer) returning double precision[]
To replace the last n sine and cosine waves with zeros (filtering out the higher frequencies).
and finally a function to return the extension version:
pg_gsl_x_version() returns text
例如信号和噪音叠加后的信号还原处理
https://github.com/ferndalehall/pg_gsl
https://www.gnu.org/software/gsl/doc/html/fft.html
http://linux.math.tifr.res.in/manuals/html/gsl-ref-html/gsl-ref_15.html
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.