!-------------------------------------------------
!  RFAlib Module
!-------------------------------------------------
module rfalib
  use dcl_common
  contains

    function DclGetAVE(rx)                        !平均を求める
      real, intent(in), dimension(:) :: rx
      real                           :: DclGetAVE
      DclGetAVE = rave(rx,size(rx),1)
    end function
      
    function DclGetVAR(rx)                        !分散を求める
      real, intent(in), dimension(:) :: rx
      real                           :: DclGetVAR
      DclGetVAR = rvar(rx,size(rx),1)
    end function
      
    function DclGetSTD(rx)                        !標準偏差を求める
      real, intent(in), dimension(:) :: rx
      real                           :: DclGetSTD
      DclGetSTD = rstd(rx,size(rx),1)
    end function
      
    function DclGetRMS(rx)                        !root mean squareを求める
      real, intent(in), dimension(:) :: rx
      real                           :: DclGetRMS
      DclGetRMS = rrms(rx,size(rx),1)
    end function
      
    function DclGetAMP(rx)                        !大きさ (（Σ rx^2)^1/2 ) を求める
      real, intent(in), dimension(:) :: rx
      real                           :: DclGetAMP
      DclGetAMP = ramp(rx,size(rx),1)
    end function
end module
