PSI_ROT Function

private function PSI_ROT(R, R0, sigR, Z, Z0, sigZ, theta)

Calculates value of argument of 2D Gaussian spatial distribution with with counter-clockwise rotation.

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: R

R-coordinate of MH sampled location

real(kind=rp), intent(in) :: R0

R-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigR

Variance of first dimension of 2D Gaussian

real(kind=rp), intent(in) :: Z

Z-coordinate of MH sampled location

real(kind=rp), intent(in) :: Z0

Z-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigZ

Variance of second dimension of 2D Gaussian

real(kind=rp), intent(in) :: theta

Angle of counter-clockwise rotation (in radians), of 2D Gaussian distribution relative to R,Z

Return Value real(kind=rp)

Argument of exponential comprising 2D Gaussian distribution


Called by

proc~~psi_rot~2~~CalledByGraph proc~psi_rot~2 PSI_ROT proc~avalanche_4d Avalanche_4D proc~avalanche_4d->proc~psi_rot~2 proc~get_avalanche_4d get_Avalanche_4D proc~get_avalanche_4d->proc~avalanche_4d

Contents

Source Code


Source Code

  FUNCTION PSI_ROT(R,R0,sigR,Z,Z0,sigZ,theta)
    !! Calculates value of argument of 2D Gaussian spatial distribution with
    !! with counter-clockwise rotation.
    REAL(rp), INTENT(IN) 	:: R
    !! R-coordinate of MH sampled location
    REAL(rp), INTENT(IN) 	:: R0
    !! R-coordinate of center of 2D Gaussian
    REAL(rp), INTENT(IN) 	:: sigR
    !! Variance of first dimension of 2D Gaussian
    REAL(rp), INTENT(IN) 	:: Z
    !! Z-coordinate of MH sampled location
    REAL(rp), INTENT(IN) 	:: Z0
    !! Z-coordinate of center of 2D Gaussian
    REAL(rp), INTENT(IN) 	:: sigZ
    !! Variance of second dimension of 2D Gaussian
    REAL(rp), INTENT(IN) 	:: theta
    !! Angle of counter-clockwise rotation (in radians), of 2D Gaussian
    !! distribution relative to R,Z
    REAL(rp) 		:: PSI_ROT
    !! Argument of exponential comprising 2D Gaussian distribution 

    PSI_ROT=(R-R0)**2*((cos(theta))**2/(2*sigR**2)+(sin(theta))**2/ &
         (2*sigZ**2))+2*(R-R0)*(Z-Z0)*cos(theta)*sin(theta)*(1/ &
         (2*sigR**2)-1/(2*sigZ**2))+(Z-Z0)**2*((sin(theta))**2/ &
         (2*sigR**2)+(cos(theta))**2/(2*sigZ**2))

  END FUNCTION PSI_ROT