Calculates value of argument of 2D Gaussian spatial distribution with with counter-clockwise rotation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Argument of exponential comprising 2D Gaussian distribution
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