store_fida_photons Subroutine

public subroutine store_fida_photons(pos, vi, lambda0, photons, orbit_class, passive)

Store fida photons in Spectra

Arguments

TypeIntentOptionalAttributesName
real(kind=Float64), intent(in), dimension(3):: pos

Position of neutral in beam grid coordinates

real(kind=Float64), intent(in), dimension(3):: vi

Velocitiy of neutral [cm/s]

real(kind=Float64), intent(in) :: lambda0

Reference wavelength [nm]

real(kind=Float64), intent(in) :: photons

Photons from colrad [Ph/(s*cm^3)]

integer, intent(in), optional :: orbit_class

Orbit class ID

logical, intent(in), optional :: passive

Indicates whether photon is passive FIDA


Calls

proc~~store_fida_photons~~CallsGraph proc~store_fida_photons store_fida_photons proc~store_photons store_photons proc~store_fida_photons->proc~store_photons proc~get_passive_grid_indices get_passive_grid_indices proc~store_photons->proc~get_passive_grid_indices proc~spectrum spectrum proc~store_photons->proc~spectrum proc~get_fields get_fields proc~store_photons->proc~get_fields proc~get_indices get_indices proc~store_photons->proc~get_indices proc~uvw_to_xyz uvw_to_xyz proc~store_photons->proc~uvw_to_xyz proc~xyz_to_cyl xyz_to_cyl proc~get_passive_grid_indices->proc~xyz_to_cyl proc~get_fields->proc~uvw_to_xyz proc~get_position get_position proc~get_fields->proc~get_position proc~in_plasma in_plasma proc~get_fields->proc~in_plasma proc~calc_perp_vectors calc_perp_vectors proc~get_fields->proc~calc_perp_vectors proc~xyz_to_uvw xyz_to_uvw proc~get_fields->proc~xyz_to_uvw proc~cyl_to_xyz cyl_to_xyz proc~get_position->proc~cyl_to_xyz proc~xyz_to_cyl->proc~xyz_to_uvw proc~uvw_to_cyl uvw_to_cyl proc~xyz_to_cyl->proc~uvw_to_cyl proc~in_plasma->proc~xyz_to_uvw interface~interpol_coeff interpol_coeff proc~in_plasma->interface~interpol_coeff proc~cyl_to_uvw cyl_to_uvw proc~in_plasma->proc~cyl_to_uvw proc~cyl_to_xyz->proc~uvw_to_xyz proc~cyl_to_xyz->proc~cyl_to_uvw

Called by

proc~~store_fida_photons~~CalledByGraph proc~store_fida_photons store_fida_photons proc~fida_f fida_f proc~fida_f->proc~store_fida_photons proc~fida_mc fida_mc proc~fida_mc->proc~store_fida_photons proc~pfida_mc pfida_mc proc~pfida_mc->proc~store_fida_photons proc~pfida_f pfida_f proc~pfida_f->proc~store_fida_photons program~fidasim fidasim program~fidasim->proc~fida_f program~fidasim->proc~fida_mc program~fidasim->proc~pfida_mc program~fidasim->proc~pfida_f

Contents

Source Code


Source Code

subroutine store_fida_photons(pos, vi, lambda0, photons, orbit_class, passive)
    !+ Store fida photons in [[libfida:spectra]]
    real(Float64), dimension(3), intent(in) :: pos
        !+ Position of neutral in beam grid coordinates
    real(Float64), dimension(3), intent(in) :: vi
        !+ Velocitiy of neutral [cm/s]
    real(Float64), intent(in)               :: lambda0
        !+ Reference wavelength [nm]
    real(Float64), intent(in)               :: photons
        !+ Photons from [[libfida:colrad]] [Ph/(s*cm^3)]
    integer, intent(in), optional           :: orbit_class
        !+ Orbit class ID
    logical, intent(in), optional           :: passive
        !+ Indicates whether photon is passive FIDA

    integer :: iclass = 1
    logical :: pas = .False.
    type(LOSinters) :: inter

    if(present(orbit_class)) then
        iclass = min(orbit_class,particles%nclass)
    endif

    if(present(passive)) pas = passive

    if(pas) then
        call store_photons(pos, vi, lambda0, photons, spec%pfida(:,:,:,iclass), spec%pfidastokes(:,:,:,:,iclass), passive=.True.)
    else
        call store_photons(pos, vi, lambda0, photons, spec%fida(:,:,:,iclass),spec%fidastokes(:,:,:,:,iclass))
    endif

end subroutine store_fida_photons