@@ -801,7 +801,7 @@ subroutine ecriture_map_ray_tracing()
801
801
802
802
integer :: status,unit,blocksize,bitpix,naxis
803
803
integer , dimension (5 ) :: naxes
804
- integer :: i,j,group,fpixel,nelements, alloc_status, xcenter, lambda, itype, ibin, iaz
804
+ integer :: i,j,group,fpixel,nelements, alloc_status, xcenter, lambda, itype, ntypes, ibin, iaz
805
805
806
806
character (len = 512 ) :: filename
807
807
logical :: simple, extend
@@ -815,7 +815,11 @@ subroutine ecriture_map_ray_tracing()
815
815
real , dimension (:,:,:,:), allocatable :: image_casa
816
816
817
817
if (lcasa) then
818
- allocate (image_casa(npix_x, npix_y, 1 , 1 ), stat= alloc_status) ! 3eme axe : pola, 4eme axe : frequence
818
+ if (lsepar_pola) then
819
+ allocate (image_casa(npix_x, npix_y, 4 , 1 ), stat= alloc_status) ! 3eme axe : pola, 4eme axe : frequence
820
+ else
821
+ allocate (image_casa(npix_x, npix_y, 1 , 1 ), stat= alloc_status) ! 3eme axe : pola, 4eme axe : frequence
822
+ endif
819
823
if (alloc_status > 0 ) call error(' Allocation error RT image_casa' )
820
824
image_casa = 0.0 ;
821
825
else
@@ -936,20 +940,33 @@ subroutine ecriture_map_ray_tracing()
936
940
!- ---- Images
937
941
! Boucles car ca ne passe pas avec sum directement (ifort sur mac)
938
942
if (lcasa) then
939
- itype= 1 ; ibin= 1 ; iaz = 1
943
+ if (lsepar_pola) then
944
+ ntypes= 4 ;
945
+ else
946
+ ntypes= 1
947
+ endif
948
+ ibin= 1 ; iaz = 1
940
949
941
950
W2m2_to_Jy = 1e26 * (tab_lambda(lambda)* 1e-6 )/ c_light;
942
951
943
- do j= 1 ,npix_y
944
- do i= 1 ,npix_x
945
- image_casa(i,j,1 ,1 ) = sum (Stokes_ray_tracing(lambda,i,j,ibin,iaz,itype,:)) * W2m2_to_Jy
946
- enddo ! i
947
- enddo ! j
952
+ do itype= 1 ,ntypes
953
+ do j= 1 ,npix_y
954
+ do i= 1 ,npix_x
955
+ image_casa(i,j,itype,1 ) = sum (Stokes_ray_tracing(lambda,i,j,ibin,iaz,itype,:)) * W2m2_to_Jy
956
+ enddo ! i
957
+ enddo ! j
958
+ enddo ! itype
948
959
949
960
if (l_sym_ima) then
950
961
xcenter = npix_x/ 2 + modulo (npix_x,2 )
951
962
do i= xcenter+1 ,npix_x
952
963
image_casa(i,:,1 ,1 ) = image_casa(npix_x- i+1 ,:,1 ,1 )
964
+
965
+ if (lsepar_pola) then
966
+ image_casa(i,:,2 ,1 ) = image_casa(npix_x- i+1 ,:,2 ,1 )
967
+ image_casa(i,:,3 ,1 ) = - image_casa(npix_x- i+1 ,:,3 ,1 )
968
+ image_casa(i,:,4 ,1 ) = image_casa(npix_x- i+1 ,:,4 ,1 )
969
+ endif
953
970
enddo
954
971
endif
955
972
0 commit comments