Function to transform an acf complex array so that the acf maximum is in the center
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=R8), | intent(in), | dimension(1:long, 1:larg) | :: | tab_in |
2D array to transform |
|
complex(kind=R8), | intent(out), | dimension(1:long, 1:larg) | :: | tab_out |
transformed 2D array |
|
integer(kind=I4), | intent(in) | :: | long |
2D array length |
||
integer(kind=I4), | intent(in) | :: | larg |
2D array width |
subroutine trans_corner2center_cmpl(tab_in, tab_out, long, larg) !! Function to transform an acf complex array so that the acf maximum is in the center implicit none integer(kind=I4), intent(in ) :: long !! *2D array length* integer(kind=I4), intent(in ) :: larg !! *2D array width* complex(kind=R8), intent(in ), dimension(1:long, 1:larg) :: tab_in !! *2D array to transform* complex(kind=R8), intent(out), dimension(1:long, 1:larg) :: tab_out !! *transformed 2D array* integer(kind=I4) :: i, j do j = 1, larg do i = 1, long tab_out(i, j) = tab_in( mod( i + long/2 - 1, long ) + 1, & ! mod( j + larg/2 - 1, larg ) + 1 ) enddo enddo return endsubroutine trans_corner2center_cmpl