subroutine get_SXR_image(qunit,fl)
use mod_global_parameters
integer, intent(in) :: qunit
type(te_fluid), intent(in) :: fl
character(20) :: datatype
double precision :: RHESSI_rsl
double precision :: t0,t1
t0=MPI_WTIME()
datatype='image_sxr'
RHESSI_rsl=2.3/instrument_resolution_factor
if (mype==0) then
print *, '###################################################'
print *, 'Systhesizing SXR image (observed at 1 AU).'
write(*,'(a,i2,a,i2,a)') ' Passband: ',emin_sxr,' - ',emax_sxr,' keV'
endif
if (dat_resolution) then
if (coordinate/=cartesian) call MPISTOP(&
'SXR synthesis: only cartesian is supported for .dat resolution!')
if (mype==0) then
print *, 'Unit of SXR flux: photons cm^-2 s^-1 pixel^-1'
write(*,'(a,f5.1,a,f5.1,a,f5.1,a,f5.1,a)') ' Supposed Pixel: ',&
RHESSI_rsl*0.725, ' Mm x ',RHESSI_rsl*0.725, ' Mm (', RHESSI_rsl,&
' arcsec x ', RHESSI_rsl, ' arcsec)'
if (SI_unit) then
write(*,'(a,f8.1,a)') ' Unit of length: ',unit_length/1.d6,' Mm'
else
write(*,'(a,f8.1,a)') ' Unit of length: ',unit_length/1.d8,' Mm'
endif
endif
if (LOS_phi==0 .and. LOS_theta==90) then
call get_image_datresol(qunit,datatype,fl)
else if (LOS_phi==90 .and. LOS_theta==90) then
call get_image_datresol(qunit,datatype,fl)
else if (LOS_theta==0) then
call get_image_datresol(qunit,datatype,fl)
else
call MPISTOP('ERROR: Wrong LOS for synthesizing emission!')
endif
else
if (mype==0) then
print *, 'Unit of SXR flux: photons cm^-2 s^-1 pixel^-1'
write(*,'(a,f5.1,a,f5.1,a,f5.1,a,f5.1,a)') ' Pixel: ',&
RHESSI_rsl*0.725, ' Mm x ',RHESSI_rsl*0.725, ' Mm (', RHESSI_rsl,&
' arcsec x ', RHESSI_rsl, ' arcsec)'
if (activate_unit_arcsec) then
print *, 'Unit of length: arcsec (~725 km)'
else
if (SI_unit) then
write(*,'(a,f8.1,a)') ' Unit of length: ',unit_length/1.d6,' Mm'
else
write(*,'(a,f8.1,a)') ' Unit of length: ',unit_length/1.d8,' Mm'
endif
endif
endif
if (coordinate==cartesian) then
if (mype==0) write(*,'(a,f8.3,f8.3,f8.3,a)') ' Mapping: [',&
x_origin(1),x_origin(2),x_origin(3),&
'] of the simulation box is located at [X=0,Y=0] of the image'
call get_image(qunit,datatype,fl)
else if (coordinate==spherical) then
if (mype==0) write(*,'(a,f6.3,f8.3,f8.3,a)') &
' Mapping: R=0 of the simulation box is located at [X=0,Y=0] of the image'
call get_image(qunit,datatype,fl)
else
call MPISTOP("SXR synthesis: this coordinate is not supported!")
endif
endif
t1=MPI_WTIME()
if (mype==0) print *, 'time comsuming:',t1-t0
if (mype==0) print *,&
'###################################################'
end subroutine get_SXR_image