Compute the STD spectrum of a cube along the spatial axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xp), | intent(in), | dimension(:,:,:), allocatable | :: | data | initial fits data |
|
real(kind=xp), | intent(inout), | dimension(:), allocatable | :: | spectrum | std_spectrum of the observation |
|
integer, | intent(in) | :: | dim_v | dimension along v axis |
||
integer, | intent(in) | :: | dim_y | dimension along spatial axis y |
||
integer, | intent(in) | :: | dim_x | dimension along spatial axis x |
subroutine std_spectrum(data, spectrum, dim_v, dim_y, dim_x)
!! Compute the STD spectrum of a cube along the spatial axis
implicit none
real(xp), intent(in), dimension(:,:,:), allocatable :: data !! initial fits data
integer, intent(in) :: dim_v !! dimension along v axis
integer, intent(in) :: dim_y !! dimension along spatial axis y
integer, intent(in) :: dim_x !! dimension along spatial axis x
real(xp), intent(inout), dimension(:), allocatable :: spectrum !! std_spectrum of the observation
real(xp), dimension(:,:), allocatable :: map !! 2D array
integer :: i !! loop index
do i=1,dim_v
allocate(map(dim_y,dim_x))
map = data(i,:,:)
spectrum(i) = std_2D(map, dim_y, dim_x)
deallocate(map)
end do
end subroutine std_spectrum