store_fw_photons Subroutine

public subroutine store_fw_photons(eind, pind, pos, vi, denf, photons)

Store FIDA weight photons in fweight

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: eind

Energy index

integer, intent(in) :: pind

Pitch index

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

Position of neutral

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

Velocity of neutral [cm/s]

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

Fast-ion density [cm^-3]

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

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


Calls

proc~~store_fw_photons~~CallsGraph proc~store_fw_photons store_fw_photons proc~get_indices get_indices proc~store_fw_photons->proc~get_indices proc~get_fields get_fields proc~store_fw_photons->proc~get_fields proc~store_fw_photons_at_chan store_fw_photons_at_chan proc~store_fw_photons->proc~store_fw_photons_at_chan proc~calc_perp_vectors calc_perp_vectors proc~get_fields->proc~calc_perp_vectors proc~in_plasma in_plasma proc~get_fields->proc~in_plasma proc~spectrum spectrum proc~store_fw_photons_at_chan->proc~spectrum interface~interpol_coeff interpol_coeff proc~in_plasma->interface~interpol_coeff proc~xyz_to_uvw xyz_to_uvw proc~in_plasma->proc~xyz_to_uvw proc~interpol2d_coeff interpol2D_coeff interface~interpol_coeff->proc~interpol2d_coeff proc~interpol1d_coeff interpol1D_coeff interface~interpol_coeff->proc~interpol1d_coeff proc~interpol2d_coeff_arr interpol2D_coeff_arr interface~interpol_coeff->proc~interpol2d_coeff_arr proc~interpol1d_coeff_arr interpol1D_coeff_arr interface~interpol_coeff->proc~interpol1d_coeff_arr proc~interpol2d_coeff_arr->proc~interpol2d_coeff proc~interpol1d_coeff_arr->proc~interpol1d_coeff

Contents

Source Code


Source Code

subroutine store_fw_photons(eind, pind, pos, vi, denf, photons)
    !+ Store FIDA weight photons in [[libfida:fweight]]
    integer, intent(in)                     :: eind
        !+ Energy index
    integer, intent(in)                     :: pind
        !+ Pitch index
    real(Float64), dimension(3), intent(in) :: pos
        !+ Position of neutral
    real(Float64), dimension(3), intent(in) :: vi
        !+ Velocity of neutral [cm/s]
    real(Float64), intent(in)               :: denf
        !+ Fast-ion density [cm^-3]
    real(Float64), intent(in)               :: photons
        !+ Photons from [[libfida:colrad]] [Ph/(s*cm^3)]

    real(Float64) :: dlength, sigma_pi
    type(LocalEMFields) :: fields
    integer(Int32), dimension(3) :: ind
    real(Float64), dimension(3) :: vp
    type(LOSInters) :: inter
    integer :: ichan,nchan,i

    call get_indices(pos,ind)
    inter = spec_chords%inter(ind(1),ind(2),ind(3))
    nchan = inter%nchan
    if(nchan.eq.0) return

    call get_fields(fields,pos=pos)

    loop_over_channels: do i=1,nchan
        ichan = inter%los_elem(i)%id
        dlength = inter%los_elem(i)%length
        sigma_pi = spec_chords%los(ichan)%sigma_pi
        vp = pos - spec_chords%los(ichan)%lens
        call store_fw_photons_at_chan(ichan, eind, pind, &
             vp, vi, fields, dlength, sigma_pi, denf, photons)
    enddo loop_over_channels

end subroutine store_fw_photons