Module s2dw_stat_mod

module s2dw_stat_mod

        ! Uses
    use s2dw_types_mod
    use s2dw_error_mod
    use s2dw_core_mod
    use omp_lib

        ! Subroutines and functions
    public subroutine s2dw_stat_moments (wavdyn, J, B, N, alpha, mean, var, skew, kur, wavdyn_mask, five, six)
    public subroutine s2dw_stat_moments_write (filename, nsim, description, J, mu, var, skew, kur, five, six)
    public subroutine s2dw_stat_histogram (wavdyn, J, B, N, alpha, hist_nbins, hist_bins, hist_vals)
    public subroutine s2dw_stat_histogram_write (filename, J, hist_nbins, hist_bins, hist_vals)

end module s2dw_stat_mod
Functionality to compute statistics of wavelet coefficients.

Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)

Version: 0.1 February 2012


Description of Subroutines and Functions

s2dw_stat_moments

public subroutine s2dw_stat_moments (wavdyn, J, B, N, alpha, mean, var, skew, kur, wavdyn_mask, five, six)
    type (s2dw_wav_abg), intent(inout), dimension (0:J) :: wavdyn
    integer, intent(in) :: J
    integer, intent(in) :: B
    integer, intent(in) :: N
    real (kind=dp), intent(in) :: alpha
    real (kind=dp), intent(out), dimension (0:J) :: mean
    real (kind=dp), intent(out), dimension (0:J) :: var
    real (kind=dp), intent(out), dimension (0:J) :: skew
    real (kind=dp), intent(out), dimension (0:J) :: kur
    type (s2dw_wav_abg), optional, intent(in), dimension (0:J) :: wavdyn_mask
    real (kind=dp), optional, intent(out), dimension (0:J) :: five
    real (kind=dp), optional, intent(out), dimension (0:J) :: six
    ! Calls: s2dw_error
end subroutine s2dw_stat_moments
Compute moments of wavelets coefficients for each scale, including the mean, variance, skewness and kurtosis. The fifth- and sixth-order standardized moments can also be optionally returned.

Notes:

Variables:

Author: J. D. McEwen

Version: 0.1 February 2012

s2dw_stat_moments_write

public subroutine s2dw_stat_moments_write (filename, nsim, description, J, mu, var, skew, kur, five, six)
    character (len=*), intent(in) :: filename
    integer, intent(in) :: nsim
    character (len=STRING_LEN), intent(in), dimension (0:nsim-1) :: description
    integer, intent(in) :: J
    real (kind=dp), intent(in), dimension (0:nsim-1,0:J) :: mu
    real (kind=dp), intent(in), dimension (0:nsim-1,0:J) :: var
    real (kind=dp), intent(in), dimension (0:nsim-1,0:J) :: skew
    real (kind=dp), intent(in), dimension (0:nsim-1,0:J) :: kur
    real (kind=dp), optional, dimension (0:nsim-1,0:J) :: five
    real (kind=dp), optional, dimension (0:nsim-1,0:J) :: six
end subroutine s2dw_stat_moments_write
Write moments of wavelets coefficients for each scale, including the mean, variance, skewness and kurtosis. Moments are written to a single line (ordered mean, variance, skewness and kurtosis) for each set of wavelet coefficients. Fifth and sixth order standardized moments can also be optionally included.

Variables:

Author: J. D. McEwen

Version: 0.1 February 2012

s2dw_stat_histogram

public subroutine s2dw_stat_histogram (wavdyn, J, B, N, alpha, hist_nbins, hist_bins, hist_vals)
    type (s2dw_wav_abg), intent(in), dimension (0:J) :: wavdyn
    integer, intent(in) :: J
    integer, intent(in) :: B
    integer, intent(in) :: N
    real (kind=dp), intent(in) :: alpha
    integer, intent(in) :: hist_nbins
    real (kind=dp), intent(out), dimension (0:J,0:hist_nbins-1) :: hist_bins
    integer, intent(out), dimension (0:J,0:hist_nbins-1) :: hist_vals
    ! Calls: s2dw_error
end subroutine s2dw_stat_histogram
Compute histogram of wavelets coefficients for each scale.

Notes:

Variables:

Author: S. M. Feeney

Version: 0.1 February 2012

s2dw_stat_histogram_write

public subroutine s2dw_stat_histogram_write (filename, J, hist_nbins, hist_bins, hist_vals)
    character (len=*), intent(in) :: filename
    integer, intent(in) :: J
    integer, intent(in) :: hist_nbins
    real (kind=dp), intent(in), dimension (0:J,0:hist_nbins-1) :: hist_bins
    integer, intent(in), dimension (0:J,0:hist_nbins-1) :: hist_vals
end subroutine s2dw_stat_histogram_write
Write histograms of wavelets coefficients for each scale. The first line of output contains the j = 0 bins, the second line contains the j = 0 bin counts and so on.

Variables:

Author: S. M. Feeney

Version: 0.1 February 2012