set_stdmap Subroutine

public subroutine set_stdmap(std_map, cube, lb, ub)

Compute the STD map of a 3D array

Arguments

Type IntentOptional AttributesName
real(kind=xp), intent(inout), dimension(:,:), allocatable:: std_map

standard deviation map of the cube

real(kind=xp), intent(in), dimension(:,:,:), allocatable:: cube

cube

integer, intent(in) :: lb

lower bound

integer, intent(in) :: ub

upper bound


Calls

proc~~set_stdmap~~CallsGraph proc~set_stdmap set_stdmap proc~std std proc~set_stdmap->proc~std

Called by

proc~~set_stdmap~~CalledByGraph proc~set_stdmap set_stdmap proc~main_rohsa main_rohsa proc~main_rohsa->proc~set_stdmap program~rohsa ROHSA program~rohsa->proc~main_rohsa

Contents

Source Code


Source Code

  subroutine set_stdmap(std_map, cube, lb, ub)
    !! Compute the STD map of a 3D array
    implicit none

    integer, intent(in) :: lb !! lower bound 
    integer, intent(in) :: ub !! upper bound
    real(xp), intent(in), dimension(:,:,:), allocatable :: cube !! cube

    real(xp), intent(inout), dimension(:,:), allocatable :: std_map !! standard deviation map of the cube

    real(xp), dimension(:), allocatable :: line 
    integer, dimension(3) :: dim_cube
    integer :: i, j 

    dim_cube = shape(cube)

    do j=1, dim_cube(3)
       do i=1, dim_cube(2)
          line = cube(lb:ub,i,j)
          std_map(i,j) = std(line)
       end do
    end do
    
  end subroutine set_stdmap