HStatAnalysis
jhpro.tseries

Class HStatAnalysis



  • public class HStatAnalysisextends Object
    Analysis of data created using HStatData.
    • Constructor Summary

      Constructors 
      Constructor and Description
      HStatAnalysis(HStatData hdata)
      Initialize analyser
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      P0DautoCorrelation(int column, int windowlength)
      Autocorrelation.
      P0DcrossCorrelation(int column1, int column2, int N, int startLag, int endLag)
      Cross-correlation.
      Return a new array that is the cross-correlation of the two argument arrays, starting and ending at user-specified lag values.
      P0DfilterGaussian(int column, double width)
      Perform Gaussian filtering.
      H1DgetH1D(int column, int nbins, double min, double max)
      Return a histogram for column.
      P0DpeakFinder(int column, double sensitivity, double width)
      Identify peaks in the time series.
      voidsmoothColumn(int column, boolean isWeighted, int k)
      Smooth a column of the original data.
      voidtransformColumn(int column, String function)
      Transform a column inside the time series using an analytic function.
    • Constructor Detail

      • HStatAnalysis

        public HStatAnalysis(HStatData hdata)
        Initialize analyser
        Parameters:
        hdata -
    • Method Detail

      • autoCorrelation

        public P0D autoCorrelation(int column,                  int windowlength)
        Autocorrelation.
        It uses the function: autocorrelation[lag] = SUM(n=0,N) (signal[n]*signal[n+lag]) with n is the input sample index, and 0signal at different times n are the same values of the same signal delays by lag samples determines the magnitude of autocorrelation[lag]. The output of an autocorrelation shows the magnitude for different lag times. Note that the array length of the signal vector must have a length from at least window length + window shift (signal.length >= N+lag-max). If the length is smaller a null float array will be given back.
        Parameters:
        column - - column of the data series
        int - windowlength - the length of correlation build with the summaration loop. Corresponds to lag-max
      • crossCorrelation

        public P0D crossCorrelation(int column1,                   int column2,                   int N,                   int startLag,                   int endLag)
        Cross-correlation.
        Return a new array that is the cross-correlation of the two argument arrays, starting and ending at user-specified lag values. The output array will have length (endLag - startLag + 1). The first element of the output will have the cross-correlation at a lag of startLag. The last element of the output will have the cross-correlation at a lag of endLag.
        Parameters:
        column1 - The first column of doubles.
        column2 - The second column of doubles.
        N - An integer indicating the number of samples to sum over.
        startLag - An int indicating at which lag to start (may be negative).
        endLag - An int indicating at which lag to end.
        Returns:
        A new array of doubles.
      • filterGaussian

        public P0D filterGaussian(int column,                 double width)
        Perform Gaussian filtering.
        Parameters:
        column - column number
        width - Gaussian width for filtering
        Returns:
        output result.
      • peakFinder

        public P0D peakFinder(int column,             double sensitivity,             double width)
        Identify peaks in the time series. Given a spectrum and search parameters, performs a digital filter peak search as specified in V. Hnatowicz et al in Comp Phys Comm 60 (1990) 111-125. Setting the sensitivity to a typical value of 3 gives a 3% chance for any peak found to be false. Maximum separation in sigma between peaks to count them as being in the same multiplet is 1.3 sigma.
        Parameters:
        column - column number
        sensitivity - larger numbers (typical=3) require better defined peaks
        width - typical FWHM of peaks in spectrum
        Returns:
        centroinds.
      • transformColumn

        public void transformColumn(int column,                   String function)
        Transform a column inside the time series using an analytic function. Original data will contain the modified column.
        Parameters:
        column - column number.
        function - functional form. The function may have one independent variable: x

        Operators and functions

        the following operators are supported:

        • Addition: '2 + 2'
        • Subtraction: '2 - 2'
        • Multiplication: '2 * 2'
        • Division: '2 / 2'
        • Exponential: '2 ^ 2' or ** (raise to a power)
        • Unary Minus,Plus (Sign Operators): '+2 - (-2)'
        • Modulo: '2 % 2'
        the following functions are supported:
        • abs: absolute value
        • acos: arc cosine
        • asin: arc sine
        • atan: arc tangent
        • cbrt: cubic root
        • ceil: nearest upper integer
        • cos: cosine
        • cosh: hyperbolic cosine
        • exp: euler's number raised to the power (e^x)
        • floor: nearest lower integer
        • log: logarithms natural (base e)
        • sin: sine
        • sinh: hyperbolic sine
        • sqrt: square root
        • tan: tangent
        • tanh: hyperbolic tangent

      • smoothColumn

        public void smoothColumn(int column,                boolean isWeighted,                int k)
        Smooth a column of the original data. It is smoothed by averaging over a moving window of a size specified by the method parameter: if the value of the parameter is k then the width of the window is 2*k + 1. If the window runs off the end of the P1D only those values which intersect the histogram are taken into consideration. The smoothing may optionally be weighted to favor the central value using a "triangular" weighting. For example, for a value of k equal to 2 the central bin would have weight 1/3, the adjacent bins 2/9, and the next adjacent bins 1/9. Errors are kept the same as before.
        Parameters:
        column - column to be smoothed.
        isWeighted - Whether values in X or Y will be weighted using a triangular weighting scheme favoring bins near the central bin.
        k - The smoothing parameter which must be non-negative. If zero, the histogram object will be returned with no smoothing applied.
      • getH1D

        public H1D getH1D(int column,         int nbins,         double min,         double max)
        Return a histogram for column.
        Parameters:
        column - a colimn index to be converted to a histogram.
        nbins - number of bins.
        min - min value of histogram
        max - max value of histogram
        Returns:
        return histogram

SCaVis 2.0 © jWork.ORG