spherical_to_cartesian Subroutine

public subroutine spherical_to_cartesian(vec_sph, vec_car)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: vec_sph(1:3)
double precision, intent(inout) :: vec_car(1:3)

Calls

proc~~spherical_to_cartesian~~CallsGraph proc~spherical_to_cartesian spherical_to_cartesian dcos dcos proc~spherical_to_cartesian->dcos dsin dsin proc~spherical_to_cartesian->dsin

Called by

proc~~spherical_to_cartesian~~CalledByGraph proc~spherical_to_cartesian spherical_to_cartesian proc~get_cor_image_spherical get_cor_image_spherical proc~get_cor_image_spherical->proc~spherical_to_cartesian proc~init_vectors_spherical init_vectors_spherical proc~init_vectors_spherical->proc~spherical_to_cartesian proc~integrate_emission_spherical integrate_emission_spherical proc~integrate_emission_spherical->proc~spherical_to_cartesian proc~integrate_emission_spherical->proc~get_cor_image_spherical proc~get_image get_image proc~get_image->proc~init_vectors_spherical proc~get_image->proc~integrate_emission_spherical proc~integrate_whitelight_spherical integrate_whitelight_spherical proc~get_image->proc~integrate_whitelight_spherical proc~get_spectrum get_spectrum proc~get_spectrum->proc~init_vectors_spherical proc~integrate_whitelight_spherical->proc~get_cor_image_spherical proc~get_euv_image get_EUV_image proc~get_euv_image->proc~get_image proc~get_euv_spectrum get_EUV_spectrum proc~get_euv_spectrum->proc~get_spectrum proc~get_sxr_image get_SXR_image proc~get_sxr_image->proc~get_image proc~get_whitelight_image get_whitelight_image proc~get_whitelight_image->proc~get_image

Source Code

    subroutine spherical_to_cartesian(vec_sph,vec_car)
      ! angles in rad
      double precision, intent(in) :: vec_sph(1:3)
      double precision, intent(inout) :: vec_car(1:3)

      vec_car(1)=vec_sph(1)*dsin(vec_sph(2))*dcos(vec_sph(3))
      vec_car(2)=vec_sph(1)*dsin(vec_sph(2))*dsin(vec_sph(3))
      vec_car(3)=vec_sph(1)*dcos(vec_sph(2))

    end subroutine spherical_to_cartesian