get_SXR_image Subroutine

public subroutine get_SXR_image(qunit, fl)

Uses

  • proc~~get_sxr_image~~UsesGraph proc~get_sxr_image get_SXR_image module~mod_global_parameters mod_global_parameters proc~get_sxr_image->module~mod_global_parameters module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_variables->module~mod_basic_types

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: qunit
type(te_fluid), intent(in) :: fl

Calls

proc~~get_sxr_image~~CallsGraph proc~get_sxr_image get_SXR_image mpi_wtime mpi_wtime proc~get_sxr_image->mpi_wtime proc~get_image get_image proc~get_sxr_image->proc~get_image proc~get_image_datresol get_image_datresol proc~get_sxr_image->proc~get_image_datresol proc~mpistop mpistop proc~get_sxr_image->proc~mpistop proc~get_image->proc~mpistop mpi_allreduce mpi_allreduce proc~get_image->mpi_allreduce proc~get_cor_image get_cor_image proc~get_image->proc~get_cor_image proc~get_line_info get_line_info proc~get_image->proc~get_line_info proc~init_vectors_cartesian init_vectors_cartesian proc~get_image->proc~init_vectors_cartesian proc~init_vectors_spherical init_vectors_spherical proc~get_image->proc~init_vectors_spherical proc~integrate_emission_cartesian integrate_emission_cartesian proc~get_image->proc~integrate_emission_cartesian proc~integrate_emission_spherical integrate_emission_spherical proc~get_image->proc~integrate_emission_spherical proc~integrate_whitelight_spherical integrate_whitelight_spherical proc~get_image->proc~integrate_whitelight_spherical proc~output_data output_data proc~get_image->proc~output_data proc~get_image_datresol->proc~mpistop proc~get_image_datresol->mpi_allreduce proc~integrate_euv_datresol integrate_EUV_datresol proc~get_image_datresol->proc~integrate_euv_datresol proc~integrate_sxr_datresol integrate_SXR_datresol proc~get_image_datresol->proc~integrate_sxr_datresol proc~get_image_datresol->proc~output_data mpi_abort mpi_abort proc~mpistop->mpi_abort proc~dot_product_loc dot_product_loc proc~get_cor_image->proc~dot_product_loc proc~get_line_info->proc~mpistop proc~cross_product_loc cross_product_loc proc~init_vectors_cartesian->proc~cross_product_loc proc~cartesian_to_spherical cartesian_to_spherical proc~init_vectors_spherical->proc~cartesian_to_spherical proc~init_vectors_spherical->proc~cross_product_loc proc~spherical_to_cartesian spherical_to_cartesian proc~init_vectors_spherical->proc~spherical_to_cartesian proc~integrate_emission_cartesian->proc~get_cor_image proc~integrate_emission_cartesian->proc~get_line_info proc~get_euv get_EUV proc~integrate_emission_cartesian->proc~get_euv proc~get_sxr get_SXR proc~integrate_emission_cartesian->proc~get_sxr proc~integrate_emission_spherical->proc~get_line_info dsin dsin proc~integrate_emission_spherical->dsin proc~integrate_emission_spherical->proc~dot_product_loc proc~get_cor_image_spherical get_cor_image_spherical proc~integrate_emission_spherical->proc~get_cor_image_spherical proc~integrate_emission_spherical->proc~get_euv proc~integrate_emission_spherical->proc~get_sxr proc~get_unit_vector_spherical get_unit_vector_spherical proc~integrate_emission_spherical->proc~get_unit_vector_spherical proc~integrate_emission_spherical->proc~spherical_to_cartesian proc~integrate_euv_datresol->proc~get_euv proc~integrate_sxr_datresol->proc~get_sxr proc~integrate_whitelight_spherical->dsin proc~integrate_whitelight_spherical->proc~dot_product_loc proc~integrate_whitelight_spherical->proc~get_cor_image_spherical proc~get_thomson_parameters get_Thomson_parameters proc~integrate_whitelight_spherical->proc~get_thomson_parameters proc~integrate_whitelight_spherical->proc~get_unit_vector_spherical proc~get_whitelight_thomson get_whitelight_Thomson proc~integrate_whitelight_spherical->proc~get_whitelight_thomson proc~output_data->proc~mpistop proc~write_image_vticc write_image_vtiCC proc~output_data->proc~write_image_vticc proc~write_image_vtucc write_image_vtuCC proc~output_data->proc~write_image_vtucc dacos dacos proc~cartesian_to_spherical->dacos proc~get_cor_image_spherical->proc~dot_product_loc proc~get_cor_image_spherical->proc~spherical_to_cartesian proc~get_euv->proc~mpistop dexp dexp proc~get_sxr->dexp proc~get_unit_vector_spherical->dsin dcos dcos proc~get_unit_vector_spherical->dcos proc~spherical_to_cartesian->dsin proc~spherical_to_cartesian->dcos proc~write_image_vticc->proc~get_line_info proc~write_image_vtucc->proc~get_line_info

Source Code

    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