爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 10768|回复: 11

DFA(去趋势波动分析)法C语言计算程序(由DFA方法发明人共同编写)

[复制链接]

新浪微博达人勋

发表于 2013-12-23 12:55:48 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 hillside 于 2014-3-9 16:35 编辑

        DFA(去趋势波动分析)法已经在气候、水文、地质等领域有了一些应用,在其他多个学科也都有广泛的应用价值。DFA方法由台湾旅美学者、哈佛大学老师Peng C-K博士发明,下面介绍由他与合作者共同编制的程序。据C语言版介绍,原始版为Peng C-K博士的fortran版,但Peng C-K博士的fortran版网上未直接提供。
        Peng C-K个人主页:
http://reylab.bidmc.harvard.edu/people/CK.shtml
未命名.JPG
file:///c:/DOCUME~1/ADMINI~1.305/APPLIC~1/360se6/USERDA~1/Temp/ck.png

        本帖附件中仅提供了下载的主要程序,该软件平台为LINUX,具体实例亦可从一网页有关链接中下载。

Detrended Fluctuation Analysis (DFA)
This method was first proposed in: Peng C-K, Buldyrev SV, Havlin S, Simons M, Stanley HE, Goldberger AL. Mosaic organization of DNA nucleotides. Phys Rev E 1994;49:1685-1689.
A detailed description of the algorithm and its application to physiologic signals can be found in: Peng C-K, Havlin S, Stanley HE, Goldberger AL. Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time series. Chaos 1995;5:82-87.
Please cite at least one of the above publications when referencing this material, and also include the standard citation for PhysioNet:
Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220 [Circulation Electronic Pages; http://circ.ahajournals.org/cgi/content/full/101/23/e215]; 2000 (June 13).
The method of detrended fluctuation analysis has proven useful in revealing the extent of long-range correlations in time series. Briefly, the time series to be analyzed (with Nsamples) is first integrated. Next, the integrated time series is divided into boxes of equal length, n. In each box of length n, a least squares line is fit to the data (representing thetrend in that box). The y coordinate of the straight line segments is denoted by yn(k).
Next, we detrend the integrated time series, y(k), by subtracting the local trend, yn(k), in each box. The root-mean-square fluctuation of this integrated and detrended time series is calculated by

                               
登录/注册后可看大图
This computation is repeated over all time scales (box sizes) to characterize the relationship between F(n), the average fluctuation, and the box size, n. Typically, F(n) will increase with box size. A linear relationship on a log-log plot indicates the presence of power law (fractal) scaling. Under such conditions, the fluctuations can be characterized by a scaling exponent, the slope of the line relating log F(n) to log n.
Software for DFA
The file dfa.c is the C language source for a program that performs detrended fluctuation analysis of a time series. Read about how to use this program here (or download this information in Unix man page format here).
The instructions below assume that you already have a C compiler, such as gcc, and a make utility, such as GNU make. Most GNU/Linux and Unix systems have these already. Under MS-Windows,we recommend the versions of gcc and make included in the free Cygwin development environment; under Mac OS X, use the versions included in Apple's XCode tools.
  • Download dfa.c, Makefile, a sample input file (rr-intervals), and the corresponding output file (rr-dfa).
  • Build dfa by typing:make
  • Test the compiled dfa by typing:make check
  • If dfa passes the test, install it by typing:make install
If you wish to use some other C compiler, compile dfa.c and link it with the standard C math library, using whatever method is standard for your C compiler. See Makefile to see how to test the executable file that you compile.
Further information
Learn more about applications of DFA to physiologic time series in our tutorial, Fractal Mechanisms in Neural Control. Also see the references at the top of this page.
Two papers also available here discuss the effects of trends and nonstationarities on DFA.
As of August 2012, the two original papers describing the DFA method had been cited by about 1500 research articles.

气象家园相关帖子:
[源代码] DFA(去趋势波动分析)法FORTRAN语言计算程序
[源程序] DFA(去趋势波动分析)法计算程序(matlab版)




dfa.c

15.51 KB, 下载次数: 37, 下载积分: 金钱 -5

Mosaic organization of DNA nucleotides(DFA方法诞生作).pdf

736.29 KB, 下载次数: 11, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-23 15:33:56 | 显示全部楼层
好东西  正求
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-23 15:34:14 | 显示全部楼层
好东西 正求
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-23 15:34:30 | 显示全部楼层
好东西  正求
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-23 15:34:41 | 显示全部楼层
好东西 正求
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-25 08:38:30 | 显示全部楼层
看来楼主是气候方面的高手,学习了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-12-25 11:17:47 | 显示全部楼层
萍水啸天 发表于 2013-12-25 08:38
看来楼主是气候方面的高手,学习了

高手倒不是,只是喜欢收集罢了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-2-20 09:14:18 | 显示全部楼层
请教楼主此程序可以求阈值吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-5-13 10:35:26 | 显示全部楼层
多谢楼主分享{:5_257:}
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-9-2 11:04:02 | 显示全部楼层
谢谢楼主!下下来学习学习!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表