Fork, updating, and modernizing of Sample Entropy (SampEn). Port of v1.2 C-language code from PhysioNet last updated 1 November 2004, by George Moody. Originally released Copyright (C) 2002-2004 by Doug Lake with GNU GPL v.2 I will be keeping with GPL 2 unless I decide to update.
Algorithm currently appears to be in O(n^2). Going to try to get that down to at least pseudolinear if possible.
usage: sampen [OPTIONS ...] [TEXT-FILE]
where OPTIONS may include:
-h print this usage summary
-m M set the maximum epoch length to M (default: 2)
-n normalize such that the mean of the input is 0 and the sample variance is 1
-r R set the tolerance to R (default: 0.2)
-v output an estimate of the standard deviation of each SampEn
TEXT-FILE should contain the time series (a column of decimal numbers); if omitted, sampen reads its standard input. The output contains values of SampEn(m,r,N) where m is the epoch length, r is the tolerance, and N is the length of the input series.